diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2019-03-25 14:53:56 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2019-03-25 14:55:49 -0700 |
commit | a3c5530975e57f813ec0f52e16584aacaadc1d05 (patch) | |
tree | 52a7d07e99d41a0c2db2c110b1d853fdd83b43b4 /m4 | |
parent | d43af7b64bd22724e5e9a624bcc06b4ed28faf73 (diff) | |
download | emacs-a3c5530975e57f813ec0f52e16584aacaadc1d05.tar.gz |
Update from Gnulib.
This incorporates:
2019-03-23 Support cross-compilation to musl libc
2019-03-23 noreturn: In C++ mode with clang, use _Noreturn as fallback
2019-03-22 _Noreturn: beware of C's _Noreturn in C++ pre C++11
2019-03-19 Help making signal handlers more reliable
2019-03-18 _Noreturn: clang and MSVC do support [[noreturn]] in C++11
2019-03-17 _Noreturn: GCC 4.7 does not support [[noreturn]] in C++11
2019-03-14 all: Update URLs to msdn.microsoft.com
* doc/misc/texinfo.tex, lib/_Noreturn.h, lib/gettimeofday.c:
* lib/mktime.c, lib/regcomp.c, lib/regexec.c, lib/stat-time.h:
* lib/utimens.c, m4/fdopendir.m4, m4/getgroups.m4:
* m4/gettimeofday.m4, m4/gnulib-common.m4, m4/putenv.m4, m4/utimes.m4:
Update from gnulib.
Diffstat (limited to 'm4')
-rw-r--r-- | m4/fdopendir.m4 | 12 | ||||
-rw-r--r-- | m4/getgroups.m4 | 6 | ||||
-rw-r--r-- | m4/gettimeofday.m4 | 4 | ||||
-rw-r--r-- | m4/gnulib-common.m4 | 38 | ||||
-rw-r--r-- | m4/putenv.m4 | 4 | ||||
-rw-r--r-- | m4/utimes.m4 | 10 |
6 files changed, 58 insertions, 16 deletions
diff --git a/m4/fdopendir.m4 b/m4/fdopendir.m4 index 04905519d0b..b2b3b037316 100644 --- a/m4/fdopendir.m4 +++ b/m4/fdopendir.m4 @@ -1,4 +1,4 @@ -# serial 10 +# serial 11 # See if we need to provide fdopendir. dnl Copyright (C) 2009-2019 Free Software Foundation, Inc. @@ -45,10 +45,12 @@ DIR *fdopendir (int); [gl_cv_func_fdopendir_works=yes], [gl_cv_func_fdopendir_works=no], [case "$host_os" in - # Guess yes on glibc systems. - *-gnu*) gl_cv_func_fdopendir_works="guessing yes" ;; - # If we don't know, assume the worst. - *) gl_cv_func_fdopendir_works="guessing no" ;; + # Guess yes on glibc systems. + *-gnu*) gl_cv_func_fdopendir_works="guessing yes" ;; + # Guess yes on musl systems. + *-musl*) gl_cv_func_fdopendir_works="guessing yes" ;; + # If we don't know, assume the worst. + *) gl_cv_func_fdopendir_works="guessing no" ;; esac ])]) case "$gl_cv_func_fdopendir_works" in diff --git a/m4/getgroups.m4 b/m4/getgroups.m4 index 2ce986ea79b..c93447bb11c 100644 --- a/m4/getgroups.m4 +++ b/m4/getgroups.m4 @@ -1,4 +1,4 @@ -# serial 21 +# serial 22 dnl From Jim Meyering. dnl A wrapper around AC_FUNC_GETGROUPS. @@ -42,6 +42,8 @@ AC_DEFUN([AC_FUNC_GETGROUPS], [case "$host_os" in # (( # Guess yes on glibc systems. *-gnu* | gnu*) ac_cv_func_getgroups_works="guessing yes" ;; + # Guess yes on musl systems. + *-musl*) ac_cv_func_getgroups_works="guessing yes" ;; # If we don't know, assume the worst. *) ac_cv_func_getgroups_works="guessing no" ;; esac @@ -95,6 +97,8 @@ AC_DEFUN([gl_FUNC_GETGROUPS], [case "$host_os" in # Guess yes on glibc systems. *-gnu* | gnu*) gl_cv_func_getgroups_works="guessing yes" ;; + # Guess yes on musl systems. + *-musl*) gl_cv_func_getgroups_works="guessing yes" ;; # If we don't know, assume the worst. *) gl_cv_func_getgroups_works="guessing no" ;; esac diff --git a/m4/gettimeofday.m4 b/m4/gettimeofday.m4 index d29b4bff2ff..5e2ef6f47e2 100644 --- a/m4/gettimeofday.m4 +++ b/m4/gettimeofday.m4 @@ -1,4 +1,4 @@ -# serial 25 +# serial 26 # Copyright (C) 2001-2003, 2005, 2007, 2009-2019 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation @@ -105,6 +105,8 @@ AC_DEFUN([gl_FUNC_GETTIMEOFDAY_CLOBBER], case "$host_os" in # Guess all is fine on glibc systems. *-gnu* | gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;; + # Guess all is fine on musl systems. + *-musl*) gl_cv_func_gettimeofday_clobber="guessing no" ;; # Guess no on native Windows. mingw*) gl_cv_func_gettimeofday_clobber="guessing no" ;; # If we don't know, assume the worst. diff --git a/m4/gnulib-common.m4 b/m4/gnulib-common.m4 index 7c0e3e8fa4a..57b94ed5325 100644 --- a/m4/gnulib-common.m4 +++ b/m4/gnulib-common.m4 @@ -1,4 +1,4 @@ -# gnulib-common.m4 serial 41 +# gnulib-common.m4 serial 44 dnl Copyright (C) 2007-2019 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -17,10 +17,13 @@ AC_DEFUN([gl_COMMON_BODY], [ AH_VERBATIM([_Noreturn], [/* The _Noreturn keyword of C11. */ #ifndef _Noreturn -# if 201103 <= (defined __cplusplus ? __cplusplus : 0) +# if (defined __cplusplus \ + && ((201103 <= __cplusplus && !(__GNUC__ == 4 && __GNUC_MINOR__ == 7)) \ + || (defined _MSC_VER && 1900 <= _MSC_VER))) # define _Noreturn [[noreturn]] -# elif (201112 <= (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) \ - || 4 < __GNUC__ + (7 <= __GNUC_MINOR__)) +# elif ((!defined __cplusplus || defined __clang__) \ + && (201112 <= (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) \ + || 4 < __GNUC__ + (7 <= __GNUC_MINOR__))) /* _Noreturn works as-is. */ # elif 2 < __GNUC__ + (8 <= __GNUC_MINOR__) || 0x5110 <= __SUNPRO_C # define _Noreturn __attribute__ ((__noreturn__)) @@ -85,6 +88,33 @@ AC_DEFUN([gl_COMMON_BODY], [ # define _GL_ATTRIBUTE_MALLOC /* empty */ #endif ]) + AH_VERBATIM([async_safe], +[/* The _GL_ASYNC_SAFE marker should be attached to functions that are + signal handlers (for signals other than SIGABRT, SIGPIPE) or can be + invoked from such signal handlers. Such functions have some restrictions: + * All functions that it calls should be marked _GL_ASYNC_SAFE as well, + or should be listed as async-signal-safe in POSIX + <http://pubs.opengroup.org/onlinepubs/9699919799/functions/V2_chap02.html#tag_15_04> + section 2.4.3. Note that malloc(), sprintf(), and fwrite(), in + particular, are NOT async-signal-safe. + * All memory locations (variables and struct fields) that these functions + access must be marked 'volatile'. This holds for both read and write + accesses. Otherwise the compiler might optimize away stores to and + reads from such locations that occur in the program, depending on its + data flow analysis. For example, when the program contains a loop + that is intended to inspect a variable set from within a signal handler + while (!signal_occurred) + ; + the compiler is allowed to transform this into an endless loop if the + variable 'signal_occurred' is not declared 'volatile'. + Additionally, recall that: + * A signal handler should not modify errno (except if it is a handler + for a fatal signal and ends by raising the same signal again, thus + provoking the termination of the process). If it invokes a function + that may clobber errno, it needs to save and restore the value of + errno. */ +#define _GL_ASYNC_SAFE +]) dnl Preparation for running test programs: dnl Tell glibc to write diagnostics from -D_FORTIFY_SOURCE=2 to stderr, not dnl to /dev/tty, so they can be redirected to log files. Such diagnostics diff --git a/m4/putenv.m4 b/m4/putenv.m4 index f8960f66be5..342ba2636ab 100644 --- a/m4/putenv.m4 +++ b/m4/putenv.m4 @@ -1,4 +1,4 @@ -# putenv.m4 serial 22 +# putenv.m4 serial 23 dnl Copyright (C) 2002-2019 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -36,6 +36,8 @@ AC_DEFUN([gl_FUNC_PUTENV], [case "$host_os" in # Guess yes on glibc systems. *-gnu* | gnu*) gl_cv_func_svid_putenv="guessing yes" ;; + # Guess yes on musl systems. + *-musl*) gl_cv_func_svid_putenv="guessing yes" ;; # Guess no on native Windows. mingw*) gl_cv_func_svid_putenv="guessing no" ;; # If we don't know, assume the worst. diff --git a/m4/utimes.m4 b/m4/utimes.m4 index 7209b6dd599..5806d8fbbb6 100644 --- a/m4/utimes.m4 +++ b/m4/utimes.m4 @@ -1,5 +1,5 @@ # Detect some bugs in glibc's implementation of utimes. -# serial 5 +# serial 6 dnl Copyright (C) 2003-2005, 2009-2019 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation @@ -143,9 +143,11 @@ main () [gl_cv_func_working_utimes=yes], [gl_cv_func_working_utimes=no], [case "$host_os" in - # Guess no on native Windows. - mingw*) gl_cv_func_working_utimes="guessing no" ;; - *) gl_cv_func_working_utimes="guessing no" ;; + # Guess yes on musl systems. + *-musl*) gl_cv_func_working_utimes="guessing yes" ;; + # Guess no on native Windows. + mingw*) gl_cv_func_working_utimes="guessing no" ;; + *) gl_cv_func_working_utimes="guessing no" ;; esac ]) ]) |