diff options
| author | Paul Eggert | 2017-09-10 08:39:55 -0700 |
|---|---|---|
| committer | Paul Eggert | 2017-09-10 08:40:43 -0700 |
| commit | b079ee72ac25590cd8b7b185b32ea5d2d43a9909 (patch) | |
| tree | bbd4f1a2a0524ce1e380019d7d2b59a5c18f0844 /lib | |
| parent | c990f8d93dcc78aa98e58b89bddb666efcea2710 (diff) | |
| download | emacs-b079ee72ac25590cd8b7b185b32ea5d2d43a9909.tar.gz emacs-b079ee72ac25590cd8b7b185b32ea5d2d43a9909.zip | |
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.
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/flexmember.h | 21 | ||||
| -rw-r--r-- | lib/gnulib.mk.in | 4 | ||||
| -rw-r--r-- | lib/stddef.in.h | 18 | ||||
| -rw-r--r-- | lib/stdlib.in.h | 4 |
4 files changed, 29 insertions, 18 deletions
diff --git a/lib/flexmember.h b/lib/flexmember.h index c71ea651036..7405c418382 100644 --- a/lib/flexmember.h +++ b/lib/flexmember.h | |||
| @@ -2,18 +2,21 @@ | |||
| 2 | 2 | ||
| 3 | Copyright 2016-2017 Free Software Foundation, Inc. | 3 | Copyright 2016-2017 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This program is free software: you can redistribute it and/or modify | 5 | This file is part of the GNU C Library. |
| 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. | ||
| 9 | 6 | ||
| 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, | ||
| 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 13 | GNU General Public License for more details. | 15 | General Public License for more details. |
| 14 | 16 | ||
| 15 | You should have received a copy of the GNU General Public License | 17 | You should have received a copy of the GNU General Public |
| 16 | along with this program. If not, see <http://www.gnu.org/licenses/>. | 18 | License along with the GNU C Library; if not, see |
| 19 | <http://www.gnu.org/licenses/>. | ||
| 17 | 20 | ||
| 18 | Written by Paul Eggert. */ | 21 | Written by Paul Eggert. */ |
| 19 | 22 | ||
diff --git a/lib/gnulib.mk.in b/lib/gnulib.mk.in index b6eb0f69539..fdf87433e50 100644 --- a/lib/gnulib.mk.in +++ b/lib/gnulib.mk.in | |||
| @@ -369,12 +369,14 @@ HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@ | |||
| 369 | HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@ | 369 | HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@ |
| 370 | HAVE_DECL_IMAXABS = @HAVE_DECL_IMAXABS@ | 370 | HAVE_DECL_IMAXABS = @HAVE_DECL_IMAXABS@ |
| 371 | HAVE_DECL_IMAXDIV = @HAVE_DECL_IMAXDIV@ | 371 | HAVE_DECL_IMAXDIV = @HAVE_DECL_IMAXDIV@ |
| 372 | HAVE_DECL_INITSTATE = @HAVE_DECL_INITSTATE@ | ||
| 372 | HAVE_DECL_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@ | 373 | HAVE_DECL_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@ |
| 373 | HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@ | 374 | HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@ |
| 374 | HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@ | 375 | HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@ |
| 375 | HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@ | 376 | HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@ |
| 376 | HAVE_DECL_SETENV = @HAVE_DECL_SETENV@ | 377 | HAVE_DECL_SETENV = @HAVE_DECL_SETENV@ |
| 377 | HAVE_DECL_SETHOSTNAME = @HAVE_DECL_SETHOSTNAME@ | 378 | HAVE_DECL_SETHOSTNAME = @HAVE_DECL_SETHOSTNAME@ |
| 379 | HAVE_DECL_SETSTATE = @HAVE_DECL_SETSTATE@ | ||
| 378 | HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@ | 380 | HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@ |
| 379 | HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@ | 381 | HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@ |
| 380 | HAVE_DECL_STRERROR_R = @HAVE_DECL_STRERROR_R@ | 382 | HAVE_DECL_STRERROR_R = @HAVE_DECL_STRERROR_R@ |
| @@ -2359,6 +2361,7 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \ | |||
| 2359 | -e 's|@''HAVE_DECL_GETLOADAVG''@|$(HAVE_DECL_GETLOADAVG)|g' \ | 2361 | -e 's|@''HAVE_DECL_GETLOADAVG''@|$(HAVE_DECL_GETLOADAVG)|g' \ |
| 2360 | -e 's|@''HAVE_GETSUBOPT''@|$(HAVE_GETSUBOPT)|g' \ | 2362 | -e 's|@''HAVE_GETSUBOPT''@|$(HAVE_GETSUBOPT)|g' \ |
| 2361 | -e 's|@''HAVE_GRANTPT''@|$(HAVE_GRANTPT)|g' \ | 2363 | -e 's|@''HAVE_GRANTPT''@|$(HAVE_GRANTPT)|g' \ |
| 2364 | -e 's|@''HAVE_DECL_INITSTATE''@|$(HAVE_DECL_INITSTATE)|g' \ | ||
| 2362 | -e 's|@''HAVE_MKDTEMP''@|$(HAVE_MKDTEMP)|g' \ | 2365 | -e 's|@''HAVE_MKDTEMP''@|$(HAVE_MKDTEMP)|g' \ |
| 2363 | -e 's|@''HAVE_MKOSTEMP''@|$(HAVE_MKOSTEMP)|g' \ | 2366 | -e 's|@''HAVE_MKOSTEMP''@|$(HAVE_MKOSTEMP)|g' \ |
| 2364 | -e 's|@''HAVE_MKOSTEMPS''@|$(HAVE_MKOSTEMPS)|g' \ | 2367 | -e 's|@''HAVE_MKOSTEMPS''@|$(HAVE_MKOSTEMPS)|g' \ |
| @@ -2376,6 +2379,7 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \ | |||
| 2376 | -e 's|@''HAVE_RPMATCH''@|$(HAVE_RPMATCH)|g' \ | 2379 | -e 's|@''HAVE_RPMATCH''@|$(HAVE_RPMATCH)|g' \ |
| 2377 | -e 's|@''HAVE_SECURE_GETENV''@|$(HAVE_SECURE_GETENV)|g' \ | 2380 | -e 's|@''HAVE_SECURE_GETENV''@|$(HAVE_SECURE_GETENV)|g' \ |
| 2378 | -e 's|@''HAVE_DECL_SETENV''@|$(HAVE_DECL_SETENV)|g' \ | 2381 | -e 's|@''HAVE_DECL_SETENV''@|$(HAVE_DECL_SETENV)|g' \ |
| 2382 | -e 's|@''HAVE_DECL_SETSTATE''@|$(HAVE_DECL_SETSTATE)|g' \ | ||
| 2379 | -e 's|@''HAVE_STRTOD''@|$(HAVE_STRTOD)|g' \ | 2383 | -e 's|@''HAVE_STRTOD''@|$(HAVE_STRTOD)|g' \ |
| 2380 | -e 's|@''HAVE_STRTOLL''@|$(HAVE_STRTOLL)|g' \ | 2384 | -e 's|@''HAVE_STRTOLL''@|$(HAVE_STRTOLL)|g' \ |
| 2381 | -e 's|@''HAVE_STRTOULL''@|$(HAVE_STRTOULL)|g' \ | 2385 | -e 's|@''HAVE_STRTOULL''@|$(HAVE_STRTOULL)|g' \ |
diff --git a/lib/stddef.in.h b/lib/stddef.in.h index 5b496a68320..16e72bd1e0d 100644 --- a/lib/stddef.in.h +++ b/lib/stddef.in.h | |||
| @@ -85,24 +85,28 @@ | |||
| 85 | a hack in case the configure-time test was done with g++ even though | 85 | a hack in case the configure-time test was done with g++ even though |
| 86 | we are currently compiling with gcc. */ | 86 | we are currently compiling with gcc. */ |
| 87 | #if ! (@HAVE_MAX_ALIGN_T@ || defined _GCC_MAX_ALIGN_T) | 87 | #if ! (@HAVE_MAX_ALIGN_T@ || defined _GCC_MAX_ALIGN_T) |
| 88 | # if !GNULIB_defined_max_align_t | ||
| 88 | /* On the x86, the maximum storage alignment of double, long, etc. is 4, | 89 | /* On the x86, the maximum storage alignment of double, long, etc. is 4, |
| 89 | but GCC's C11 ABI for x86 says that max_align_t has an alignment of 8, | 90 | but GCC's C11 ABI for x86 says that max_align_t has an alignment of 8, |
| 90 | and the C11 standard allows this. Work around this problem by | 91 | and the C11 standard allows this. Work around this problem by |
| 91 | using __alignof__ (which returns 8 for double) rather than _Alignof | 92 | using __alignof__ (which returns 8 for double) rather than _Alignof |
| 92 | (which returns 4), and align each union member accordingly. */ | 93 | (which returns 4), and align each union member accordingly. */ |
| 93 | # ifdef __GNUC__ | 94 | # ifdef __GNUC__ |
| 94 | # define _GL_STDDEF_ALIGNAS(type) \ | 95 | # define _GL_STDDEF_ALIGNAS(type) \ |
| 95 | __attribute__ ((__aligned__ (__alignof__ (type)))) | 96 | __attribute__ ((__aligned__ (__alignof__ (type)))) |
| 96 | # else | 97 | # else |
| 97 | # define _GL_STDDEF_ALIGNAS(type) /* */ | 98 | # define _GL_STDDEF_ALIGNAS(type) /* */ |
| 98 | # endif | 99 | # endif |
| 99 | typedef union | 100 | typedef union |
| 100 | { | 101 | { |
| 101 | char *__p _GL_STDDEF_ALIGNAS (char *); | 102 | char *__p _GL_STDDEF_ALIGNAS (char *); |
| 102 | double __d _GL_STDDEF_ALIGNAS (double); | 103 | double __d _GL_STDDEF_ALIGNAS (double); |
| 103 | long double __ld _GL_STDDEF_ALIGNAS (long double); | 104 | long double __ld _GL_STDDEF_ALIGNAS (long double); |
| 104 | long int __i _GL_STDDEF_ALIGNAS (long int); | 105 | 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 | ||
| 106 | #endif | 110 | #endif |
| 107 | 111 | ||
| 108 | # endif /* _@GUARD_PREFIX@_STDDEF_H */ | 112 | # endif /* _@GUARD_PREFIX@_STDDEF_H */ |
diff --git a/lib/stdlib.in.h b/lib/stdlib.in.h index c6e68fddc48..ef41c992df5 100644 --- a/lib/stdlib.in.h +++ b/lib/stdlib.in.h | |||
| @@ -597,7 +597,7 @@ _GL_WARN_ON_USE (srandom, "srandom is unportable - " | |||
| 597 | #endif | 597 | #endif |
| 598 | 598 | ||
| 599 | #if @GNULIB_RANDOM@ | 599 | #if @GNULIB_RANDOM@ |
| 600 | # if !@HAVE_RANDOM@ | 600 | # if !@HAVE_RANDOM@ || !@HAVE_DECL_INITSTATE@ |
| 601 | _GL_FUNCDECL_SYS (initstate, char *, | 601 | _GL_FUNCDECL_SYS (initstate, char *, |
| 602 | (unsigned int seed, char *buf, size_t buf_size) | 602 | (unsigned int seed, char *buf, size_t buf_size) |
| 603 | _GL_ARG_NONNULL ((2))); | 603 | _GL_ARG_NONNULL ((2))); |
| @@ -614,7 +614,7 @@ _GL_WARN_ON_USE (initstate, "initstate is unportable - " | |||
| 614 | #endif | 614 | #endif |
| 615 | 615 | ||
| 616 | #if @GNULIB_RANDOM@ | 616 | #if @GNULIB_RANDOM@ |
| 617 | # if !@HAVE_RANDOM@ | 617 | # if !@HAVE_RANDOM@ || !@HAVE_DECL_SETSTATE@ |
| 618 | _GL_FUNCDECL_SYS (setstate, char *, (char *arg_state) _GL_ARG_NONNULL ((1))); | 618 | _GL_FUNCDECL_SYS (setstate, char *, (char *arg_state) _GL_ARG_NONNULL ((1))); |
| 619 | # endif | 619 | # endif |
| 620 | _GL_CXXALIAS_SYS (setstate, char *, (char *arg_state)); | 620 | _GL_CXXALIAS_SYS (setstate, char *, (char *arg_state)); |