bug-gnulib
[Top][All Lists]
Advanced

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

ftoastr: link error on HP-UX


From: Bruno Haible
Subject: ftoastr: link error on HP-UX
Date: Mon, 13 Jun 2011 11:07:54 +0200
User-agent: KMail/1.9.9

Hi Paul,

Trying to compile coreutils-8.12 on HP-UX 11.11 with gcc 4.2.4, I get this
link error:

    CCLD     od
  /usr/ccs/bin/ld: Unsatisfied symbols:
     strtof (first referenced in ../lib/libcoreutils.a(ftoastr.o)) (code)
  collect2: ld returned 1 exit status
  gmake[3]: *** [od] Error 1

The reason is that, as documented in doc/posix-functions/strtof.texi, the
function strtof() is not defined on many platforms, including HP-UX 11,
and gnulib provides no workaround.

Testing whether strtof() exists and modifying the condition in
lib/ftoastr.c:64 should be sufficient to fix this. Something like this:

#if (LENGTH > 2 && ! HAVE_C99_STRTOLD) || (LENGTH == 1 && !HAVE_STRTOF)
# undef STRTOF
# define STRTOF strtod
#endif

Bruno
-- 
In memoriam Anna Göldi <http://en.wikipedia.org/wiki/Anna_Göldi>



reply via email to

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