summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2013-10-12 13:00:38 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2013-10-12 13:00:38 -0700
commit46e5e833d91758f31fbbea3c894cd0c90e78c484 (patch)
treeada8756fe35e7b4c60b77a3344e3ec7beaecf11e /m4
parent2f4586ad044ba5deedadbccd4ad913c565ca3367 (diff)
downloademacs-46e5e833d91758f31fbbea3c894cd0c90e78c484.tar.gz
Merge from gnulib.
This incorporates: 2013-10-10 strtoumax: port to Solaris 8 2013-10-09 strtoimax, strtoumax: port to HP-UX 11.11 * lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate. * lib/inttypes.in.h, lib/strtoimax.c, m4/inttypes.m4, m4/strtoimax.m4: * m4/strtoumax.m4: Update from gnulib.
Diffstat (limited to 'm4')
-rw-r--r--m4/gnulib-comp.m48
-rw-r--r--m4/inttypes.m41
-rw-r--r--m4/strtoimax.m48
-rw-r--r--m4/strtoumax.m49
4 files changed, 18 insertions, 8 deletions
diff --git a/m4/gnulib-comp.m4 b/m4/gnulib-comp.m4
index 534d56f5bac..c707e34993d 100644
--- a/m4/gnulib-comp.m4
+++ b/m4/gnulib-comp.m4
@@ -348,13 +348,13 @@ AC_DEFUN([gl_INIT],
gl_FUNC_GNU_STRFTIME
gl_HEADER_STRING_H
gl_FUNC_STRTOIMAX
- if test $HAVE_STRTOIMAX = 0 || test $REPLACE_STRTOIMAX = 1; then
+ if test $HAVE_DECL_STRTOIMAX = 0 || test $REPLACE_STRTOIMAX = 1; then
AC_LIBOBJ([strtoimax])
gl_PREREQ_STRTOIMAX
fi
gl_INTTYPES_MODULE_INDICATOR([strtoimax])
gl_FUNC_STRTOUMAX
- if test $ac_cv_func_strtoumax = no; then
+ if test $HAVE_DECL_STRTOUMAX = 0 || test $REPLACE_STRTOUMAX = 1; then
AC_LIBOBJ([strtoumax])
gl_PREREQ_STRTOUMAX
fi
@@ -622,10 +622,10 @@ AC_DEFUN([gl_INIT],
if test $HAVE_READLINKAT = 0; then
func_gl_gnulib_m4code_03e0aaad4cb89ca757653bd367a6ccb7
fi
- if { test $HAVE_STRTOIMAX = 0 || test $REPLACE_STRTOIMAX = 1; } && test $ac_cv_type_long_long_int = yes; then
+ if { test $HAVE_DECL_STRTOIMAX = 0 || test $REPLACE_STRTOIMAX = 1; } && test $ac_cv_type_long_long_int = yes; then
func_gl_gnulib_m4code_strtoll
fi
- if test $ac_cv_func_strtoumax = no && test $ac_cv_type_unsigned_long_long_int = yes; then
+ if { test $HAVE_DECL_STRTOUMAX = 0 || test $REPLACE_STRTOUMAX = 1; } && test $ac_cv_type_unsigned_long_long_int = yes; then
func_gl_gnulib_m4code_strtoull
fi
m4_pattern_allow([^gl_GNULIB_ENABLED_])
diff --git a/m4/inttypes.m4 b/m4/inttypes.m4
index 3b483d39f5c..b06c77753bf 100644
--- a/m4/inttypes.m4
+++ b/m4/inttypes.m4
@@ -148,6 +148,7 @@ AC_DEFUN([gl_INTTYPES_H_DEFAULTS],
HAVE_DECL_STRTOIMAX=1; AC_SUBST([HAVE_DECL_STRTOIMAX])
HAVE_DECL_STRTOUMAX=1; AC_SUBST([HAVE_DECL_STRTOUMAX])
REPLACE_STRTOIMAX=0; AC_SUBST([REPLACE_STRTOIMAX])
+ REPLACE_STRTOUMAX=0; AC_SUBST([REPLACE_STRTOUMAX])
INT32_MAX_LT_INTMAX_MAX=1; AC_SUBST([INT32_MAX_LT_INTMAX_MAX])
INT64_MAX_EQ_LONG_MAX='defined _LP64'; AC_SUBST([INT64_MAX_EQ_LONG_MAX])
PRI_MACROS_BROKEN=0; AC_SUBST([PRI_MACROS_BROKEN])
diff --git a/m4/strtoimax.m4 b/m4/strtoimax.m4
index bee93b21e8b..20454dc029c 100644
--- a/m4/strtoimax.m4
+++ b/m4/strtoimax.m4
@@ -1,4 +1,4 @@
-# strtoimax.m4 serial 13
+# strtoimax.m4 serial 14
dnl Copyright (C) 2002-2004, 2006, 2009-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -15,7 +15,7 @@ AC_DEFUN([gl_FUNC_STRTOIMAX],
HAVE_DECL_STRTOIMAX=0
fi
- if test $ac_cv_func_strtoimax = yes; then
+ if test "$ac_cv_func_strtoimax" = yes; then
HAVE_STRTOIMAX=1
dnl On AIX 5.1, strtoimax() fails for values outside the 'int' range.
AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
@@ -72,6 +72,10 @@ int main ()
*no) REPLACE_STRTOIMAX=1 ;;
esac
else
+ if test "$ac_cv_have_decl_strtoimax" = yes; then
+ # HP-UX 11.11 has "#define strtoimax(...) ..." but no function.
+ REPLACE_STRTOIMAX=1
+ fi
HAVE_STRTOIMAX=0
fi
])
diff --git a/m4/strtoumax.m4 b/m4/strtoumax.m4
index 6a6aeb5dae1..9c8ff175d31 100644
--- a/m4/strtoumax.m4
+++ b/m4/strtoumax.m4
@@ -1,4 +1,4 @@
-# strtoumax.m4 serial 11
+# strtoumax.m4 serial 12
dnl Copyright (C) 2002-2004, 2006, 2009-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -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
])