[uClibc-cvs] uClibc/ldso/ldso readelflib1.c,1.45,1.46
Erik Andersen
andersen at uclibc.org
Thu Sep 11 10:47:26 UTC 2003
Update of /var/cvs/uClibc/ldso/ldso
In directory winder:/tmp/cvs-serv19195
Modified Files:
readelflib1.c
Log Message:
Simplify an expression. Use static const on strings to avoid
a gcc 2.95 compiler problem on powerpc.
Index: readelflib1.c
===================================================================
RCS file: /var/cvs/uClibc/ldso/ldso/readelflib1.c,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -d -r1.45 -r1.46
--- readelflib1.c 2 Sep 2003 06:55:55 -0000 1.45
+++ readelflib1.c 11 Sep 2003 10:47:23 -0000 1.46
@@ -223,9 +223,8 @@
const char *pnt, *pnt1;
struct elf_resolve *tpnt1;
const char *libname;
- const char libc6[] = "libc.so.6";
- const char libc5[] = "libc.so.5";
- const char aborted_wrong_lib[] = "%s: aborted attempt to load %s!\n";
+ static const char libc[] = "libc.so.";
+ static const char aborted_wrong_lib[] = "%s: aborted attempt to load %s!\n";
_dl_internal_error_number = 0;
libname = full_libname;
@@ -251,11 +250,11 @@
/* Make sure they are not trying to load the wrong C library!
* This sometimes happens esp with shared libraries when the
* library path is somehow wrong! */
- if ((pnt1 = libc6, (_dl_strcmp(libname, pnt1) == 0)) ||
- (pnt1 = libc5, (_dl_strcmp(libname, pnt1) == 0)))
+ if ((_dl_strcmp(libname, libc) == 0) &&
+ ( libname[8]=='6' || libname[8]=='5'))
{
if (!_dl_trace_loaded_objects) {
- _dl_dprintf(2, aborted_wrong_lib, pnt1, _dl_progname);
+ _dl_dprintf(2, aborted_wrong_lib, libname, _dl_progname);
}
return NULL;
}
More information about the uClibc-cvs
mailing list