changeset 13590:605519975b9c

Avoid relocwrapper link errors due to gnulib replacement functions.
author Bruno Haible <bruno@clisp.org>
date Sat, 28 Aug 2010 11:12:58 +0200
parents eb2d6ffe06bc
children e3a337bd785d
files ChangeLog lib/canonicalize-lgpl.c
diffstat 2 files changed, 13 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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.
--- a/lib/canonicalize-lgpl.c
+++ b/lib/canonicalize-lgpl.c
@@ -51,6 +51,12 @@
 # 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)