Avoid relocwrapper link errors due to gnulib replacement functions.
authorBruno Haible <bruno@clisp.org>
Wed, 9 Jun 2010 10:47:59 +0000 (12:47 +0200)
committerBruno Haible <bruno@clisp.org>
Wed, 9 Jun 2010 10:47:59 +0000 (12:47 +0200)
ChangeLog
lib/canonicalize-lgpl.c
lib/malloca.c
lib/progreloc.c
lib/relocatable.c
lib/relocwrapper.c
lib/setenv.c
lib/strerror.c

index aa2ac1a..d8cafae 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2010-06-09  Bruno Haible  <bruno@clisp.org>
+
+       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 <blp@cs.stanford.edu>.
+
 2010-06-04  Bruno Haible  <bruno@clisp.org>
 
        Prefer documented low-level autoconf macro names.
index 939e3f1..c2164e0 100644 (file)
@@ -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
index b0e6ab6..2268878 100644 (file)
@@ -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
index 8aa33b7..1e27de7 100644 (file)
@@ -89,6 +89,10 @@ extern char * canonicalize_file_name (const char *name);
 #undef open
 #undef close
 
+/* Use the system functions, not the gnulib overrides in this file.  */
+#undef malloc
+#undef sprintf
+
 #undef set_program_name
 
 
index 172e91c..f0ac6d1 100644 (file)
@@ -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;
index 19dfaa3..04f2258 100644 (file)
 #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 *
index 178191c..ba760d6 100644 (file)
@@ -64,6 +64,10 @@ __libc_lock_define_initialized (static, envlock)
 # 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
index b0df778..46153ab 100644 (file)
@@ -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