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.
This commit is contained in:
parent
6f52478e0c
commit
adc31c6bdc
9 changed files with 54 additions and 94 deletions
|
@ -104,7 +104,6 @@ HAVE_ALLOCA_H
|
|||
HAVE_ALSA
|
||||
HAVE_BDFFONT
|
||||
HAVE_BOXES
|
||||
HAVE_C99_STRTOLD
|
||||
HAVE_CFMAKERAW
|
||||
HAVE_CFSETSPEED
|
||||
HAVE_CLOCK_GETTIME
|
||||
|
|
|
@ -3,10 +3,10 @@
|
|||
% Load plain if necessary, i.e., if running under initex.
|
||||
\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
|
||||
%
|
||||
\def\texinfoversion{2019-01-03-15}
|
||||
\def\texinfoversion{2019-02-01.12}
|
||||
|
||||
%
|
||||
% Copyright 1985, 1986, 1988, 1990-2018 Free Software Foundation, Inc.
|
||||
% Copyright 1985, 1986, 1988, 1990-2019 Free Software Foundation, Inc.
|
||||
%
|
||||
% This texinfo.tex file is free software: you can redistribute it and/or
|
||||
% modify it under the terms of the GNU General Public License as
|
||||
|
@ -7515,7 +7515,7 @@
|
|||
\nonfillstart
|
||||
\tt % easiest (and conventionally used) font for verbatim
|
||||
% The \leavevmode here is for blank lines. Otherwise, we would
|
||||
% never \starttabox and the \egroup would end verbatim mode.
|
||||
% never \starttabbox and the \egroup would end verbatim mode.
|
||||
\def\par{\leavevmode\egroup\box\verbbox\endgraf}%
|
||||
\tabexpand
|
||||
\setupmarkupstyle{verbatim}%
|
||||
|
@ -7578,9 +7578,12 @@
|
|||
{%
|
||||
\makevalueexpandable
|
||||
\setupverbatim
|
||||
\indexnofonts % Allow `@@' and other weird things in file names.
|
||||
\wlog{texinfo.tex: doing @verbatiminclude of #1^^J}%
|
||||
\input #1
|
||||
{%
|
||||
\indexnofonts % Allow `@@' and other weird things in file names.
|
||||
\wlog{texinfo.tex: doing @verbatiminclude of #1^^J}%
|
||||
\edef\tmp{\noexpand\input #1 }
|
||||
\expandafter
|
||||
}\tmp
|
||||
\afterenvbreak
|
||||
}%
|
||||
}
|
||||
|
|
|
@ -40,9 +40,7 @@
|
|||
# define FLOAT_PREC_BOUND _GL_LDBL_PREC_BOUND
|
||||
# define FTOASTR ldtoastr
|
||||
# define PROMOTED_FLOAT long double
|
||||
# if HAVE_C99_STRTOLD
|
||||
# define STRTOF strtold
|
||||
# endif
|
||||
# define STRTOF strtold
|
||||
#elif LENGTH == 2
|
||||
# define FLOAT double
|
||||
# define FLOAT_DIG DBL_DIG
|
||||
|
@ -63,7 +61,7 @@
|
|||
# endif
|
||||
#endif
|
||||
|
||||
/* On pre-C99 hosts, approximate strtof and strtold with strtod. This
|
||||
/* On pre-C99 hosts, approximate strtof with strtod. This
|
||||
may generate one or two extra digits, but that's better than not
|
||||
working at all. */
|
||||
#ifndef STRTOF
|
||||
|
|
|
@ -176,7 +176,6 @@ BUILD_DETAILS = @BUILD_DETAILS@
|
|||
BYTESWAP_H = @BYTESWAP_H@
|
||||
CAIRO_CFLAGS = @CAIRO_CFLAGS@
|
||||
CAIRO_LIBS = @CAIRO_LIBS@
|
||||
CANNOT_DUMP = @CANNOT_DUMP@
|
||||
CC = @CC@
|
||||
CFLAGS = @CFLAGS@
|
||||
CFLAGS_SOUND = @CFLAGS_SOUND@
|
||||
|
@ -432,6 +431,7 @@ GNULIB_STRSTR = @GNULIB_STRSTR@
|
|||
GNULIB_STRTOD = @GNULIB_STRTOD@
|
||||
GNULIB_STRTOIMAX = @GNULIB_STRTOIMAX@
|
||||
GNULIB_STRTOK_R = @GNULIB_STRTOK_R@
|
||||
GNULIB_STRTOLD = @GNULIB_STRTOLD@
|
||||
GNULIB_STRTOLL = @GNULIB_STRTOLL@
|
||||
GNULIB_STRTOULL = @GNULIB_STRTOULL@
|
||||
GNULIB_STRTOUMAX = @GNULIB_STRTOUMAX@
|
||||
|
@ -634,6 +634,7 @@ HAVE_STRPBRK = @HAVE_STRPBRK@
|
|||
HAVE_STRPTIME = @HAVE_STRPTIME@
|
||||
HAVE_STRSEP = @HAVE_STRSEP@
|
||||
HAVE_STRTOD = @HAVE_STRTOD@
|
||||
HAVE_STRTOLD = @HAVE_STRTOLD@
|
||||
HAVE_STRTOLL = @HAVE_STRTOLL@
|
||||
HAVE_STRTOULL = @HAVE_STRTOULL@
|
||||
HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@
|
||||
|
@ -934,6 +935,7 @@ REPLACE_STRSTR = @REPLACE_STRSTR@
|
|||
REPLACE_STRTOD = @REPLACE_STRTOD@
|
||||
REPLACE_STRTOIMAX = @REPLACE_STRTOIMAX@
|
||||
REPLACE_STRTOK_R = @REPLACE_STRTOK_R@
|
||||
REPLACE_STRTOLD = @REPLACE_STRTOLD@
|
||||
REPLACE_STRTOUMAX = @REPLACE_STRTOUMAX@
|
||||
REPLACE_STRUCT_TIMEVAL = @REPLACE_STRUCT_TIMEVAL@
|
||||
REPLACE_SYMLINK = @REPLACE_SYMLINK@
|
||||
|
@ -959,6 +961,7 @@ REPLACE_WRITE = @REPLACE_WRITE@
|
|||
RSVG_CFLAGS = @RSVG_CFLAGS@
|
||||
RSVG_LIBS = @RSVG_LIBS@
|
||||
SEPCHAR = @SEPCHAR@
|
||||
SETFATTR = @SETFATTR@
|
||||
SETTINGS_CFLAGS = @SETTINGS_CFLAGS@
|
||||
SETTINGS_LIBS = @SETTINGS_LIBS@
|
||||
SHELL = @SHELL@
|
||||
|
@ -2546,6 +2549,7 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \
|
|||
-e 's/@''GNULIB_SECURE_GETENV''@/$(GNULIB_SECURE_GETENV)/g' \
|
||||
-e 's/@''GNULIB_SETENV''@/$(GNULIB_SETENV)/g' \
|
||||
-e 's/@''GNULIB_STRTOD''@/$(GNULIB_STRTOD)/g' \
|
||||
-e 's/@''GNULIB_STRTOLD''@/$(GNULIB_STRTOLD)/g' \
|
||||
-e 's/@''GNULIB_STRTOLL''@/$(GNULIB_STRTOLL)/g' \
|
||||
-e 's/@''GNULIB_STRTOULL''@/$(GNULIB_STRTOULL)/g' \
|
||||
-e 's/@''GNULIB_SYSTEM_POSIX''@/$(GNULIB_SYSTEM_POSIX)/g' \
|
||||
|
@ -2582,6 +2586,7 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \
|
|||
-e 's|@''HAVE_SETSTATE''@|$(HAVE_SETSTATE)|g' \
|
||||
-e 's|@''HAVE_DECL_SETSTATE''@|$(HAVE_DECL_SETSTATE)|g' \
|
||||
-e 's|@''HAVE_STRTOD''@|$(HAVE_STRTOD)|g' \
|
||||
-e 's|@''HAVE_STRTOLD''@|$(HAVE_STRTOLD)|g' \
|
||||
-e 's|@''HAVE_STRTOLL''@|$(HAVE_STRTOLL)|g' \
|
||||
-e 's|@''HAVE_STRTOULL''@|$(HAVE_STRTOULL)|g' \
|
||||
-e 's|@''HAVE_STRUCT_RANDOM_DATA''@|$(HAVE_STRUCT_RANDOM_DATA)|g' \
|
||||
|
@ -2605,6 +2610,7 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \
|
|||
-e 's|@''REPLACE_SETENV''@|$(REPLACE_SETENV)|g' \
|
||||
-e 's|@''REPLACE_SETSTATE''@|$(REPLACE_SETSTATE)|g' \
|
||||
-e 's|@''REPLACE_STRTOD''@|$(REPLACE_STRTOD)|g' \
|
||||
-e 's|@''REPLACE_STRTOLD''@|$(REPLACE_STRTOLD)|g' \
|
||||
-e 's|@''REPLACE_UNSETENV''@|$(REPLACE_UNSETENV)|g' \
|
||||
-e 's|@''REPLACE_WCTOMB''@|$(REPLACE_WCTOMB)|g' \
|
||||
-e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
|
||||
|
|
|
@ -1293,8 +1293,10 @@ proceed_next_node (const re_match_context_t *mctx, Idx nregs, regmatch_t *regs,
|
|||
else if (naccepted)
|
||||
{
|
||||
char *buf = (char *) re_string_get_buffer (&mctx->input);
|
||||
if (memcmp (buf + regs[subexp_idx].rm_so, buf + *pidx,
|
||||
naccepted) != 0)
|
||||
if (mctx->input.valid_len - *pidx < naccepted
|
||||
|| (memcmp (buf + regs[subexp_idx].rm_so, buf + *pidx,
|
||||
naccepted)
|
||||
!= 0))
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -929,6 +929,7 @@ _GL_WARN_ON_USE (setenv, "setenv is unportable - "
|
|||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
# define strtod rpl_strtod
|
||||
# endif
|
||||
# define GNULIB_defined_strtod_function 1
|
||||
_GL_FUNCDECL_RPL (strtod, double, (const char *str, char **endp)
|
||||
_GL_ARG_NONNULL ((1)));
|
||||
_GL_CXXALIAS_RPL (strtod, double, (const char *str, char **endp));
|
||||
|
@ -948,6 +949,32 @@ _GL_WARN_ON_USE (strtod, "strtod is unportable - "
|
|||
# endif
|
||||
#endif
|
||||
|
||||
#if @GNULIB_STRTOLD@
|
||||
/* Parse a 'long double' from STRING, updating ENDP if appropriate. */
|
||||
# if @REPLACE_STRTOLD@
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
# define strtold rpl_strtold
|
||||
# endif
|
||||
# define GNULIB_defined_strtold_function 1
|
||||
_GL_FUNCDECL_RPL (strtold, long double, (const char *str, char **endp)
|
||||
_GL_ARG_NONNULL ((1)));
|
||||
_GL_CXXALIAS_RPL (strtold, long double, (const char *str, char **endp));
|
||||
# else
|
||||
# if !@HAVE_STRTOLD@
|
||||
_GL_FUNCDECL_SYS (strtold, long double, (const char *str, char **endp)
|
||||
_GL_ARG_NONNULL ((1)));
|
||||
# endif
|
||||
_GL_CXXALIAS_SYS (strtold, long double, (const char *str, char **endp));
|
||||
# endif
|
||||
_GL_CXXALIASWARN (strtold);
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef strtold
|
||||
# if HAVE_RAW_DECL_STRTOLD
|
||||
_GL_WARN_ON_USE (strtold, "strtold is unportable - "
|
||||
"use gnulib module strtold for portability");
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if @GNULIB_STRTOLL@
|
||||
/* Parse a signed integer whose textual representation starts at STRING.
|
||||
The integer is expected to be in base BASE (2 <= BASE <= 36); if BASE == 0,
|
||||
|
|
|
@ -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])
|
||||
])
|
|
@ -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
|
||||
|
|
|
@ -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])
|
||||
])
|
||||
|
|
Loading…
Add table
Reference in a new issue