# HG changeset patch # User Bruno Haible # Date 1276080479 -7200 # Node ID 758ef73803dbb8a518cd32e40beaaa65aa618307 # Parent a6b472aaadaf4ac1273ab4216116450d2af423d4 Avoid relocwrapper link errors due to gnulib replacement functions. diff --git a/ChangeLog b/ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2010-06-09 Bruno Haible + + Avoid relocwrapper link errors due to gnulib replacement functions. + * lib/canonicalize-lgpl.c: Use the system's malloc function. + * lib/malloca.c: Likewise. + * lib/relocatable.c: Likewise. + * lib/progreloc.c: Use the system's malloc, sprintf functions. + * lib/relocwrapper.c: Use the system's fprintf, malloc functions. + * lib/setenv.c: Use the system's malloc, realloc functions. + * lib/strerror.c: Use the system's sprintf function. + Reported by Ben Pfaff . + 2010-06-04 Bruno Haible Prefer documented low-level autoconf macro names. diff --git a/lib/canonicalize-lgpl.c b/lib/canonicalize-lgpl.c --- a/lib/canonicalize-lgpl.c +++ b/lib/canonicalize-lgpl.c @@ -62,6 +62,8 @@ # endif # define __readlink readlink # define __set_errno(e) errno = (e) +/* Use the system functions, not the gnulib overrides in this file. */ +# undef malloc # ifndef MAXSYMLINKS # ifdef SYMLOOP_MAX # define MAXSYMLINKS SYMLOOP_MAX diff --git a/lib/malloca.c b/lib/malloca.c --- a/lib/malloca.c +++ b/lib/malloca.c @@ -21,6 +21,9 @@ /* Specification. */ #include "malloca.h" +/* Use the system functions, not the gnulib overrides in this file. */ +#undef malloc + /* The speed critical point in this file is freea() applied to an alloca() result: it must be fast, to match the speed of alloca(). The speed of mmalloca() and freea() in the other case are not critical, because they diff --git a/lib/progreloc.c b/lib/progreloc.c --- a/lib/progreloc.c +++ b/lib/progreloc.c @@ -89,6 +89,10 @@ #undef open #undef close +/* Use the system functions, not the gnulib overrides in this file. */ +#undef malloc +#undef sprintf + #undef set_program_name diff --git a/lib/relocatable.c b/lib/relocatable.c --- a/lib/relocatable.c +++ b/lib/relocatable.c @@ -86,6 +86,9 @@ # define FILE_SYSTEM_PREFIX_LEN(P) 0 #endif +/* Use the system functions, not the gnulib overrides in this file. */ +#undef malloc + /* Original installation prefix. */ static char *orig_prefix; static size_t orig_prefix_len; diff --git a/lib/relocwrapper.c b/lib/relocwrapper.c --- a/lib/relocwrapper.c +++ b/lib/relocwrapper.c @@ -55,6 +55,10 @@ #include "relocatable.h" #include "c-ctype.h" +/* Use the system functions, not the gnulib overrides in this file. */ +#undef fprintf +#undef malloc + /* Return a copy of the filename, with an extra ".bin" at the end. More generally, it replaces "${EXEEXT}" at the end with ".bin${EXEEXT}". */ static char * diff --git a/lib/setenv.c b/lib/setenv.c --- a/lib/setenv.c +++ b/lib/setenv.c @@ -64,6 +64,10 @@ # define clearenv __clearenv # define tfind __tfind # define tsearch __tsearch +#else +/* Use the system functions, not the gnulib overrides in this file. */ +# undef malloc +# undef realloc #endif /* In the GNU C library implementation we try to be more clever and diff --git a/lib/strerror.c b/lib/strerror.c --- a/lib/strerror.c +++ b/lib/strerror.c @@ -32,6 +32,9 @@ # include "intprops.h" +/* Use the system functions, not the gnulib overrides in this file. */ +# undef sprintf + # undef strerror # if ! HAVE_DECL_STRERROR # define strerror(n) NULL