diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2019-02-02 13:13:45 -0800 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2019-02-02 13:15:10 -0800 |
commit | adc31c6bdcdb52c2bc0240982d3e8ce870af1fab (patch) | |
tree | 7019058dda25743b71ebc584351f6fd0e89bca0e /m4 | |
parent | 6f52478e0c42f02cba940c21b18242f05e1ea2a1 (diff) | |
download | emacs-adc31c6bdcdb52c2bc0240982d3e8ce870af1fab.tar.gz |
Update from Gnulib
This incorporates:
2019-02-02 dtoastr, ftoastr, ldtoastr: port to c-strtod changes
2019-02-01 c-strtod, c-strtold: use the bug fixes
2019-01-30 strtold: New module
* doc/misc/texinfo.tex, lib/ftoastr.c, lib/regexec.c, lib/stdlib.in.h:
* m4/stdlib_h.m4:
Copy from Gnulib.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
* m4/c-strtod.m4: Remove.
Diffstat (limited to 'm4')
-rw-r--r-- | m4/c-strtod.m4 | 76 | ||||
-rw-r--r-- | m4/gnulib-comp.m4 | 2 | ||||
-rw-r--r-- | m4/stdlib_h.m4 | 7 |
3 files changed, 5 insertions, 80 deletions
diff --git a/m4/c-strtod.m4 b/m4/c-strtod.m4 deleted file mode 100644 index 1694a2396c5..00000000000 --- a/m4/c-strtod.m4 +++ /dev/null @@ -1,76 +0,0 @@ -# c-strtod.m4 serial 16 - -# Copyright (C) 2004-2006, 2009-2019 Free Software Foundation, Inc. -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# Written by Paul Eggert. - -AC_DEFUN([gl_C99_STRTOLD], -[ - AC_CACHE_CHECK([whether strtold conforms to C99], - [gl_cv_func_c99_strtold], - [AC_LINK_IFELSE( - [AC_LANG_PROGRAM( - [[/* On HP-UX before 11.23, strtold returns a struct instead of - long double. Reject implementations like that, by requiring - compatibility with the C99 prototype. */ - #include <stdlib.h> - static long double (*p) (char const *, char **) = strtold; - static long double - test (char const *nptr, char **endptr) - { - long double r; - r = strtold (nptr, endptr); - return r; - }]], - [[return test ("1.0", NULL) != 1 || p ("1.0", NULL) != 1;]])], - [gl_cv_func_c99_strtold=yes], - [gl_cv_func_c99_strtold=no])]) - if test $gl_cv_func_c99_strtold = yes; then - AC_DEFINE([HAVE_C99_STRTOLD], [1], [Define to 1 if strtold conforms to C99.]) - fi -]) - -dnl Prerequisites of lib/c-strtod.c. -AC_DEFUN([gl_C_STRTOD], -[ - AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) - - AC_CHECK_HEADERS_ONCE([xlocale.h]) - dnl We can't use AC_CHECK_FUNC here, because strtod_l() is defined as a - dnl static inline function when compiling for Android 7.1 or older. - AC_CACHE_CHECK([for strtod_l], [gl_cv_func_strtod_l], - [AC_LINK_IFELSE( - [AC_LANG_PROGRAM( - [[#include <stdlib.h> - #include <locale.h> - #if HAVE_XLOCALE_H - # include <xlocale.h> - #endif - locale_t loc; - ]], - [[char *end; - return strtod_l("0",&end,loc) < 0.0; - ]]) - ], - [gl_cv_func_strtod_l=yes], - [gl_cv_func_strtod_l=no]) - ]) - if test $gl_cv_func_strtod_l = yes; then - HAVE_STRTOD_L=1 - else - HAVE_STRTOD_L=0 - fi - AC_DEFINE_UNQUOTED([HAVE_STRTOD_L], [$HAVE_STRTOD_L], - [Define to 1 if the system has the 'strtod_l' function.]) -]) - -dnl Prerequisites of lib/c-strtold.c. -AC_DEFUN([gl_C_STRTOLD], -[ - AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) - AC_REQUIRE([gl_C99_STRTOLD]) - AC_CHECK_FUNCS([strtold_l]) -]) diff --git a/m4/gnulib-comp.m4 b/m4/gnulib-comp.m4 index a432cc8e541..f25a0e40816 100644 --- a/m4/gnulib-comp.m4 +++ b/m4/gnulib-comp.m4 @@ -209,7 +209,6 @@ AC_DEFUN([gl_INIT], gl_SHA512 gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE gl_DIRENT_H - AC_REQUIRE([gl_C99_STRTOLD]) gl_FUNC_DUP2 if test $HAVE_DUP2 = 0 || test $REPLACE_DUP2 = 1; then AC_LIBOBJ([dup2]) @@ -999,7 +998,6 @@ AC_DEFUN([gl_FILE_LIST], [ m4/alloca.m4 m4/builtin-expect.m4 m4/byteswap.m4 - m4/c-strtod.m4 m4/clock_time.m4 m4/close-stream.m4 m4/count-leading-zeros.m4 diff --git a/m4/stdlib_h.m4 b/m4/stdlib_h.m4 index c5db804e4d6..6121602aea3 100644 --- a/m4/stdlib_h.m4 +++ b/m4/stdlib_h.m4 @@ -1,4 +1,4 @@ -# stdlib_h.m4 serial 47 +# stdlib_h.m4 serial 48 dnl Copyright (C) 2007-2019 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -26,7 +26,7 @@ AC_DEFUN([gl_STDLIB_H], initstate initstate_r mbtowc mkdtemp mkostemp mkostemps mkstemp mkstemps posix_openpt ptsname ptsname_r qsort_r random random_r reallocarray realpath rpmatch secure_getenv setenv setstate setstate_r srandom - srandom_r strtod strtoll strtoull unlockpt unsetenv]) + srandom_r strtod strtold strtoll strtoull unlockpt unsetenv]) ]) AC_DEFUN([gl_STDLIB_MODULE_INDICATOR], @@ -68,6 +68,7 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS], GNULIB_SECURE_GETENV=0; AC_SUBST([GNULIB_SECURE_GETENV]) GNULIB_SETENV=0; AC_SUBST([GNULIB_SETENV]) GNULIB_STRTOD=0; AC_SUBST([GNULIB_STRTOD]) + GNULIB_STRTOLD=0; AC_SUBST([GNULIB_STRTOLD]) GNULIB_STRTOLL=0; AC_SUBST([GNULIB_STRTOLL]) GNULIB_STRTOULL=0; AC_SUBST([GNULIB_STRTOULL]) GNULIB_SYSTEM_POSIX=0; AC_SUBST([GNULIB_SYSTEM_POSIX]) @@ -105,6 +106,7 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS], HAVE_SETSTATE=1; AC_SUBST([HAVE_SETSTATE]) HAVE_DECL_SETSTATE=1; AC_SUBST([HAVE_DECL_SETSTATE]) HAVE_STRTOD=1; AC_SUBST([HAVE_STRTOD]) + HAVE_STRTOLD=1; AC_SUBST([HAVE_STRTOLD]) HAVE_STRTOLL=1; AC_SUBST([HAVE_STRTOLL]) HAVE_STRTOULL=1; AC_SUBST([HAVE_STRTOULL]) HAVE_STRUCT_RANDOM_DATA=1; AC_SUBST([HAVE_STRUCT_RANDOM_DATA]) @@ -128,6 +130,7 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS], REPLACE_SETENV=0; AC_SUBST([REPLACE_SETENV]) REPLACE_SETSTATE=0; AC_SUBST([REPLACE_SETSTATE]) REPLACE_STRTOD=0; AC_SUBST([REPLACE_STRTOD]) + REPLACE_STRTOLD=0; AC_SUBST([REPLACE_STRTOLD]) REPLACE_UNSETENV=0; AC_SUBST([REPLACE_UNSETENV]) REPLACE_WCTOMB=0; AC_SUBST([REPLACE_WCTOMB]) ]) |