Avoid relocwrapper link errors due to gnulib replacement functions.
authorBruno Haible <bruno@clisp.org>
Sat, 28 Aug 2010 09:12:58 +0000 (11:12 +0200)
committerBruno Haible <bruno@clisp.org>
Sat, 28 Aug 2010 09:12:58 +0000 (11:12 +0200)
ChangeLog
lib/canonicalize-lgpl.c

index d3f104aae0e33f3b336e2678199230e45db4823d..e17c3280bf17c610764335e66cf11bb74886efce 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2010-08-28  Bruno Haible  <bruno@clisp.org>
+
+       Avoid relocwrapper link errors due to gnulib replacement functions.
+       * lib/canonicalize-lgpl.c [IN_RELOCWRAPPER]: Use the system's getcwd
+       function.
+       Reported by Ben Pfaff <blp@cs.stanford.edu>.
+
 2010-08-28  Bruno Haible  <bruno@clisp.org>
 
        Prefer using AC_DEFUN_ONCE over AC_DEFUN in projects with gnulib.
index c2164e07fede152ed7a93e9a0f18cf2229d8a907..3cf2d766e0fb6b48e0676fde19eaf699c31099b9 100644 (file)
 # include "pathmax.h"
 # include "malloca.h"
 # if HAVE_GETCWD
+#  if IN_RELOCWRAPPER
+    /* When building the relocatable program wrapper, use the system's getcwd
+       function, not the gnulib override, otherwise we would get a link error.
+     */
+#   undef getcwd
+#  endif
 #  ifdef VMS
     /* We want the directory in Unix syntax, not in VMS syntax.  */
 #   define __getcwd(buf, max) getcwd (buf, max, 0)