Commit b81a1837 authored by Paul Eggert's avatar Paul Eggert

Merge from gnulib

2014-12-12 stddef: support C11's max_align_t
2014-12-08 apply _GL_ATTRIBUTE_PURE to some inline functions
2014-12-02 support GNU format printf and scanf on mingw
* doc/misc/texinfo.tex, lib/stat-time.h, lib/stddef.in.h:
* lib/timespec.h, m4/extensions.m4, m4/stddef_h.m4, m4/stdio_h.m4:
Update from gnulib.
* lib/gnulib.mk: Regenerate.
parent 074965f9
2014-12-12 Paul Eggert <eggert@cs.ucla.edu>
Merge from gnulib
2014-12-12 stddef: support C11's max_align_t
2014-12-08 apply _GL_ATTRIBUTE_PURE to some inline functions
2014-12-02 support GNU format printf and scanf on mingw
* doc/misc/texinfo.tex, lib/stat-time.h, lib/stddef.in.h:
* lib/timespec.h, m4/extensions.m4, m4/stddef_h.m4, m4/stdio_h.m4:
Update from gnulib.
* lib/gnulib.mk: Regenerate.
2014-12-06 Stephen Leake <stephen_leake@stephe-leake.org> 2014-12-06 Stephen Leake <stephen_leake@stephe-leake.org>
* CONTRIBUTE: Improve; add explicit web references, move some info * CONTRIBUTE: Improve; add explicit web references, move some info
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
% Load plain if necessary, i.e., if running under initex. % Load plain if necessary, i.e., if running under initex.
\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
% %
\def\texinfoversion{2014-10-29.10} \def\texinfoversion{2014-11-14.07}
% %
% Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, % Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
...@@ -1010,24 +1010,15 @@ ...@@ -1010,24 +1010,15 @@
% paragraph. % paragraph.
% %
\gdef\dosuppressfirstparagraphindent{% \gdef\dosuppressfirstparagraphindent{%
\gdef\indent{% \gdef\indent {\restorefirstparagraphindent \indent}%
\restorefirstparagraphindent \gdef\noindent{\restorefirstparagraphindent \noindent}%
\indent \global\everypar = {\kern -\parindent \restorefirstparagraphindent}%
}%
\gdef\noindent{%
\restorefirstparagraphindent
\noindent
}%
\global\everypar = {%
\kern -\parindent
\restorefirstparagraphindent
}%
} }
%
\gdef\restorefirstparagraphindent{% \gdef\restorefirstparagraphindent{%
\global \let \indent = \ptexindent \global\let\indent = \ptexindent
\global \let \noindent = \ptexnoindent \global\let\noindent = \ptexnoindent
\global \everypar = {}% \global\everypar = {}%
} }
...@@ -5801,6 +5792,7 @@ ...@@ -5801,6 +5792,7 @@
% %
{% {%
\chapfonts \rmisbold \chapfonts \rmisbold
\let\footnote=\errfootnoteheading % give better error message
% %
% Have to define \lastsection before calling \donoderef, because the % Have to define \lastsection before calling \donoderef, because the
% xref code eventually uses it. On the other hand, it has to be called % xref code eventually uses it. On the other hand, it has to be called
...@@ -5912,6 +5904,7 @@ ...@@ -5912,6 +5904,7 @@
\ifx\temptype\Yomitfromtockeyword\else \ifx\temptype\Yomitfromtockeyword\else
\checkenv{}% non-@*heading should not be in an environment. \checkenv{}% non-@*heading should not be in an environment.
\fi \fi
\let\footnote=\errfootnoteheading
% %
% Switch to the right set of fonts. % Switch to the right set of fonts.
\csname #2fonts\endcsname \rmisbold \csname #2fonts\endcsname \rmisbold
...@@ -8368,9 +8361,6 @@ ...@@ -8368,9 +8361,6 @@
% %
% Auto-number footnotes. Otherwise like plain. % Auto-number footnotes. Otherwise like plain.
\gdef\footnote{% \gdef\footnote{%
\let\indent=\ptexindent
\let\noindent=\ptexnoindent
%
\global\advance\footnoteno by \@ne \global\advance\footnoteno by \@ne
\edef\thisfootno{$^{\the\footnoteno}$}% \edef\thisfootno{$^{\the\footnoteno}$}%
% %
...@@ -8397,7 +8387,7 @@ ...@@ -8397,7 +8387,7 @@
% %
% Nested footnotes are not supported in TeX, that would take a lot % Nested footnotes are not supported in TeX, that would take a lot
% more work. (\startsavinginserts does not suffice.) % more work. (\startsavinginserts does not suffice.)
\let\footnote=\errfootnote \let\footnote=\errfootnotenest
% %
% We want to typeset this text as a normal paragraph, even if the % We want to typeset this text as a normal paragraph, even if the
% footnote reference occurs in (for example) a display environment. % footnote reference occurs in (for example) a display environment.
...@@ -8436,12 +8426,17 @@ ...@@ -8436,12 +8426,17 @@
} }
}%end \catcode `\@=11 }%end \catcode `\@=11
\def\errfootnote{% \def\errfootnotenest{%
\errhelp=\EMsimple \errhelp=\EMsimple
\errmessage{Nested footnotes not supported in texinfo.tex, \errmessage{Nested footnotes not supported in texinfo.tex,
even though they work in makeinfo; sorry} even though they work in makeinfo; sorry}
} }
\def\errfootnoteheading{%
\errhelp=\EMsimple
\errmessage{Footnotes in chapters, sections, etc., are not supported}
}
% In case a @footnote appears in a vbox, save the footnote text and create % In case a @footnote appears in a vbox, save the footnote text and create
% the real \insert just after the vbox finished. Otherwise, the insertion % the real \insert just after the vbox finished. Otherwise, the insertion
% would be lost. % would be lost.
......
...@@ -915,6 +915,7 @@ stddef.h: stddef.in.h $(top_builddir)/config.status ...@@ -915,6 +915,7 @@ stddef.h: stddef.in.h $(top_builddir)/config.status
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
-e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-e 's|@''NEXT_STDDEF_H''@|$(NEXT_STDDEF_H)|g' \ -e 's|@''NEXT_STDDEF_H''@|$(NEXT_STDDEF_H)|g' \
-e 's|@''HAVE_MAX_ALIGN_T''@|$(HAVE_MAX_ALIGN_T)|g' \
-e 's|@''HAVE_WCHAR_T''@|$(HAVE_WCHAR_T)|g' \ -e 's|@''HAVE_WCHAR_T''@|$(HAVE_WCHAR_T)|g' \
-e 's|@''REPLACE_NULL''@|$(REPLACE_NULL)|g' \ -e 's|@''REPLACE_NULL''@|$(REPLACE_NULL)|g' \
< $(srcdir)/stddef.in.h; \ < $(srcdir)/stddef.in.h; \
......
...@@ -54,7 +54,7 @@ _GL_INLINE_HEADER_BEGIN ...@@ -54,7 +54,7 @@ _GL_INLINE_HEADER_BEGIN
#endif #endif
/* Return the nanosecond component of *ST's access time. */ /* Return the nanosecond component of *ST's access time. */
_GL_STAT_TIME_INLINE long int _GL_STAT_TIME_INLINE long int _GL_ATTRIBUTE_PURE
get_stat_atime_ns (struct stat const *st) get_stat_atime_ns (struct stat const *st)
{ {
# if defined STAT_TIMESPEC # if defined STAT_TIMESPEC
...@@ -67,7 +67,7 @@ get_stat_atime_ns (struct stat const *st) ...@@ -67,7 +67,7 @@ get_stat_atime_ns (struct stat const *st)
} }
/* Return the nanosecond component of *ST's status change time. */ /* Return the nanosecond component of *ST's status change time. */
_GL_STAT_TIME_INLINE long int _GL_STAT_TIME_INLINE long int _GL_ATTRIBUTE_PURE
get_stat_ctime_ns (struct stat const *st) get_stat_ctime_ns (struct stat const *st)
{ {
# if defined STAT_TIMESPEC # if defined STAT_TIMESPEC
...@@ -80,7 +80,7 @@ get_stat_ctime_ns (struct stat const *st) ...@@ -80,7 +80,7 @@ get_stat_ctime_ns (struct stat const *st)
} }
/* Return the nanosecond component of *ST's data modification time. */ /* Return the nanosecond component of *ST's data modification time. */
_GL_STAT_TIME_INLINE long int _GL_STAT_TIME_INLINE long int _GL_ATTRIBUTE_PURE
get_stat_mtime_ns (struct stat const *st) get_stat_mtime_ns (struct stat const *st)
{ {
# if defined STAT_TIMESPEC # if defined STAT_TIMESPEC
...@@ -93,7 +93,7 @@ get_stat_mtime_ns (struct stat const *st) ...@@ -93,7 +93,7 @@ get_stat_mtime_ns (struct stat const *st)
} }
/* Return the nanosecond component of *ST's birth time. */ /* Return the nanosecond component of *ST's birth time. */
_GL_STAT_TIME_INLINE long int _GL_STAT_TIME_INLINE long int _GL_ATTRIBUTE_PURE
get_stat_birthtime_ns (struct stat const *st) get_stat_birthtime_ns (struct stat const *st)
{ {
# if defined HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC # if defined HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC
...@@ -108,7 +108,7 @@ get_stat_birthtime_ns (struct stat const *st) ...@@ -108,7 +108,7 @@ get_stat_birthtime_ns (struct stat const *st)
} }
/* Return *ST's access time. */ /* Return *ST's access time. */
_GL_STAT_TIME_INLINE struct timespec _GL_STAT_TIME_INLINE struct timespec _GL_ATTRIBUTE_PURE
get_stat_atime (struct stat const *st) get_stat_atime (struct stat const *st)
{ {
#ifdef STAT_TIMESPEC #ifdef STAT_TIMESPEC
...@@ -122,7 +122,7 @@ get_stat_atime (struct stat const *st) ...@@ -122,7 +122,7 @@ get_stat_atime (struct stat const *st)
} }
/* Return *ST's status change time. */ /* Return *ST's status change time. */
_GL_STAT_TIME_INLINE struct timespec _GL_STAT_TIME_INLINE struct timespec _GL_ATTRIBUTE_PURE
get_stat_ctime (struct stat const *st) get_stat_ctime (struct stat const *st)
{ {
#ifdef STAT_TIMESPEC #ifdef STAT_TIMESPEC
...@@ -136,7 +136,7 @@ get_stat_ctime (struct stat const *st) ...@@ -136,7 +136,7 @@ get_stat_ctime (struct stat const *st)
} }
/* Return *ST's data modification time. */ /* Return *ST's data modification time. */
_GL_STAT_TIME_INLINE struct timespec _GL_STAT_TIME_INLINE struct timespec _GL_ATTRIBUTE_PURE
get_stat_mtime (struct stat const *st) get_stat_mtime (struct stat const *st)
{ {
#ifdef STAT_TIMESPEC #ifdef STAT_TIMESPEC
...@@ -151,7 +151,7 @@ get_stat_mtime (struct stat const *st) ...@@ -151,7 +151,7 @@ get_stat_mtime (struct stat const *st)
/* Return *ST's birth time, if available; otherwise return a value /* Return *ST's birth time, if available; otherwise return a value
with tv_sec and tv_nsec both equal to -1. */ with tv_sec and tv_nsec both equal to -1. */
_GL_STAT_TIME_INLINE struct timespec _GL_STAT_TIME_INLINE struct timespec _GL_ATTRIBUTE_PURE
get_stat_birthtime (struct stat const *st) get_stat_birthtime (struct stat const *st)
{ {
struct timespec t; struct timespec t;
......
...@@ -39,7 +39,6 @@ ...@@ -39,7 +39,6 @@
# if !(defined _@GUARD_PREFIX@_STDDEF_H && defined _GL_STDDEF_WINT_T) # if !(defined _@GUARD_PREFIX@_STDDEF_H && defined _GL_STDDEF_WINT_T)
# ifdef __need_wint_t # ifdef __need_wint_t
# undef _@GUARD_PREFIX@_STDDEF_H
# define _GL_STDDEF_WINT_T # define _GL_STDDEF_WINT_T
# endif # endif
# @INCLUDE_NEXT@ @NEXT_STDDEF_H@ # @INCLUDE_NEXT@ @NEXT_STDDEF_H@
...@@ -54,33 +53,45 @@ ...@@ -54,33 +53,45 @@
# @INCLUDE_NEXT@ @NEXT_STDDEF_H@ # @INCLUDE_NEXT@ @NEXT_STDDEF_H@
# ifndef _@GUARD_PREFIX@_STDDEF_H
# define _@GUARD_PREFIX@_STDDEF_H
/* On NetBSD 5.0, the definition of NULL lacks proper parentheses. */ /* On NetBSD 5.0, the definition of NULL lacks proper parentheses. */
#if @REPLACE_NULL@ # if (@REPLACE_NULL@ \
# undef NULL && (!defined _@GUARD_PREFIX@_STDDEF_H || defined _GL_STDDEF_WINT_T))
# ifdef __cplusplus # undef NULL
# ifdef __cplusplus
/* ISO C++ says that the macro NULL must expand to an integer constant /* ISO C++ says that the macro NULL must expand to an integer constant
expression, hence '((void *) 0)' is not allowed in C++. */ expression, hence '((void *) 0)' is not allowed in C++. */
# if __GNUG__ >= 3 # if __GNUG__ >= 3
/* GNU C++ has a __null macro that behaves like an integer ('int' or /* GNU C++ has a __null macro that behaves like an integer ('int' or
'long') but has the same size as a pointer. Use that, to avoid 'long') but has the same size as a pointer. Use that, to avoid
warnings. */ warnings. */
# define NULL __null # define NULL __null
# else # else
# define NULL 0L # define NULL 0L
# endif
# else
# define NULL ((void *) 0)
# endif
# endif # endif
# else
# define NULL ((void *) 0) # ifndef _@GUARD_PREFIX@_STDDEF_H
# endif # define _@GUARD_PREFIX@_STDDEF_H
#endif
/* Some platforms lack wchar_t. */ /* Some platforms lack wchar_t. */
#if !@HAVE_WCHAR_T@ #if !@HAVE_WCHAR_T@
# define wchar_t int # define wchar_t int
#endif #endif
/* Some platforms lack max_align_t. */
#if !@HAVE_MAX_ALIGN_T@
typedef union
{
char *__p;
double __d;
long double __ld;
long int __i;
} max_align_t;
#endif
# endif /* _@GUARD_PREFIX@_STDDEF_H */ # endif /* _@GUARD_PREFIX@_STDDEF_H */
# endif /* _@GUARD_PREFIX@_STDDEF_H */ # endif /* _@GUARD_PREFIX@_STDDEF_H */
#endif /* __need_XXX */ #endif /* __need_XXX */
...@@ -74,7 +74,7 @@ make_timespec (time_t s, long int ns) ...@@ -74,7 +74,7 @@ make_timespec (time_t s, long int ns)
The (int) cast avoids a gcc -Wconversion warning. */ The (int) cast avoids a gcc -Wconversion warning. */
_GL_TIMESPEC_INLINE int _GL_TIMESPEC_INLINE int _GL_ATTRIBUTE_PURE
timespec_cmp (struct timespec a, struct timespec b) timespec_cmp (struct timespec a, struct timespec b)
{ {
return (a.tv_sec < b.tv_sec ? -1 return (a.tv_sec < b.tv_sec ? -1
...@@ -84,7 +84,7 @@ timespec_cmp (struct timespec a, struct timespec b) ...@@ -84,7 +84,7 @@ timespec_cmp (struct timespec a, struct timespec b)
/* Return -1, 0, 1, depending on the sign of A. A.tv_nsec must be /* Return -1, 0, 1, depending on the sign of A. A.tv_nsec must be
nonnegative. */ nonnegative. */
_GL_TIMESPEC_INLINE int _GL_TIMESPEC_INLINE int _GL_ATTRIBUTE_PURE
timespec_sign (struct timespec a) timespec_sign (struct timespec a)
{ {
return a.tv_sec < 0 ? -1 : a.tv_sec || a.tv_nsec; return a.tv_sec < 0 ? -1 : a.tv_sec || a.tv_nsec;
......
...@@ -68,6 +68,10 @@ dnl configure.ac when using autoheader 2.62. ...@@ -68,6 +68,10 @@ dnl configure.ac when using autoheader 2.62.
#ifndef _GNU_SOURCE #ifndef _GNU_SOURCE
# undef _GNU_SOURCE # undef _GNU_SOURCE
#endif #endif
/* Use GNU style printf and scanf. */
#ifndef __USE_MINGW_ANSI_STDIO
# undef __USE_MINGW_ANSI_STDIO
#endif
/* Enable threading extensions on Solaris. */ /* Enable threading extensions on Solaris. */
#ifndef _POSIX_PTHREAD_SEMANTICS #ifndef _POSIX_PTHREAD_SEMANTICS
# undef _POSIX_PTHREAD_SEMANTICS # undef _POSIX_PTHREAD_SEMANTICS
...@@ -100,6 +104,7 @@ dnl configure.ac when using autoheader 2.62. ...@@ -100,6 +104,7 @@ dnl configure.ac when using autoheader 2.62.
AC_DEFINE([_ALL_SOURCE]) AC_DEFINE([_ALL_SOURCE])
AC_DEFINE([_DARWIN_C_SOURCE]) AC_DEFINE([_DARWIN_C_SOURCE])
AC_DEFINE([_GNU_SOURCE]) AC_DEFINE([_GNU_SOURCE])
AC_DEFINE([__USE_MINGW_ANSI_STDIO])
AC_DEFINE([_POSIX_PTHREAD_SEMANTICS]) AC_DEFINE([_POSIX_PTHREAD_SEMANTICS])
AC_DEFINE([_TANDEM_SOURCE]) AC_DEFINE([_TANDEM_SOURCE])
AC_CACHE_CHECK([whether _XOPEN_SOURCE should be defined], AC_CACHE_CHECK([whether _XOPEN_SOURCE should be defined],
......
dnl A placeholder for POSIX 2008 <stddef.h>, for platforms that have issues. dnl A placeholder for <stddef.h>, for platforms that have issues.
# stddef_h.m4 serial 4 # stddef_h.m4 serial 5
dnl Copyright (C) 2009-2014 Free Software Foundation, Inc. dnl Copyright (C) 2009-2014 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it, dnl gives unlimited permission to copy and/or distribute it,
...@@ -10,6 +10,9 @@ AC_DEFUN([gl_STDDEF_H], ...@@ -10,6 +10,9 @@ AC_DEFUN([gl_STDDEF_H],
AC_REQUIRE([gl_STDDEF_H_DEFAULTS]) AC_REQUIRE([gl_STDDEF_H_DEFAULTS])
AC_REQUIRE([gt_TYPE_WCHAR_T]) AC_REQUIRE([gt_TYPE_WCHAR_T])
STDDEF_H= STDDEF_H=
AC_CHECK_TYPE([max_align_t], [], [HAVE_MAX_ALIGN_T=0; STDDEF_H=stddef.h],
[[#include <stddef.h>
]])
if test $gt_cv_c_wchar_t = no; then if test $gt_cv_c_wchar_t = no; then
HAVE_WCHAR_T=0 HAVE_WCHAR_T=0
STDDEF_H=stddef.h STDDEF_H=stddef.h
...@@ -43,5 +46,6 @@ AC_DEFUN([gl_STDDEF_H_DEFAULTS], ...@@ -43,5 +46,6 @@ AC_DEFUN([gl_STDDEF_H_DEFAULTS],
[ [
dnl Assume proper GNU behavior unless another module says otherwise. dnl Assume proper GNU behavior unless another module says otherwise.
REPLACE_NULL=0; AC_SUBST([REPLACE_NULL]) REPLACE_NULL=0; AC_SUBST([REPLACE_NULL])
HAVE_MAX_ALIGN_T=1; AC_SUBST([HAVE_MAX_ALIGN_T])
HAVE_WCHAR_T=1; AC_SUBST([HAVE_WCHAR_T]) HAVE_WCHAR_T=1; AC_SUBST([HAVE_WCHAR_T])
]) ])
...@@ -6,6 +6,9 @@ dnl with or without modifications, as long as this notice is preserved. ...@@ -6,6 +6,9 @@ dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_STDIO_H], AC_DEFUN([gl_STDIO_H],
[ [
dnl For __USE_MINGW_ANSI_STDIO
AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
AC_REQUIRE([gl_STDIO_H_DEFAULTS]) AC_REQUIRE([gl_STDIO_H_DEFAULTS])
gl_NEXT_HEADERS([stdio.h]) gl_NEXT_HEADERS([stdio.h])
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment