+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>
* CONTRIBUTE: Improve; add explicit web references, move some info
% Load plain if necessary, i.e., if running under initex.
\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,
% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
% paragraph.
%
\gdef\dosuppressfirstparagraphindent{%
- \gdef\indent{%
- \restorefirstparagraphindent
- \indent
- }%
- \gdef\noindent{%
- \restorefirstparagraphindent
- \noindent
- }%
- \global\everypar = {%
- \kern -\parindent
- \restorefirstparagraphindent
- }%
+ \gdef\indent {\restorefirstparagraphindent \indent}%
+ \gdef\noindent{\restorefirstparagraphindent \noindent}%
+ \global\everypar = {\kern -\parindent \restorefirstparagraphindent}%
}
-
+%
\gdef\restorefirstparagraphindent{%
- \global \let \indent = \ptexindent
- \global \let \noindent = \ptexnoindent
- \global \everypar = {}%
+ \global\let\indent = \ptexindent
+ \global\let\noindent = \ptexnoindent
+ \global\everypar = {}%
}
%
{%
\chapfonts \rmisbold
+ \let\footnote=\errfootnoteheading % give better error message
%
% Have to define \lastsection before calling \donoderef, because the
% xref code eventually uses it. On the other hand, it has to be called
\ifx\temptype\Yomitfromtockeyword\else
\checkenv{}% non-@*heading should not be in an environment.
\fi
+ \let\footnote=\errfootnoteheading
%
% Switch to the right set of fonts.
\csname #2fonts\endcsname \rmisbold
%
% Auto-number footnotes. Otherwise like plain.
\gdef\footnote{%
- \let\indent=\ptexindent
- \let\noindent=\ptexnoindent
- %
\global\advance\footnoteno by \@ne
\edef\thisfootno{$^{\the\footnoteno}$}%
%
%
% Nested footnotes are not supported in TeX, that would take a lot
% 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
% footnote reference occurs in (for example) a display environment.
}
}%end \catcode `\@=11
-\def\errfootnote{%
+\def\errfootnotenest{%
\errhelp=\EMsimple
\errmessage{Nested footnotes not supported in texinfo.tex,
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
% the real \insert just after the vbox finished. Otherwise, the insertion
% would be lost.
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
-e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|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|@''REPLACE_NULL''@|$(REPLACE_NULL)|g' \
< $(srcdir)/stddef.in.h; \
#endif
/* 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)
{
# if defined STAT_TIMESPEC
}
/* 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)
{
# if defined STAT_TIMESPEC
}
/* 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)
{
# if defined STAT_TIMESPEC
}
/* 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)
{
# if defined HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC
}
/* 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)
{
#ifdef STAT_TIMESPEC
}
/* 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)
{
#ifdef STAT_TIMESPEC
}
/* 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)
{
#ifdef STAT_TIMESPEC
/* Return *ST's birth time, if available; otherwise return a value
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)
{
struct timespec t;
# if !(defined _@GUARD_PREFIX@_STDDEF_H && defined _GL_STDDEF_WINT_T)
# ifdef __need_wint_t
-# undef _@GUARD_PREFIX@_STDDEF_H
# define _GL_STDDEF_WINT_T
# endif
# @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. */
-#if @REPLACE_NULL@
-# undef NULL
-# ifdef __cplusplus
+# if (@REPLACE_NULL@ \
+ && (!defined _@GUARD_PREFIX@_STDDEF_H || defined _GL_STDDEF_WINT_T))
+# undef NULL
+# ifdef __cplusplus
/* ISO C++ says that the macro NULL must expand to an integer constant
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
'long') but has the same size as a pointer. Use that, to avoid
warnings. */
-# define NULL __null
-# else
-# define NULL 0L
+# define NULL __null
+# else
+# define NULL 0L
+# endif
+# else
+# define NULL ((void *) 0)
+# endif
# endif
-# else
-# define NULL ((void *) 0)
-# endif
-#endif
+
+# ifndef _@GUARD_PREFIX@_STDDEF_H
+# define _@GUARD_PREFIX@_STDDEF_H
/* Some platforms lack wchar_t. */
#if !@HAVE_WCHAR_T@
# define wchar_t int
#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 /* __need_XXX */
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)
{
return (a.tv_sec < b.tv_sec ? -1
/* Return -1, 0, 1, depending on the sign of A. A.tv_nsec must be
nonnegative. */
-_GL_TIMESPEC_INLINE int
+_GL_TIMESPEC_INLINE int _GL_ATTRIBUTE_PURE
timespec_sign (struct timespec a)
{
return a.tv_sec < 0 ? -1 : a.tv_sec || a.tv_nsec;
#ifndef _GNU_SOURCE
# undef _GNU_SOURCE
#endif
+/* Use GNU style printf and scanf. */
+#ifndef __USE_MINGW_ANSI_STDIO
+# undef __USE_MINGW_ANSI_STDIO
+#endif
/* Enable threading extensions on Solaris. */
#ifndef _POSIX_PTHREAD_SEMANTICS
# undef _POSIX_PTHREAD_SEMANTICS
AC_DEFINE([_ALL_SOURCE])
AC_DEFINE([_DARWIN_C_SOURCE])
AC_DEFINE([_GNU_SOURCE])
+ AC_DEFINE([__USE_MINGW_ANSI_STDIO])
AC_DEFINE([_POSIX_PTHREAD_SEMANTICS])
AC_DEFINE([_TANDEM_SOURCE])
AC_CACHE_CHECK([whether _XOPEN_SOURCE should be defined],
-dnl A placeholder for POSIX 2008 <stddef.h>, for platforms that have issues.
-# stddef_h.m4 serial 4
+dnl A placeholder for <stddef.h>, for platforms that have issues.
+# stddef_h.m4 serial 5
dnl Copyright (C) 2009-2014 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
AC_REQUIRE([gl_STDDEF_H_DEFAULTS])
AC_REQUIRE([gt_TYPE_WCHAR_T])
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
HAVE_WCHAR_T=0
STDDEF_H=stddef.h
[
dnl Assume proper GNU behavior unless another module says otherwise.
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])
])
AC_DEFUN([gl_STDIO_H],
[
+ dnl For __USE_MINGW_ANSI_STDIO
+ AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+
AC_REQUIRE([gl_STDIO_H_DEFAULTS])
gl_NEXT_HEADERS([stdio.h])