This patch fixes PR other/63694.
Libiberty now contains implementations for strtol, strtoul, strtoll
and strtoull. On systems which
lack one or more of these functions, we need to check for their
declaration in configure. This results
in the correct defines being generated in config.h and auto-host.h.
Then, the declarations for
these functions in libiberty.h are appropriated enabled.
Tested on hppa2.0w-hp-hpux11.11.
OK for trunk.
Dave
--
John David Anglin dave.ang...@bell.net
libiberty ChangeLog:
2014-11-22 John David Anglin <dang...@gcc.gnu.org>
PR other/63694
* configure.ac: Check for strtol, strtoul, strtoll and strtoull
declarations.
* configure: Regenerated.
gcc ChangeLog:
2014-11-22 John David Anglin <dang...@gcc.gnu.org>
PR other/63694
* configure.ac: Check for strtol, strtoul, strtoll and strtoull
declarations.
* configure: Regenerated.
* config.in: Regenerated.
Index: libiberty/configure.ac
===================================================================
--- libiberty/configure.ac (revision 217956)
+++ libiberty/configure.ac (working copy)
@@ -678,6 +678,7 @@
AC_CHECK_FUNCS($checkfuncs)
AC_CHECK_DECLS([basename(char *), ffs, asprintf, vasprintf, snprintf,
vsnprintf])
AC_CHECK_DECLS([calloc, getenv, getopt, malloc, realloc, sbrk])
+ AC_CHECK_DECLS([strtol, strtoul, strtoll, strtoull])
AC_CHECK_DECLS([strverscmp])
libiberty_NEED_DECLARATION(canonicalize_file_name)
fi
Index: gcc/configure.ac
===================================================================
--- gcc/configure.ac (revision 217956)
+++ gcc/configure.ac (working copy)
@@ -1213,6 +1213,7 @@
CXXFLAGS="$CXXFLAGS -I${srcdir} -I${srcdir}/../include $GMPINC"
gcc_AC_CHECK_DECLS(getenv atol asprintf sbrk abort atof getcwd getwd \
stpcpy strnlen strsignal strstr strverscmp \
+ strtol strtoul strtoll strtoull \
errno snprintf vsnprintf vasprintf malloc realloc calloc \
free basename getopt clock getpagesize ffs gcc_UNLOCKED_FUNCS, , ,[
#include "ansidecl.h"