diff options
| author | Paul Eggert | 2013-10-12 13:00:38 -0700 |
|---|---|---|
| committer | Paul Eggert | 2013-10-12 13:00:38 -0700 |
| commit | 46e5e833d91758f31fbbea3c894cd0c90e78c484 (patch) | |
| tree | ada8756fe35e7b4c60b77a3344e3ec7beaecf11e | |
| parent | 2f4586ad044ba5deedadbccd4ad913c565ca3367 (diff) | |
| download | emacs-46e5e833d91758f31fbbea3c894cd0c90e78c484.tar.gz emacs-46e5e833d91758f31fbbea3c894cd0c90e78c484.zip | |
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.
| -rw-r--r-- | ChangeLog | 10 | ||||
| -rw-r--r-- | lib/gnulib.mk | 1 | ||||
| -rw-r--r-- | lib/inttypes.in.h | 16 | ||||
| -rw-r--r-- | lib/strtoimax.c | 15 | ||||
| -rw-r--r-- | m4/gnulib-comp.m4 | 8 | ||||
| -rw-r--r-- | m4/inttypes.m4 | 1 | ||||
| -rw-r--r-- | m4/strtoimax.m4 | 8 | ||||
| -rw-r--r-- | m4/strtoumax.m4 | 9 |
8 files changed, 51 insertions, 17 deletions
| @@ -1,3 +1,13 @@ | |||
| 1 | 2013-10-12 Paul Eggert <eggert@cs.ucla.edu> | ||
| 2 | |||
| 3 | Merge from gnulib, incorporating: | ||
| 4 | 2013-10-10 strtoumax: port to Solaris 8 | ||
| 5 | 2013-10-09 strtoimax, strtoumax: port to HP-UX 11.11 | ||
| 6 | * lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate. | ||
| 7 | * lib/inttypes.in.h, lib/strtoimax.c, m4/inttypes.m4, m4/strtoimax.m4: | ||
| 8 | * m4/strtoumax.m4: | ||
| 9 | Update from gnulib. | ||
| 10 | |||
| 1 | 2013-10-11 Stefan Monnier <monnier@iro.umontreal.ca> | 11 | 2013-10-11 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 12 | ||
| 3 | * configure.ac (LIBGNUTLS): Don't set LIBGNUTLS_* back to the empty | 13 | * configure.ac (LIBGNUTLS): Don't set LIBGNUTLS_* back to the empty |
diff --git a/lib/gnulib.mk b/lib/gnulib.mk index 69fc06bbe06..44cdc0cdaac 100644 --- a/lib/gnulib.mk +++ b/lib/gnulib.mk | |||
| @@ -565,6 +565,7 @@ inttypes.h: inttypes.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_U | |||
| 565 | -e 's/@''HAVE_DECL_STRTOIMAX''@/$(HAVE_DECL_STRTOIMAX)/g' \ | 565 | -e 's/@''HAVE_DECL_STRTOIMAX''@/$(HAVE_DECL_STRTOIMAX)/g' \ |
| 566 | -e 's/@''HAVE_DECL_STRTOUMAX''@/$(HAVE_DECL_STRTOUMAX)/g' \ | 566 | -e 's/@''HAVE_DECL_STRTOUMAX''@/$(HAVE_DECL_STRTOUMAX)/g' \ |
| 567 | -e 's/@''REPLACE_STRTOIMAX''@/$(REPLACE_STRTOIMAX)/g' \ | 567 | -e 's/@''REPLACE_STRTOIMAX''@/$(REPLACE_STRTOIMAX)/g' \ |
| 568 | -e 's/@''REPLACE_STRTOUMAX''@/$(REPLACE_STRTOUMAX)/g' \ | ||
| 568 | -e 's/@''INT32_MAX_LT_INTMAX_MAX''@/$(INT32_MAX_LT_INTMAX_MAX)/g' \ | 569 | -e 's/@''INT32_MAX_LT_INTMAX_MAX''@/$(INT32_MAX_LT_INTMAX_MAX)/g' \ |
| 569 | -e 's/@''INT64_MAX_EQ_LONG_MAX''@/$(INT64_MAX_EQ_LONG_MAX)/g' \ | 570 | -e 's/@''INT64_MAX_EQ_LONG_MAX''@/$(INT64_MAX_EQ_LONG_MAX)/g' \ |
| 570 | -e 's/@''UINT32_MAX_LT_UINTMAX_MAX''@/$(UINT32_MAX_LT_UINTMAX_MAX)/g' \ | 571 | -e 's/@''UINT32_MAX_LT_UINTMAX_MAX''@/$(UINT32_MAX_LT_UINTMAX_MAX)/g' \ |
diff --git a/lib/inttypes.in.h b/lib/inttypes.in.h index 1893f5569d3..05a22fff790 100644 --- a/lib/inttypes.in.h +++ b/lib/inttypes.in.h | |||
| @@ -1105,12 +1105,22 @@ _GL_WARN_ON_USE (strtoimax, "strtoimax is unportable - " | |||
| 1105 | #endif | 1105 | #endif |
| 1106 | 1106 | ||
| 1107 | #if @GNULIB_STRTOUMAX@ | 1107 | #if @GNULIB_STRTOUMAX@ |
| 1108 | # if !@HAVE_DECL_STRTOUMAX@ | 1108 | # if @REPLACE_STRTOUMAX@ |
| 1109 | # undef strtoumax | 1109 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 1110 | # undef strtoumax | ||
| 1111 | # define strtoumax rpl_strtoumax | ||
| 1112 | # endif | ||
| 1113 | _GL_FUNCDECL_RPL (strtoumax, uintmax_t, | ||
| 1114 | (const char *, char **, int) _GL_ARG_NONNULL ((1))); | ||
| 1115 | _GL_CXXALIAS_RPL (strtoumax, uintmax_t, (const char *, char **, int)); | ||
| 1116 | # else | ||
| 1117 | # if !@HAVE_DECL_STRTOUMAX@ | ||
| 1118 | # undef strtoumax | ||
| 1110 | _GL_FUNCDECL_SYS (strtoumax, uintmax_t, | 1119 | _GL_FUNCDECL_SYS (strtoumax, uintmax_t, |
| 1111 | (const char *, char **, int) _GL_ARG_NONNULL ((1))); | 1120 | (const char *, char **, int) _GL_ARG_NONNULL ((1))); |
| 1112 | # endif | 1121 | # endif |
| 1113 | _GL_CXXALIAS_SYS (strtoumax, uintmax_t, (const char *, char **, int)); | 1122 | _GL_CXXALIAS_SYS (strtoumax, uintmax_t, (const char *, char **, int)); |
| 1123 | # endif | ||
| 1114 | _GL_CXXALIASWARN (strtoumax); | 1124 | _GL_CXXALIASWARN (strtoumax); |
| 1115 | #elif defined GNULIB_POSIXCHECK | 1125 | #elif defined GNULIB_POSIXCHECK |
| 1116 | # undef strtoumax | 1126 | # undef strtoumax |
diff --git a/lib/strtoimax.c b/lib/strtoimax.c index c9bd2ad3b1c..b4feaf361f7 100644 --- a/lib/strtoimax.c +++ b/lib/strtoimax.c | |||
| @@ -48,28 +48,31 @@ long long int strtoll (char const *, char **, int); | |||
| 48 | #ifdef UNSIGNED | 48 | #ifdef UNSIGNED |
| 49 | # define Have_long_long HAVE_UNSIGNED_LONG_LONG_INT | 49 | # define Have_long_long HAVE_UNSIGNED_LONG_LONG_INT |
| 50 | # define Int uintmax_t | 50 | # define Int uintmax_t |
| 51 | # define Strtoimax strtoumax | ||
| 52 | # define Strtol strtoul | ||
| 53 | # define Strtoll strtoull | ||
| 51 | # define Unsigned unsigned | 54 | # define Unsigned unsigned |
| 52 | # define strtoimax strtoumax | ||
| 53 | # define strtol strtoul | ||
| 54 | # define strtoll strtoull | ||
| 55 | #else | 55 | #else |
| 56 | # define Have_long_long HAVE_LONG_LONG_INT | 56 | # define Have_long_long HAVE_LONG_LONG_INT |
| 57 | # define Int intmax_t | 57 | # define Int intmax_t |
| 58 | # define Strtoimax strtoimax | ||
| 59 | # define Strtol strtol | ||
| 60 | # define Strtoll strtoll | ||
| 58 | # define Unsigned | 61 | # define Unsigned |
| 59 | #endif | 62 | #endif |
| 60 | 63 | ||
| 61 | Int | 64 | Int |
| 62 | strtoimax (char const *ptr, char **endptr, int base) | 65 | Strtoimax (char const *ptr, char **endptr, int base) |
| 63 | { | 66 | { |
| 64 | #if Have_long_long | 67 | #if Have_long_long |
| 65 | verify (sizeof (Int) == sizeof (Unsigned long int) | 68 | verify (sizeof (Int) == sizeof (Unsigned long int) |
| 66 | || sizeof (Int) == sizeof (Unsigned long long int)); | 69 | || sizeof (Int) == sizeof (Unsigned long long int)); |
| 67 | 70 | ||
| 68 | if (sizeof (Int) != sizeof (Unsigned long int)) | 71 | if (sizeof (Int) != sizeof (Unsigned long int)) |
| 69 | return strtoll (ptr, endptr, base); | 72 | return Strtoll (ptr, endptr, base); |
| 70 | #else | 73 | #else |
| 71 | verify (sizeof (Int) == sizeof (Unsigned long int)); | 74 | verify (sizeof (Int) == sizeof (Unsigned long int)); |
| 72 | #endif | 75 | #endif |
| 73 | 76 | ||
| 74 | return strtol (ptr, endptr, base); | 77 | return Strtol (ptr, endptr, base); |
| 75 | } | 78 | } |
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], | |||
| 348 | gl_FUNC_GNU_STRFTIME | 348 | gl_FUNC_GNU_STRFTIME |
| 349 | gl_HEADER_STRING_H | 349 | gl_HEADER_STRING_H |
| 350 | gl_FUNC_STRTOIMAX | 350 | gl_FUNC_STRTOIMAX |
| 351 | if test $HAVE_STRTOIMAX = 0 || test $REPLACE_STRTOIMAX = 1; then | 351 | if test $HAVE_DECL_STRTOIMAX = 0 || test $REPLACE_STRTOIMAX = 1; then |
| 352 | AC_LIBOBJ([strtoimax]) | 352 | AC_LIBOBJ([strtoimax]) |
| 353 | gl_PREREQ_STRTOIMAX | 353 | gl_PREREQ_STRTOIMAX |
| 354 | fi | 354 | fi |
| 355 | gl_INTTYPES_MODULE_INDICATOR([strtoimax]) | 355 | gl_INTTYPES_MODULE_INDICATOR([strtoimax]) |
| 356 | gl_FUNC_STRTOUMAX | 356 | gl_FUNC_STRTOUMAX |
| 357 | if test $ac_cv_func_strtoumax = no; then | 357 | if test $HAVE_DECL_STRTOUMAX = 0 || test $REPLACE_STRTOUMAX = 1; then |
| 358 | AC_LIBOBJ([strtoumax]) | 358 | AC_LIBOBJ([strtoumax]) |
| 359 | gl_PREREQ_STRTOUMAX | 359 | gl_PREREQ_STRTOUMAX |
| 360 | fi | 360 | fi |
| @@ -622,10 +622,10 @@ AC_DEFUN([gl_INIT], | |||
| 622 | if test $HAVE_READLINKAT = 0; then | 622 | if test $HAVE_READLINKAT = 0; then |
| 623 | func_gl_gnulib_m4code_03e0aaad4cb89ca757653bd367a6ccb7 | 623 | func_gl_gnulib_m4code_03e0aaad4cb89ca757653bd367a6ccb7 |
| 624 | fi | 624 | fi |
| 625 | if { test $HAVE_STRTOIMAX = 0 || test $REPLACE_STRTOIMAX = 1; } && test $ac_cv_type_long_long_int = yes; then | 625 | if { test $HAVE_DECL_STRTOIMAX = 0 || test $REPLACE_STRTOIMAX = 1; } && test $ac_cv_type_long_long_int = yes; then |
| 626 | func_gl_gnulib_m4code_strtoll | 626 | func_gl_gnulib_m4code_strtoll |
| 627 | fi | 627 | fi |
| 628 | if test $ac_cv_func_strtoumax = no && test $ac_cv_type_unsigned_long_long_int = yes; then | 628 | if { test $HAVE_DECL_STRTOUMAX = 0 || test $REPLACE_STRTOUMAX = 1; } && test $ac_cv_type_unsigned_long_long_int = yes; then |
| 629 | func_gl_gnulib_m4code_strtoull | 629 | func_gl_gnulib_m4code_strtoull |
| 630 | fi | 630 | fi |
| 631 | m4_pattern_allow([^gl_GNULIB_ENABLED_]) | 631 | 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], | |||
| 148 | HAVE_DECL_STRTOIMAX=1; AC_SUBST([HAVE_DECL_STRTOIMAX]) | 148 | HAVE_DECL_STRTOIMAX=1; AC_SUBST([HAVE_DECL_STRTOIMAX]) |
| 149 | HAVE_DECL_STRTOUMAX=1; AC_SUBST([HAVE_DECL_STRTOUMAX]) | 149 | HAVE_DECL_STRTOUMAX=1; AC_SUBST([HAVE_DECL_STRTOUMAX]) |
| 150 | REPLACE_STRTOIMAX=0; AC_SUBST([REPLACE_STRTOIMAX]) | 150 | REPLACE_STRTOIMAX=0; AC_SUBST([REPLACE_STRTOIMAX]) |
| 151 | REPLACE_STRTOUMAX=0; AC_SUBST([REPLACE_STRTOUMAX]) | ||
| 151 | INT32_MAX_LT_INTMAX_MAX=1; AC_SUBST([INT32_MAX_LT_INTMAX_MAX]) | 152 | INT32_MAX_LT_INTMAX_MAX=1; AC_SUBST([INT32_MAX_LT_INTMAX_MAX]) |
| 152 | INT64_MAX_EQ_LONG_MAX='defined _LP64'; AC_SUBST([INT64_MAX_EQ_LONG_MAX]) | 153 | INT64_MAX_EQ_LONG_MAX='defined _LP64'; AC_SUBST([INT64_MAX_EQ_LONG_MAX]) |
| 153 | PRI_MACROS_BROKEN=0; AC_SUBST([PRI_MACROS_BROKEN]) | 154 | 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 @@ | |||
| 1 | # strtoimax.m4 serial 13 | 1 | # strtoimax.m4 serial 14 |
| 2 | dnl Copyright (C) 2002-2004, 2006, 2009-2013 Free Software Foundation, Inc. | 2 | dnl Copyright (C) 2002-2004, 2006, 2009-2013 Free Software Foundation, Inc. |
| 3 | dnl This file is free software; the Free Software Foundation | 3 | dnl This file is free software; the Free Software Foundation |
| 4 | dnl gives unlimited permission to copy and/or distribute it, | 4 | dnl gives unlimited permission to copy and/or distribute it, |
| @@ -15,7 +15,7 @@ AC_DEFUN([gl_FUNC_STRTOIMAX], | |||
| 15 | HAVE_DECL_STRTOIMAX=0 | 15 | HAVE_DECL_STRTOIMAX=0 |
| 16 | fi | 16 | fi |
| 17 | 17 | ||
| 18 | if test $ac_cv_func_strtoimax = yes; then | 18 | if test "$ac_cv_func_strtoimax" = yes; then |
| 19 | HAVE_STRTOIMAX=1 | 19 | HAVE_STRTOIMAX=1 |
| 20 | dnl On AIX 5.1, strtoimax() fails for values outside the 'int' range. | 20 | dnl On AIX 5.1, strtoimax() fails for values outside the 'int' range. |
| 21 | AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles | 21 | AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles |
| @@ -72,6 +72,10 @@ int main () | |||
| 72 | *no) REPLACE_STRTOIMAX=1 ;; | 72 | *no) REPLACE_STRTOIMAX=1 ;; |
| 73 | esac | 73 | esac |
| 74 | else | 74 | else |
| 75 | if test "$ac_cv_have_decl_strtoimax" = yes; then | ||
| 76 | # HP-UX 11.11 has "#define strtoimax(...) ..." but no function. | ||
| 77 | REPLACE_STRTOIMAX=1 | ||
| 78 | fi | ||
| 75 | HAVE_STRTOIMAX=0 | 79 | HAVE_STRTOIMAX=0 |
| 76 | fi | 80 | fi |
| 77 | ]) | 81 | ]) |
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 @@ | |||
| 1 | # strtoumax.m4 serial 11 | 1 | # strtoumax.m4 serial 12 |
| 2 | dnl Copyright (C) 2002-2004, 2006, 2009-2013 Free Software Foundation, Inc. | 2 | dnl Copyright (C) 2002-2004, 2006, 2009-2013 Free Software Foundation, Inc. |
| 3 | dnl This file is free software; the Free Software Foundation | 3 | dnl This file is free software; the Free Software Foundation |
| 4 | dnl gives unlimited permission to copy and/or distribute it, | 4 | dnl gives unlimited permission to copy and/or distribute it, |
| @@ -11,7 +11,12 @@ AC_DEFUN([gl_FUNC_STRTOUMAX], | |||
| 11 | dnl On OSF/1 5.1 with cc, this function is declared but not defined. | 11 | dnl On OSF/1 5.1 with cc, this function is declared but not defined. |
| 12 | AC_CHECK_FUNCS_ONCE([strtoumax]) | 12 | AC_CHECK_FUNCS_ONCE([strtoumax]) |
| 13 | AC_CHECK_DECLS_ONCE([strtoumax]) | 13 | AC_CHECK_DECLS_ONCE([strtoumax]) |
| 14 | if test "$ac_cv_have_decl_strtoumax" != yes; then | 14 | if test "$ac_cv_have_decl_strtoumax" = yes; then |
| 15 | if test "$ac_cv_func_strtoumax" != yes; then | ||
| 16 | # HP-UX 11.11 has "#define strtoimax(...) ..." but no function. | ||
| 17 | REPLACE_STRTOUMAX=1 | ||
| 18 | fi | ||
| 19 | else | ||
| 15 | HAVE_DECL_STRTOUMAX=0 | 20 | HAVE_DECL_STRTOUMAX=0 |
| 16 | fi | 21 | fi |
| 17 | ]) | 22 | ]) |