Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libc/citrus - fix a.out case. (pointed by an anonymous p...



details:   https://anonhg.NetBSD.org/src/rev/660d3203e3df
branches:  trunk
changeset: 525901:660d3203e3df
user:      yamt <yamt%NetBSD.org@localhost>
date:      Sat Apr 20 05:55:47 2002 +0000

description:
- fix a.out case. (pointed by an anonymous person)
- use __ELF__ to determine if we're using elf.

diffstat:

 lib/libc/citrus/citrus_module.c |  15 +++++++--------
 1 files changed, 7 insertions(+), 8 deletions(-)

diffs (38 lines):

diff -r 6f9b31240898 -r 660d3203e3df lib/libc/citrus/citrus_module.c
--- a/lib/libc/citrus/citrus_module.c   Sat Apr 20 05:05:56 2002 +0000
+++ b/lib/libc/citrus/citrus_module.c   Sat Apr 20 05:55:47 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: citrus_module.c,v 1.1 2002/03/17 22:14:20 tshiozak Exp $       */
+/*     $NetBSD: citrus_module.c,v 1.2 2002/04/20 05:55:47 yamt Exp $   */
 
 /*-
  * Copyright (c)1999, 2000, 2001, 2002 Citrus Project,
@@ -100,7 +100,7 @@
 
 #include <sys/cdefs.h>
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: citrus_module.c,v 1.1 2002/03/17 22:14:20 tshiozak Exp $");
+__RCSID("$NetBSD: citrus_module.c,v 1.2 2002/04/20 05:55:47 yamt Exp $");
 #endif /* LIBC_SCCS and not lint */
 
 #include <assert.h>
@@ -294,14 +294,13 @@
        _DIAGASSERT(modname != NULL);
        _DIAGASSERT(ifname != NULL);
 
+#ifdef __ELF__
        snprintf(name, sizeof(name), "_citrus_%s_%s_getops", modname, ifname);
+#else
+       /* a.out case */
+       snprintf(name, sizeof(name), "__citrus_%s_%s_getops", modname, ifname);
+#endif
        p = dlsym((void *)handle, name);
-       if (!p) {
-               /* a.out case */
-               snprintf(name, sizeof(name),
-                        "__%s_%s_getops", modname, ifname);
-               p = dlsym(handle, name);
-       }
        return p;
 }
 



Home | Main Index | Thread Index | Old Index