[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Bug/Patch for fileutils-4.1 on HPUX 11.00 64-bit

From: Josh Martin
Subject: Bug/Patch for fileutils-4.1 on HPUX 11.00 64-bit
Date: Thu, 26 Sep 2002 19:27:21 -0600 (MDT)

When building fileutils-4.1 (or textutils-2.1) on HPUX 11.00 64-bit with gcc 
GNU ld I get the following error message:

hppa64-hp-hpux11.00-gcc  -g -O2   -o csplit  csplit.o ../lib/libfetish.a 
/usr/local/lib/libintl.sl -L/usr/local/lib /usr/local/lib/libiconv.sl -lc 
-Wl,-rpath -Wl,/usr/local/lib ../lib/libfetish.a -lsec -lgen 
../lib/libfetish.a(xstrtoumax.o): In function `xstrtoumax':
/usr/local/build/textutils-2.1/lib/xstrtol.c:141: undefined reference to 

I traced this back to the fact that the HP system headers define strtoumax as a 
macro which calls __strtoull, which is fine, but for some stupid reason this 
function is not defined in the 64-bit HP libraries, only the 32-bit libraries.

So I applied the following patch to fileutils-4.1 m4/xstrtoumax.m4 and re-ran 
aclocal, autoconf and automake, which fixes my problem.  This added code, when 
strtoumax is detected to be a macro, is supposed to check whether this macro 
actually works.  If it doesn't, it resets the flag to indicate that it is not a 
macro, so that the functions will correctly be replaced.  However, I'm not sure 
that AC_CHECK_FUNC() is appropriate for testing whether a macro works.  If 
correct, this patch will also need to be applied to the m4 directory in the 
textutils package, and the other package that shares this directory.

 - Josh Martin

--- xstrtoumax.m4~      Fri Sep 20 18:19:21 2002
+++ xstrtoumax.m4       Fri Sep 20 18:19:29 2002
@@ -19,6 +19,13 @@
+  if test "$jm_cv_func_strtoumax_macro" != no; then
+    AC_MSG_CHECKING([whether strtoumax macro works])
+      AC_CHECK_FUNC(strtoumax,
+        jm_cv_func_strtoumax_macro=yes,
+        jm_cv_func_strtoumax_macro=no)
+  fi
   if test "$jm_cv_func_strtoumax_macro" != yes; then

reply via email to

[Prev in Thread] Current Thread [Next in Thread]