bug-gnulib
[Top][All Lists]
Advanced

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

Re: Error compiling strtoimax.c on hppa2.0w-hp-hpux11.11


From: Tom G. Christensen
Subject: Re: Error compiling strtoimax.c on hppa2.0w-hp-hpux11.11
Date: Thu, 10 Oct 2013 17:52:37 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.12) Gecko/20130108 Thunderbird/10.0.12

On 10/09/2013 05:06 PM, Paul Eggert wrote:
I pushed the following patch, which I hope fixes things for you.

It broke my daily build on Solaris.

gcc -std=gnu99 -g -O2 -L/usr/tgcware/lib -R/usr/tgcware/lib -o test-xstrtoumax test-xstrtoumax.o ../gllib/libgnu.a /usr/tgcware/lib/libintl.so -R/usr/tgcware/lib -lm -lm -lm -lm -lm -lm
Undefined                       first referenced
 symbol                             in file
strtoumax                           ../gllib/libgnu.a(xstrtoumax.o)
ld: fatal: Symbol referencing errors. No output written to test-xstrtoumax
collect2: error: ld returned 1 exit status
make[4]: *** [test-xstrtoumax] Error 1


diff --git a/m4/strtoumax.m4 b/m4/strtoumax.m4
index 6a6aeb5..9c8ff17 100644
--- a/m4/strtoumax.m4
+++ b/m4/strtoumax.m4
@@ -11,7 +11,12 @@ AC_DEFUN([gl_FUNC_STRTOUMAX],
    dnl On OSF/1 5.1 with cc, this function is declared but not defined.
    AC_CHECK_FUNCS_ONCE([strtoumax])
    AC_CHECK_DECLS_ONCE([strtoumax])
-  if test "$ac_cv_have_decl_strtoumax" != yes; then
+  if test "$ac_cv_have_decl_strtoumax" = yes; then
+    if test "$ac_cv_func_strtoumax" != yes; then
+      # HP-UX 11.11 has "#define strtoimax(...) ..." but no function.
+      REPLACE_STRTOUMAX=1
+    fi
+  else
      HAVE_DECL_STRTOUMAX=0
    fi
  ])


This sets HAVE_DECL_STRTOUMAX=0 however...

index dc72a0a..1d2a15a 100644
--- a/modules/strtoumax
+++ b/modules/strtoumax
@@ -15,7 +15,7 @@ strtoull        [test $ac_cv_func_strtoumax = no&&  test 
$ac_cv_type_unsigned_lo

  configure.ac:
  gl_FUNC_STRTOUMAX
-if test $ac_cv_func_strtoumax = no; then
+if test $HAVE_STRTOUMAX = 0 || test $REPLACE_STRTOUMAX = 1; then
    AC_LIBOBJ([strtoumax])
    gl_PREREQ_STRTOUMAX
  fi

This test checks HAVE_STRTOUMAX which is not declared anywhere.

Replacing HAVE_STRTOUMAX with HAVE_DECL_STRTOUMAX fixed the build.

-tgc



reply via email to

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