Skip to content

Commit b079ee7

Browse files
committed
Merge from gnulib
This incorporates: 2017-09-08 stddef: Avoid conflict with system-defined max_align_t 2017-08-24 warnings: fix compilation with old autoconf 2017-08-23 glob: merge from glibc with Zanella glob changes 2017-08-17 random: Fix test compilation failure on Cygwin 1.5.25 * doc/misc/texinfo.tex, lib/flexmember.h, lib/stddef.in.h: * lib/stdlib.in.h, m4/manywarnings.m4, m4/stdlib_h.m4: * m4/warnings.m4: Copy from Gnulib. * lib/gnulib.mk.in: Regenerate.
1 parent c990f8d commit b079ee7

8 files changed

+60
-31
lines changed

doc/misc/texinfo.tex

+18-6
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
% Load plain if necessary, i.e., if running under initex.
44
\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
55
%
6-
\def\texinfoversion{2017-07-04.16}
6+
\def\texinfoversion{2017-08-23.19}
77
%
88
% Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
99
% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
@@ -5696,10 +5696,13 @@
56965696
\advance\dimen@ii by 1\dimen@i
56975697
\ifdim\wd\boxA > \dimen@ii % If the entry doesn't fit in one line
56985698
\ifdim\dimen@ > 0.8\dimen@ii % due to long index text
5699-
\dimen@ = 0.7\dimen@ % Try to split the text roughly evenly
5699+
% Try to split the text roughly evenly. \dimen@ will be the length of
5700+
% the first line.
5701+
\dimen@ = 0.7\dimen@
57005702
\dimen@ii = \hsize
57015703
\ifnum\dimen@>\dimen@ii
5702-
% If the entry is too long, use the whole line
5704+
% If the entry is too long (for example, if it needs more than
5705+
% two lines), use all the space in the first line.
57035706
\dimen@ = \dimen@ii
57045707
\fi
57055708
\advance\leftskip by 0pt plus 1fill % ragged right
@@ -5709,8 +5712,9 @@
57095712
% instead of using \parshape with explicit line lengths, but TeX
57105713
% doesn't seem to provide a way to do such a thing.
57115714
%
5712-
\leftskip = 1em
5713-
\parindent = -1em
5715+
% Indent all lines but the first one.
5716+
\advance\leftskip by 1em
5717+
\advance\parindent by -1em
57145718
\fi\fi
57155719
\indent % start paragraph
57165720
\unhbox\boxA
@@ -6943,7 +6947,15 @@
69436947
% exist, with an empty box. Let's hope all the numbers have the same width.
69446948
% Also ignore the page number, which is conventionally not printed.
69456949
\def\numeralbox{\setbox0=\hbox{8}\hbox to \wd0{\hfil}}
6946-
\def\partentry#1#2#3#4{\dochapentry{\numeralbox\labelspace#1}{}}
6950+
\def\partentry#1#2#3#4{%
6951+
% Add stretch and a bonus for breaking the page before the part heading.
6952+
% This reduces the chance of the page being broken immediately after the
6953+
% part heading, before a following chapter heading.
6954+
\vskip 0pt plus 5\baselineskip
6955+
\penalty-300
6956+
\vskip 0pt plus -5\baselineskip
6957+
\dochapentry{\numeralbox\labelspace#1}{}%
6958+
}
69476959
%
69486960
% Parts, in the short toc.
69496961
\def\shortpartentry#1#2#3#4{%

lib/flexmember.h

+12-9
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,21 @@
22
33
Copyright 2016-2017 Free Software Foundation, Inc.
44
5-
This program is free software: you can redistribute it and/or modify
6-
it under the terms of the GNU General Public License as published by
7-
the Free Software Foundation; either version 3 of the License, or
8-
(at your option) any later version.
5+
This file is part of the GNU C Library.
96
10-
This program is distributed in the hope that it will be useful,
7+
The GNU C Library is free software; you can redistribute it and/or
8+
modify it under the terms of the GNU General Public
9+
License as published by the Free Software Foundation; either
10+
version 3 of the License, or (at your option) any later version.
11+
12+
The GNU C Library is distributed in the hope that it will be useful,
1113
but WITHOUT ANY WARRANTY; without even the implied warranty of
12-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13-
GNU General Public License for more details.
14+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15+
General Public License for more details.
1416
15-
You should have received a copy of the GNU General Public License
16-
along with this program. If not, see <http://www.gnu.org/licenses/>.
17+
You should have received a copy of the GNU General Public
18+
License along with the GNU C Library; if not, see
19+
<http://www.gnu.org/licenses/>.
1720
1821
Written by Paul Eggert. */
1922

lib/gnulib.mk.in

+4
Original file line numberDiff line numberDiff line change
@@ -369,12 +369,14 @@ HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@
369369
HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@
370370
HAVE_DECL_IMAXABS = @HAVE_DECL_IMAXABS@
371371
HAVE_DECL_IMAXDIV = @HAVE_DECL_IMAXDIV@
372+
HAVE_DECL_INITSTATE = @HAVE_DECL_INITSTATE@
372373
HAVE_DECL_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@
373374
HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@
374375
HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@
375376
HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@
376377
HAVE_DECL_SETENV = @HAVE_DECL_SETENV@
377378
HAVE_DECL_SETHOSTNAME = @HAVE_DECL_SETHOSTNAME@
379+
HAVE_DECL_SETSTATE = @HAVE_DECL_SETSTATE@
378380
HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@
379381
HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@
380382
HAVE_DECL_STRERROR_R = @HAVE_DECL_STRERROR_R@
@@ -2359,6 +2361,7 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \
23592361
-e 's|@''HAVE_DECL_GETLOADAVG''@|$(HAVE_DECL_GETLOADAVG)|g' \
23602362
-e 's|@''HAVE_GETSUBOPT''@|$(HAVE_GETSUBOPT)|g' \
23612363
-e 's|@''HAVE_GRANTPT''@|$(HAVE_GRANTPT)|g' \
2364+
-e 's|@''HAVE_DECL_INITSTATE''@|$(HAVE_DECL_INITSTATE)|g' \
23622365
-e 's|@''HAVE_MKDTEMP''@|$(HAVE_MKDTEMP)|g' \
23632366
-e 's|@''HAVE_MKOSTEMP''@|$(HAVE_MKOSTEMP)|g' \
23642367
-e 's|@''HAVE_MKOSTEMPS''@|$(HAVE_MKOSTEMPS)|g' \
@@ -2376,6 +2379,7 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \
23762379
-e 's|@''HAVE_RPMATCH''@|$(HAVE_RPMATCH)|g' \
23772380
-e 's|@''HAVE_SECURE_GETENV''@|$(HAVE_SECURE_GETENV)|g' \
23782381
-e 's|@''HAVE_DECL_SETENV''@|$(HAVE_DECL_SETENV)|g' \
2382+
-e 's|@''HAVE_DECL_SETSTATE''@|$(HAVE_DECL_SETSTATE)|g' \
23792383
-e 's|@''HAVE_STRTOD''@|$(HAVE_STRTOD)|g' \
23802384
-e 's|@''HAVE_STRTOLL''@|$(HAVE_STRTOLL)|g' \
23812385
-e 's|@''HAVE_STRTOULL''@|$(HAVE_STRTOULL)|g' \

lib/stddef.in.h

+11-7
Original file line numberDiff line numberDiff line change
@@ -85,24 +85,28 @@
8585
a hack in case the configure-time test was done with g++ even though
8686
we are currently compiling with gcc. */
8787
#if ! (@HAVE_MAX_ALIGN_T@ || defined _GCC_MAX_ALIGN_T)
88+
# if !GNULIB_defined_max_align_t
8889
/* On the x86, the maximum storage alignment of double, long, etc. is 4,
8990
but GCC's C11 ABI for x86 says that max_align_t has an alignment of 8,
9091
and the C11 standard allows this. Work around this problem by
9192
using __alignof__ (which returns 8 for double) rather than _Alignof
9293
(which returns 4), and align each union member accordingly. */
93-
# ifdef __GNUC__
94-
# define _GL_STDDEF_ALIGNAS(type) \
95-
__attribute__ ((__aligned__ (__alignof__ (type))))
96-
# else
97-
# define _GL_STDDEF_ALIGNAS(type) /* */
98-
# endif
94+
# ifdef __GNUC__
95+
# define _GL_STDDEF_ALIGNAS(type) \
96+
__attribute__ ((__aligned__ (__alignof__ (type))))
97+
# else
98+
# define _GL_STDDEF_ALIGNAS(type) /* */
99+
# endif
99100
typedef union
100101
{
101102
char *__p _GL_STDDEF_ALIGNAS (char *);
102103
double __d _GL_STDDEF_ALIGNAS (double);
103104
long double __ld _GL_STDDEF_ALIGNAS (long double);
104105
long int __i _GL_STDDEF_ALIGNAS (long int);
105-
} max_align_t;
106+
} rpl_max_align_t;
107+
# define max_align_t rpl_max_align_t
108+
# define GNULIB_defined_max_align_t 1
109+
# endif
106110
#endif
107111

108112
# endif /* _@GUARD_PREFIX@_STDDEF_H */

lib/stdlib.in.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -597,7 +597,7 @@ _GL_WARN_ON_USE (srandom, "srandom is unportable - "
597597
#endif
598598

599599
#if @GNULIB_RANDOM@
600-
# if !@HAVE_RANDOM@
600+
# if !@HAVE_RANDOM@ || !@HAVE_DECL_INITSTATE@
601601
_GL_FUNCDECL_SYS (initstate, char *,
602602
(unsigned int seed, char *buf, size_t buf_size)
603603
_GL_ARG_NONNULL ((2)));
@@ -614,7 +614,7 @@ _GL_WARN_ON_USE (initstate, "initstate is unportable - "
614614
#endif
615615

616616
#if @GNULIB_RANDOM@
617-
# if !@HAVE_RANDOM@
617+
# if !@HAVE_RANDOM@ || !@HAVE_DECL_SETSTATE@
618618
_GL_FUNCDECL_SYS (setstate, char *, (char *arg_state) _GL_ARG_NONNULL ((1)));
619619
# endif
620620
_GL_CXXALIAS_SYS (setstate, char *, (char *arg_state));

m4/manywarnings.m4

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# manywarnings.m4 serial 11
1+
# manywarnings.m4 serial 12
22
dnl Copyright (C) 2008-2017 Free Software Foundation, Inc.
33
dnl This file is free software; the Free Software Foundation
44
dnl gives unlimited permission to copy and/or distribute it,
@@ -39,7 +39,8 @@ AC_DEFUN([gl_MANYWARN_ALL_GCC],
3939
[_AC_LANG_DISPATCH([$0], _AC_LANG, $@)])
4040

4141
# Specialization for _AC_LANG = C.
42-
AC_DEFUN([gl_MANYWARN_ALL_GCC(C)],
42+
# Use of m4_defun rather than AC_DEFUN works around a bug in autoconf < 2.63b.
43+
m4_defun([gl_MANYWARN_ALL_GCC(C)],
4344
[
4445
AC_LANG_PUSH([C])
4546
@@ -316,7 +317,8 @@ AC_DEFUN([gl_MANYWARN_ALL_GCC(C)],
316317
])
317318

318319
# Specialization for _AC_LANG = C++.
319-
AC_DEFUN([gl_MANYWARN_ALL_GCC(C++)],
320+
# Use of m4_defun rather than AC_DEFUN works around a bug in autoconf < 2.63b.
321+
m4_defun([gl_MANYWARN_ALL_GCC(C++)],
320322
[
321323
gl_MANYWARN_ALL_GCC_CXX_IMPL([$1])
322324
])

m4/stdlib_h.m4

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# stdlib_h.m4 serial 43
1+
# stdlib_h.m4 serial 44
22
dnl Copyright (C) 2007-2017 Free Software Foundation, Inc.
33
dnl This file is free software; the Free Software Foundation
44
dnl gives unlimited permission to copy and/or distribute it,
@@ -78,6 +78,7 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS],
7878
HAVE_DECL_GETLOADAVG=1; AC_SUBST([HAVE_DECL_GETLOADAVG])
7979
HAVE_GETSUBOPT=1; AC_SUBST([HAVE_GETSUBOPT])
8080
HAVE_GRANTPT=1; AC_SUBST([HAVE_GRANTPT])
81+
HAVE_DECL_INITSTATE=1; AC_SUBST([HAVE_DECL_INITSTATE])
8182
HAVE_MKDTEMP=1; AC_SUBST([HAVE_MKDTEMP])
8283
HAVE_MKOSTEMP=1; AC_SUBST([HAVE_MKOSTEMP])
8384
HAVE_MKOSTEMPS=1; AC_SUBST([HAVE_MKOSTEMPS])
@@ -96,6 +97,7 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS],
9697
HAVE_SECURE_GETENV=1; AC_SUBST([HAVE_SECURE_GETENV])
9798
HAVE_SETENV=1; AC_SUBST([HAVE_SETENV])
9899
HAVE_DECL_SETENV=1; AC_SUBST([HAVE_DECL_SETENV])
100+
HAVE_DECL_SETSTATE=1; AC_SUBST([HAVE_DECL_SETSTATE])
99101
HAVE_STRTOD=1; AC_SUBST([HAVE_STRTOD])
100102
HAVE_STRTOLL=1; AC_SUBST([HAVE_STRTOLL])
101103
HAVE_STRTOULL=1; AC_SUBST([HAVE_STRTOULL])

m4/warnings.m4

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# warnings.m4 serial 12
1+
# warnings.m4 serial 13
22
dnl Copyright (C) 2008-2017 Free Software Foundation, Inc.
33
dnl This file is free software; the Free Software Foundation
44
dnl gives unlimited permission to copy and/or distribute it,
@@ -59,15 +59,17 @@ AC_DEFUN([gl_UNKNOWN_WARNINGS_ARE_ERRORS],
5959
[_AC_LANG_DISPATCH([$0], _AC_LANG, $@)])
6060

6161
# Specialization for _AC_LANG = C. This macro can be AC_REQUIREd.
62-
AC_DEFUN([gl_UNKNOWN_WARNINGS_ARE_ERRORS(C)],
62+
# Use of m4_defun rather than AC_DEFUN works around a bug in autoconf < 2.63b.
63+
m4_defun([gl_UNKNOWN_WARNINGS_ARE_ERRORS(C)],
6364
[
6465
AC_LANG_PUSH([C])
6566
gl_UNKNOWN_WARNINGS_ARE_ERRORS_IMPL
6667
AC_LANG_POP([C])
6768
])
6869

6970
# Specialization for _AC_LANG = C++. This macro can be AC_REQUIREd.
70-
AC_DEFUN([gl_UNKNOWN_WARNINGS_ARE_ERRORS(C++)],
71+
# Use of m4_defun rather than AC_DEFUN works around a bug in autoconf < 2.63b.
72+
m4_defun([gl_UNKNOWN_WARNINGS_ARE_ERRORS(C++)],
7173
[
7274
AC_LANG_PUSH([C++])
7375
gl_UNKNOWN_WARNINGS_ARE_ERRORS_IMPL

0 commit comments

Comments
 (0)