[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[7764] run gnulib-tool --add-import
From: |
gavinsmith0123 |
Subject: |
[7764] run gnulib-tool --add-import |
Date: |
Sat, 29 Apr 2017 15:28:12 -0400 (EDT) |
Revision: 7764
http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=7764
Author: gavin
Date: 2017-04-29 15:28:12 -0400 (Sat, 29 Apr 2017)
Log Message:
-----------
run gnulib-tool --add-import
Modified Paths:
--------------
trunk/gnulib/lib/Makefile.am
trunk/gnulib/lib/error.c
trunk/gnulib/lib/getopt-pfx-ext.h
trunk/gnulib/lib/gettext.h
trunk/gnulib/lib/intprops.h
trunk/gnulib/lib/localcharset.c
trunk/gnulib/lib/mbsinit.c
trunk/gnulib/lib/regex_internal.h
trunk/gnulib/lib/vasnprintf.c
trunk/gnulib/lib/wctype.in.h
trunk/gnulib/lib/xalloc.h
trunk/gnulib/m4/getopt.m4
trunk/gnulib/m4/gnulib-comp.m4
trunk/gnulib/m4/printf.m4
trunk/gnulib/m4/wctype_h.m4
trunk/tp/Texinfo/Convert/XSParagraph/lib/vasnprintf.c
trunk/tp/Texinfo/Convert/XSParagraph/m4/printf.m4
Modified: trunk/gnulib/lib/Makefile.am
===================================================================
--- trunk/gnulib/lib/Makefile.am 2017-04-29 18:23:14 UTC (rev 7763)
+++ trunk/gnulib/lib/Makefile.am 2017-04-29 19:28:12 UTC (rev 7764)
@@ -1795,6 +1795,7 @@
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
-e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-e 's|@''NEXT_WCTYPE_H''@|$(NEXT_WCTYPE_H)|g' \
+ -e 's/@''HAVE_CRTDEFS_H''@/$(HAVE_CRTDEFS_H)/g' \
-e 's/@''GNULIB_OVERRIDES_WINT_T''@/$(GNULIB_OVERRIDES_WINT_T)/g'
\
-e 's/@''GNULIB_ISWBLANK''@/$(GNULIB_ISWBLANK)/g' \
-e 's/@''GNULIB_WCTYPE''@/$(GNULIB_WCTYPE)/g' \
Modified: trunk/gnulib/lib/error.c
===================================================================
--- trunk/gnulib/lib/error.c 2017-04-29 18:23:14 UTC (rev 7763)
+++ trunk/gnulib/lib/error.c 2017-04-29 19:28:12 UTC (rev 7764)
@@ -104,22 +104,22 @@
/* The gnulib override of fcntl is not needed in this file. */
# undef fcntl
-# if !HAVE_DECL_STRERROR_R
+# if !(GNULIB_STRERROR_R_POSIX || HAVE_DECL_STRERROR_R)
# ifndef HAVE_DECL_STRERROR_R
"this configure-time declaration test was not run"
# endif
# if STRERROR_R_CHAR_P
-char *strerror_r ();
+char *strerror_r (int errnum, char *buf, size_t buflen);
# else
-int strerror_r ();
+int strerror_r (int errnum, char *buf, size_t buflen);
# endif
# endif
#define program_name getprogname ()
-# if HAVE_STRERROR_R || defined strerror_r
+# if GNULIB_STRERROR_R_POSIX || HAVE_STRERROR_R || defined strerror_r
# define __strerror_r strerror_r
-# endif /* HAVE_STRERROR_R || defined strerror_r */
+# endif /* GNULIB_STRERROR_R_POSIX || HAVE_STRERROR_R || defined strerror_r */
#endif /* not _LIBC */
#if !_LIBC
@@ -172,9 +172,9 @@
{
char const *s;
-#if defined HAVE_STRERROR_R || _LIBC
+#if _LIBC || GNULIB_STRERROR_R_POSIX || defined HAVE_STRERROR_R
char errbuf[1024];
-# if _LIBC || STRERROR_R_CHAR_P
+# if _LIBC || GNULIB_STRERROR_R_POSIX || STRERROR_R_CHAR_P
s = __strerror_r (errnum, errbuf, sizeof errbuf);
# else
if (__strerror_r (errnum, errbuf, sizeof errbuf) == 0)
Modified: trunk/gnulib/lib/getopt-pfx-ext.h
===================================================================
--- trunk/gnulib/lib/getopt-pfx-ext.h 2017-04-29 18:23:14 UTC (rev 7763)
+++ trunk/gnulib/lib/getopt-pfx-ext.h 2017-04-29 19:28:12 UTC (rev 7764)
@@ -40,9 +40,11 @@
# undef getopt_long
# undef getopt_long_only
# undef option
+# undef _getopt_internal
# define getopt_long __GETOPT_ID (getopt_long)
# define getopt_long_only __GETOPT_ID (getopt_long_only)
# define option __GETOPT_ID (option)
+# define _getopt_internal __GETOPT_ID (getopt_internal)
#endif
/* Standalone applications get correct prototypes for getopt_long and
Modified: trunk/gnulib/lib/gettext.h
===================================================================
--- trunk/gnulib/lib/gettext.h 2017-04-29 18:23:14 UTC (rev 7763)
+++ trunk/gnulib/lib/gettext.h 2017-04-29 19:28:12 UTC (rev 7764)
@@ -18,8 +18,9 @@
#ifndef _LIBGETTEXT_H
#define _LIBGETTEXT_H 1
-/* NLS can be disabled through the configure --disable-nls option. */
-#if ENABLE_NLS
+/* NLS can be disabled through the configure --disable-nls option
+ or through "#define ENABLE NLS 0" before including this file. */
+#if defined ENABLE_NLS && ENABLE_NLS
/* Get declarations of GNU message catalog functions. */
# include <libintl.h>
Modified: trunk/gnulib/lib/intprops.h
===================================================================
--- trunk/gnulib/lib/intprops.h 2017-04-29 18:23:14 UTC (rev 7763)
+++ trunk/gnulib/lib/intprops.h 2017-04-29 19:28:12 UTC (rev 7764)
@@ -444,30 +444,23 @@
? (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a, b, op, ut, t), 1) \
: (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a, b, op, ut, t), 0))
-/* Return A <op> B, where the operation is given by OP. Return the
- low-order bits of the mathematically-correct answer. Use the
- unsigned type UT for calculation to avoid undefined behavior on
- signed integer overflow. Assume that conversion to the result type
- T yields the low-order bits in the usual way. UT is at least as
- wide as T and is no narrower than unsigned int, T is two's
- complement, and there is no padding or trap representations.
+/* Return the low-order bits of A <op> B, where the operation is given
+ by OP. Use the unsigned type UT for calculation to avoid undefined
+ behavior on signed integer overflow, and convert the result to type T.
+ UT is at least as wide as T and is no narrower than unsigned int,
+ T is two's complement, and there is no padding or trap representations.
+ Assume that converting UT to T yields the low-order bits, as is
+ done in all known two's-complement C compilers. E.g., see:
+ https://gcc.gnu.org/onlinedocs/gcc/Integers-implementation.html
According to the C standard, converting UT to T yields an
- implementation-defined result or signal for values outside T's range.
- So, the standard way to convert UT to T is to subtract TMIN from
- greater-than-TMAX values before converting them to T, and to add
- TMIN afterwards, where TMIN and TMAX are T's extrema.
- However, in practice there is no need to subtract and add TMIN.
- E.g., GCC converts to signed integers in the usual way; see:
- https://gcc.gnu.org/onlinedocs/gcc/Integers-implementation.html
- All other known C compilers are similar to GCC in this respect.
- Furthermore, Oracle Studio 12.3 x86 has a bug when implementing the
- standard way; see:
+ implementation-defined result or signal for values outside T's
+ range. However, code that works around this theoretical problem
+ runs afoul of a compiler bug in Oracle Studio 12.3 x86. See:
http://lists.gnu.org/archive/html/bug-gnulib/2017-04/msg00049.html
+ As the compiler bug is real, don't try to work around the
+ theoretical problem. */
- So, implement this operation in the usual way rather than in
- the standard way. */
-
#define _GL_INT_OP_WRAPV_VIA_UNSIGNED(a, b, op, ut, t) \
((t) ((ut) (a) op (ut) (b)))
Modified: trunk/gnulib/lib/localcharset.c
===================================================================
--- trunk/gnulib/lib/localcharset.c 2017-04-29 18:23:14 UTC (rev 7763)
+++ trunk/gnulib/lib/localcharset.c 2017-04-29 19:28:12 UTC (rev 7764)
@@ -32,7 +32,7 @@
# define DARWIN7 /* Darwin 7 or newer, i.e. Mac OS X 10.3 or newer */
#endif
-#if defined _WIN32 || defined __WIN32__
+#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
# define WINDOWS_NATIVE
# include <locale.h>
#endif
Modified: trunk/gnulib/lib/mbsinit.c
===================================================================
--- trunk/gnulib/lib/mbsinit.c 2017-04-29 18:23:14 UTC (rev 7763)
+++ trunk/gnulib/lib/mbsinit.c 2017-04-29 19:28:12 UTC (rev 7764)
@@ -22,18 +22,8 @@
#include "verify.h"
-#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
+#if GNULIB_defined_mbstate_t
-/* On native Windows, 'mbstate_t' is defined as 'int'. */
-
-int
-mbsinit (const mbstate_t *ps)
-{
- return ps == NULL || *ps == 0;
-}
-
-#else
-
/* Platforms that lack mbsinit() also lack mbrlen(), mbrtowc(), mbsrtowcs()
and wcrtomb(), wcsrtombs().
We assume that
@@ -45,6 +35,7 @@
We define the meaning of mbstate_t as follows:
- In mb -> wc direction, mbstate_t's first byte contains the number of
buffered bytes (in the range 0..3), followed by up to 3 buffered bytes.
+ See mbrtowc.c.
- In wc -> mb direction, mbstate_t contains no information. In other
words, it is always in the initial state. */
@@ -58,4 +49,25 @@
return pstate == NULL || pstate[0] == 0;
}
+#else
+
+int
+mbsinit (const mbstate_t *ps)
+{
+# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
+ /* Native Windows. */
+# ifdef __MINGW32__
+ /* On mingw, 'mbstate_t' is defined as 'int'. */
+ return ps == NULL || *ps == 0;
+# else
+ /* MSVC defines 'mbstate_t' as an 8-byte struct; the first 4-bytes matter.
*/
+ return ps == NULL || *(const unsigned int *)ps == 0;
+# endif
+# else
+ /* Minix, HP-UX 11.00, Solaris 2.6, Interix, ... */
+ /* Maybe this definition works, maybe not... */
+ return ps == NULL || *(const char *)ps == 0;
+# endif
+}
+
#endif
Modified: trunk/gnulib/lib/regex_internal.h
===================================================================
--- trunk/gnulib/lib/regex_internal.h 2017-04-29 18:23:14 UTC (rev 7763)
+++ trunk/gnulib/lib/regex_internal.h 2017-04-29 19:28:12 UTC (rev 7764)
@@ -102,6 +102,7 @@
__dcgettext (_libc_intl_domainname, msgid, LC_MESSAGES)
# endif
#else
+# undef gettext
# define gettext(msgid) (msgid)
#endif
Modified: trunk/gnulib/lib/vasnprintf.c
===================================================================
--- trunk/gnulib/lib/vasnprintf.c 2017-04-29 18:23:14 UTC (rev 7763)
+++ trunk/gnulib/lib/vasnprintf.c 2017-04-29 19:28:12 UTC (rev 7764)
@@ -156,6 +156,7 @@
# define SNPRINTF snwprintf
# else
# define SNPRINTF _snwprintf
+# define USE_MSVC__SNPRINTF 1
# endif
# else
/* Unix. */
@@ -181,7 +182,9 @@
/* Here we need to call the native snprintf, not rpl_snprintf. */
# undef snprintf
# else
+ /* MSVC versions < 14 did not have snprintf, only _snprintf. */
# define SNPRINTF _snprintf
+# define USE_MSVC__SNPRINTF 1
# endif
# else
/* Unix. */
@@ -208,7 +211,7 @@
#undef remainder
#define remainder rem
-#if (!USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99) && !WIDE_CHAR_VERSION
+#if (!USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF) &&
!WIDE_CHAR_VERSION
# if (HAVE_STRNLEN && !defined _AIX)
# define local_strnlen strnlen
# else
@@ -224,7 +227,7 @@
# endif
#endif
-#if (((!USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99) && WIDE_CHAR_VERSION) ||
((!USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || (NEED_PRINTF_DIRECTIVE_LS &&
!defined IN_LIBINTL)) && !WIDE_CHAR_VERSION && DCHAR_IS_TCHAR)) && HAVE_WCHAR_T
+#if (((!USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF) &&
WIDE_CHAR_VERSION) || ((!USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 ||
USE_MSVC__SNPRINTF || (NEED_PRINTF_DIRECTIVE_LS && !defined IN_LIBINTL)) &&
!WIDE_CHAR_VERSION && DCHAR_IS_TCHAR)) && HAVE_WCHAR_T
# if HAVE_WCSLEN
# define local_wcslen wcslen
# else
@@ -247,7 +250,7 @@
# endif
#endif
-#if (!USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99) && HAVE_WCHAR_T &&
WIDE_CHAR_VERSION
+#if (!USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF) &&
HAVE_WCHAR_T && WIDE_CHAR_VERSION
# if HAVE_WCSNLEN
# define local_wcsnlen wcsnlen
# else
@@ -1517,7 +1520,7 @@
#endif
-#if !USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99
+#if !USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF
/* Use a different function name, to make it possible that the 'wchar_t'
parametrization and the 'char' parametrization get compiled in the same
@@ -2392,7 +2395,7 @@
}
}
#endif
-#if (!USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || (NEED_PRINTF_DIRECTIVE_LS
&& !defined IN_LIBINTL)) && HAVE_WCHAR_T
+#if (!USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF ||
(NEED_PRINTF_DIRECTIVE_LS && !defined IN_LIBINTL)) && HAVE_WCHAR_T
else if (dp->conversion == 's'
# if WIDE_CHAR_VERSION
&& a.arg[dp->arg_index].type != TYPE_WIDE_STRING
@@ -4591,10 +4594,10 @@
#if !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_LEFTADJUST ||
NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION
int has_width;
#endif
-#if !USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || !DCHAR_IS_TCHAR ||
ENABLE_UNISTDIO || NEED_PRINTF_FLAG_LEFTADJUST || NEED_PRINTF_FLAG_ZERO ||
NEED_PRINTF_UNBOUNDED_PRECISION
+#if !USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF ||
!DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_LEFTADJUST ||
NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION
size_t width;
#endif
-#if !USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 ||
NEED_PRINTF_UNBOUNDED_PRECISION
+#if !USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF ||
NEED_PRINTF_UNBOUNDED_PRECISION
int has_precision;
size_t precision;
#endif
@@ -4623,7 +4626,7 @@
#if !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_LEFTADJUST ||
NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION
has_width = 0;
#endif
-#if !USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || !DCHAR_IS_TCHAR ||
ENABLE_UNISTDIO || NEED_PRINTF_FLAG_LEFTADJUST || NEED_PRINTF_FLAG_ZERO ||
NEED_PRINTF_UNBOUNDED_PRECISION
+#if !USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF ||
!DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_LEFTADJUST ||
NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION
width = 0;
if (dp->width_start != dp->width_end)
{
@@ -4657,7 +4660,7 @@
}
#endif
-#if !USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 ||
NEED_PRINTF_UNBOUNDED_PRECISION
+#if !USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF ||
NEED_PRINTF_UNBOUNDED_PRECISION
has_precision = 0;
precision = 6;
if (dp->precision_start != dp->precision_end)
@@ -5127,7 +5130,7 @@
/* Look at the snprintf() return value. */
if (retcount < 0)
{
-# if !HAVE_SNPRINTF_RETVAL_C99
+# if !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF
/* HP-UX 10.20 snprintf() is doubly deficient:
It doesn't understand the '%n' directive,
*and* it returns -1 (rather than the length
Modified: trunk/gnulib/lib/wctype.in.h
===================================================================
--- trunk/gnulib/lib/wctype.in.h 2017-04-29 18:23:14 UTC (rev 7763)
+++ trunk/gnulib/lib/wctype.in.h 2017-04-29 19:28:12 UTC (rev 7764)
@@ -105,12 +105,16 @@
# define WEOF -1
# endif
#else
-/* mingw and MSVC define wint_t as 'unsigned short' in <crtdefs.h>.
- This is too small: ISO C 99 section 7.24.1.(2) says that wint_t must be
- "unchanged by default argument promotions". Override it. */
+/* mingw and MSVC define wint_t as 'unsigned short' in <crtdefs.h> or
+ <stddef.h>. This is too small: ISO C 99 section 7.24.1.(2) says that
+ wint_t must be "unchanged by default argument promotions". Override it. */
# if @GNULIB_OVERRIDES_WINT_T@
# if !GNULIB_defined_wint_t
-# include <crtdefs.h>
+# if @HAVE_CRTDEFS_H@
+# include <crtdefs.h>
+# else
+# include <stddef.h>
+# endif
typedef unsigned int rpl_wint_t;
# undef wint_t
# define wint_t rpl_wint_t
Modified: trunk/gnulib/lib/xalloc.h
===================================================================
--- trunk/gnulib/lib/xalloc.h 2017-04-29 18:23:14 UTC (rev 7763)
+++ trunk/gnulib/lib/xalloc.h 2017-04-29 19:28:12 UTC (rev 7764)
@@ -194,6 +194,8 @@
n = DEFAULT_MXFAST / s;
n += !n;
}
+ if (xalloc_oversized (n, s))
+ xalloc_die ();
}
else
{
Modified: trunk/gnulib/m4/getopt.m4
===================================================================
--- trunk/gnulib/m4/getopt.m4 2017-04-29 18:23:14 UTC (rev 7763)
+++ trunk/gnulib/m4/getopt.m4 2017-04-29 19:28:12 UTC (rev 7764)
@@ -32,7 +32,16 @@
# getopt_long_only.
AC_DEFUN([gl_FUNC_GETOPT_GNU],
[
+ dnl Set the variable gl_getopt_required, so that all invocations of
+ dnl gl_GETOPT_CHECK_HEADERS in the scope of the current configure file
+ dnl will check for getopt with GNU extensions.
+ dnl This means that if one gnulib-tool invocation requests getopt-posix
+ dnl and another gnulib-tool invocation requests getopt-gnu, it is as if
+ dnl both had requested getopt-gnu.
m4_divert_text([INIT_PREPARE], [gl_getopt_required=GNU])
+
+ dnl No need to invoke gl_FUNC_GETOPT_POSIX here; this is automatically
+ dnl done through the module dependency getopt-gnu -> getopt-posix.
])
# Determine whether to replace the entire getopt facility.
Modified: trunk/gnulib/m4/gnulib-comp.m4
===================================================================
--- trunk/gnulib/m4/gnulib-comp.m4 2017-04-29 18:23:14 UTC (rev 7763)
+++ trunk/gnulib/m4/gnulib-comp.m4 2017-04-29 19:28:12 UTC (rev 7764)
@@ -191,6 +191,9 @@
AC_LIBOBJ([itold])
fi
gl_FUNC_GETOPT_GNU
+ dnl Because of the way gl_FUNC_GETOPT_GNU is implemented (the
gl_getopt_required
+ dnl mechanism), there is no need to do any AC_LIBOBJ or AC_SUBST here; they
are
+ dnl done in the getopt-posix module.
gl_FUNC_GETOPT_POSIX
if test $REPLACE_GETOPT = 1; then
AC_LIBOBJ([getopt])
Modified: trunk/gnulib/m4/printf.m4
===================================================================
--- trunk/gnulib/m4/printf.m4 2017-04-29 18:23:14 UTC (rev 7763)
+++ trunk/gnulib/m4/printf.m4 2017-04-29 19:28:12 UTC (rev 7764)
@@ -1,4 +1,4 @@
-# printf.m4 serial 52
+# printf.m4 serial 53
dnl Copyright (C) 2003, 2007-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -489,6 +489,13 @@
&& strcmp (buf, "0x6.0ap-2 33") != 0
&& strcmp (buf, "0xc.14p-3 33") != 0))
result |= 4;
+ /* This catches a Mac OS X 10.12.4 (Darwin 16.5) bug: it doesn't round. */
+ if (sprintf (buf, "%.0a %d", 1.51, 33, 44, 55) < 0
+ || (strcmp (buf, "0x2p+0 33") != 0
+ && strcmp (buf, "0x3p-1 33") != 0
+ && strcmp (buf, "0x6p-2 33") != 0
+ && strcmp (buf, "0xcp-3 33") != 0))
+ result |= 4;
/* This catches a FreeBSD 6.1 bug. See
<http://lists.gnu.org/archive/html/bug-gnulib/2007-04/msg00107.html> */
if (sprintf (buf, "%010a %d", 1.0 / zero, 33, 44, 55) < 0
Modified: trunk/gnulib/m4/wctype_h.m4
===================================================================
--- trunk/gnulib/m4/wctype_h.m4 2017-04-29 18:23:14 UTC (rev 7763)
+++ trunk/gnulib/m4/wctype_h.m4 2017-04-29 19:28:12 UTC (rev 7764)
@@ -1,4 +1,4 @@
-# wctype_h.m4 serial 18
+# wctype_h.m4 serial 19
dnl A placeholder for ISO C99 <wctype.h>, for platforms that lack it.
@@ -66,6 +66,14 @@
fi
AC_SUBST([HAVE_WCTYPE_H])
+ AC_CHECK_HEADERS_ONCE([crtdefs.h])
+ if test $ac_cv_header_crtdefs_h = yes; then
+ HAVE_CRTDEFS_H=1
+ else
+ HAVE_CRTDEFS_H=0
+ fi
+ AC_SUBST([HAVE_CRTDEFS_H])
+
case "$gl_cv_func_iswcntrl_works" in
*yes) REPLACE_ISWCNTRL=0 ;;
*) REPLACE_ISWCNTRL=1 ;;
Modified: trunk/tp/Texinfo/Convert/XSParagraph/lib/vasnprintf.c
===================================================================
--- trunk/tp/Texinfo/Convert/XSParagraph/lib/vasnprintf.c 2017-04-29
18:23:14 UTC (rev 7763)
+++ trunk/tp/Texinfo/Convert/XSParagraph/lib/vasnprintf.c 2017-04-29
19:28:12 UTC (rev 7764)
@@ -156,6 +156,7 @@
# define SNPRINTF snwprintf
# else
# define SNPRINTF _snwprintf
+# define USE_MSVC__SNPRINTF 1
# endif
# else
/* Unix. */
@@ -181,7 +182,9 @@
/* Here we need to call the native snprintf, not rpl_snprintf. */
# undef snprintf
# else
+ /* MSVC versions < 14 did not have snprintf, only _snprintf. */
# define SNPRINTF _snprintf
+# define USE_MSVC__SNPRINTF 1
# endif
# else
/* Unix. */
@@ -208,7 +211,7 @@
#undef remainder
#define remainder rem
-#if (!USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99) && !WIDE_CHAR_VERSION
+#if (!USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF) &&
!WIDE_CHAR_VERSION
# if (HAVE_STRNLEN && !defined _AIX)
# define local_strnlen strnlen
# else
@@ -224,7 +227,7 @@
# endif
#endif
-#if (((!USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99) && WIDE_CHAR_VERSION) ||
((!USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || (NEED_PRINTF_DIRECTIVE_LS &&
!defined IN_LIBINTL)) && !WIDE_CHAR_VERSION && DCHAR_IS_TCHAR)) && HAVE_WCHAR_T
+#if (((!USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF) &&
WIDE_CHAR_VERSION) || ((!USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 ||
USE_MSVC__SNPRINTF || (NEED_PRINTF_DIRECTIVE_LS && !defined IN_LIBINTL)) &&
!WIDE_CHAR_VERSION && DCHAR_IS_TCHAR)) && HAVE_WCHAR_T
# if HAVE_WCSLEN
# define local_wcslen wcslen
# else
@@ -247,7 +250,7 @@
# endif
#endif
-#if (!USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99) && HAVE_WCHAR_T &&
WIDE_CHAR_VERSION
+#if (!USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF) &&
HAVE_WCHAR_T && WIDE_CHAR_VERSION
# if HAVE_WCSNLEN
# define local_wcsnlen wcsnlen
# else
@@ -1517,7 +1520,7 @@
#endif
-#if !USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99
+#if !USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF
/* Use a different function name, to make it possible that the 'wchar_t'
parametrization and the 'char' parametrization get compiled in the same
@@ -2392,7 +2395,7 @@
}
}
#endif
-#if (!USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || (NEED_PRINTF_DIRECTIVE_LS
&& !defined IN_LIBINTL)) && HAVE_WCHAR_T
+#if (!USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF ||
(NEED_PRINTF_DIRECTIVE_LS && !defined IN_LIBINTL)) && HAVE_WCHAR_T
else if (dp->conversion == 's'
# if WIDE_CHAR_VERSION
&& a.arg[dp->arg_index].type != TYPE_WIDE_STRING
@@ -4591,10 +4594,10 @@
#if !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_LEFTADJUST ||
NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION
int has_width;
#endif
-#if !USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || !DCHAR_IS_TCHAR ||
ENABLE_UNISTDIO || NEED_PRINTF_FLAG_LEFTADJUST || NEED_PRINTF_FLAG_ZERO ||
NEED_PRINTF_UNBOUNDED_PRECISION
+#if !USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF ||
!DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_LEFTADJUST ||
NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION
size_t width;
#endif
-#if !USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 ||
NEED_PRINTF_UNBOUNDED_PRECISION
+#if !USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF ||
NEED_PRINTF_UNBOUNDED_PRECISION
int has_precision;
size_t precision;
#endif
@@ -4623,7 +4626,7 @@
#if !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_LEFTADJUST ||
NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION
has_width = 0;
#endif
-#if !USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || !DCHAR_IS_TCHAR ||
ENABLE_UNISTDIO || NEED_PRINTF_FLAG_LEFTADJUST || NEED_PRINTF_FLAG_ZERO ||
NEED_PRINTF_UNBOUNDED_PRECISION
+#if !USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF ||
!DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_LEFTADJUST ||
NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION
width = 0;
if (dp->width_start != dp->width_end)
{
@@ -4657,7 +4660,7 @@
}
#endif
-#if !USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 ||
NEED_PRINTF_UNBOUNDED_PRECISION
+#if !USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF ||
NEED_PRINTF_UNBOUNDED_PRECISION
has_precision = 0;
precision = 6;
if (dp->precision_start != dp->precision_end)
@@ -5127,7 +5130,7 @@
/* Look at the snprintf() return value. */
if (retcount < 0)
{
-# if !HAVE_SNPRINTF_RETVAL_C99
+# if !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF
/* HP-UX 10.20 snprintf() is doubly deficient:
It doesn't understand the '%n' directive,
*and* it returns -1 (rather than the length
Modified: trunk/tp/Texinfo/Convert/XSParagraph/m4/printf.m4
===================================================================
--- trunk/tp/Texinfo/Convert/XSParagraph/m4/printf.m4 2017-04-29 18:23:14 UTC
(rev 7763)
+++ trunk/tp/Texinfo/Convert/XSParagraph/m4/printf.m4 2017-04-29 19:28:12 UTC
(rev 7764)
@@ -1,4 +1,4 @@
-# printf.m4 serial 52
+# printf.m4 serial 53
dnl Copyright (C) 2003, 2007-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -489,6 +489,13 @@
&& strcmp (buf, "0x6.0ap-2 33") != 0
&& strcmp (buf, "0xc.14p-3 33") != 0))
result |= 4;
+ /* This catches a Mac OS X 10.12.4 (Darwin 16.5) bug: it doesn't round. */
+ if (sprintf (buf, "%.0a %d", 1.51, 33, 44, 55) < 0
+ || (strcmp (buf, "0x2p+0 33") != 0
+ && strcmp (buf, "0x3p-1 33") != 0
+ && strcmp (buf, "0x6p-2 33") != 0
+ && strcmp (buf, "0xcp-3 33") != 0))
+ result |= 4;
/* This catches a FreeBSD 6.1 bug. See
<http://lists.gnu.org/archive/html/bug-gnulib/2007-04/msg00107.html> */
if (sprintf (buf, "%010a %d", 1.0 / zero, 33, 44, 55) < 0
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [7764] run gnulib-tool --add-import,
gavinsmith0123 <=