diff options
| author | Vibhav Pant | 2020-08-21 14:04:35 +0530 |
|---|---|---|
| committer | Vibhav Pant | 2020-08-21 14:04:35 +0530 |
| commit | f0f8d7b82492e741950c363a03b886965c91b1b0 (patch) | |
| tree | 19b716830b1ebabc0d7d75949c4e6800c0f104ad /m4 | |
| parent | 9e64a087c4d167e7ec1c4e22bea3e6af53b563de (diff) | |
| parent | c818c29771d3cb51875643b2f6c894073e429dd2 (diff) | |
| download | emacs-feature/native-comp-macos-fixes.tar.gz emacs-feature/native-comp-macos-fixes.zip | |
Merge branch 'feature/native-comp' into feature/native-comp-macos-fixesfeature/native-comp-macos-fixes
Diffstat (limited to 'm4')
| -rw-r--r-- | m4/00gnulib.m4 | 38 | ||||
| -rw-r--r-- | m4/absolute-header.m4 | 10 | ||||
| -rw-r--r-- | m4/alloca.m4 | 4 | ||||
| -rw-r--r-- | m4/canonicalize.m4 | 14 | ||||
| -rw-r--r-- | m4/dup2.m4 | 3 | ||||
| -rw-r--r-- | m4/fchmodat.m4 | 4 | ||||
| -rw-r--r-- | m4/fcntl.m4 | 3 | ||||
| -rw-r--r-- | m4/fdopendir.m4 | 20 | ||||
| -rw-r--r-- | m4/fpending.m4 | 4 | ||||
| -rw-r--r-- | m4/futimens.m4 | 5 | ||||
| -rw-r--r-- | m4/getdtablesize.m4 | 19 | ||||
| -rw-r--r-- | m4/getloadavg.m4 | 4 | ||||
| -rw-r--r-- | m4/getrandom.m4 | 5 | ||||
| -rw-r--r-- | m4/gnulib-common.m4 | 82 | ||||
| -rw-r--r-- | m4/include_next.m4 | 18 | ||||
| -rw-r--r-- | m4/largefile.m4 | 6 | ||||
| -rw-r--r-- | m4/manywarnings.m4 | 8 | ||||
| -rw-r--r-- | m4/mktime.m4 | 8 | ||||
| -rw-r--r-- | m4/nstrftime.m4 | 4 | ||||
| -rw-r--r-- | m4/open-slash.m4 | 3 | ||||
| -rw-r--r-- | m4/pselect.m4 | 5 | ||||
| -rw-r--r-- | m4/pthread_sigmask.m4 | 3 | ||||
| -rw-r--r-- | m4/sys_random_h.m4 | 5 | ||||
| -rw-r--r-- | m4/time_h.m4 | 1 | ||||
| -rw-r--r-- | m4/utimens.m4 | 5 | ||||
| -rw-r--r-- | m4/utimensat.m4 | 5 | ||||
| -rw-r--r-- | m4/utimes.m4 | 3 | ||||
| -rw-r--r-- | m4/warnings.m4 | 21 |
28 files changed, 174 insertions, 136 deletions
diff --git a/m4/00gnulib.m4 b/m4/00gnulib.m4 index 06eff4f3863..14628c363b7 100644 --- a/m4/00gnulib.m4 +++ b/m4/00gnulib.m4 | |||
| @@ -1,44 +1,12 @@ | |||
| 1 | # 00gnulib.m4 serial 7 | 1 | # 00gnulib.m4 serial 8 |
| 2 | dnl Copyright (C) 2009-2020 Free Software Foundation, Inc. | 2 | dnl Copyright (C) 2009-2020 Free Software Foundation, Inc. |
| 3 | dnl This file is free software; the Free Software Foundation | 3 | dnl This file is free software; the Free Software Foundation |
| 4 | dnl gives unlimited permission to copy and/or distribute it, | 4 | dnl gives unlimited permission to copy and/or distribute it, |
| 5 | dnl with or without modifications, as long as this notice is preserved. | 5 | dnl with or without modifications, as long as this notice is preserved. |
| 6 | 6 | ||
| 7 | dnl This file must be named something that sorts before all other | 7 | dnl This file must be named something that sorts before all other |
| 8 | dnl gnulib-provided .m4 files. The first part is needed until such time | 8 | dnl gnulib-provided .m4 files. It is needed until the clang fix has |
| 9 | dnl as we can assume Autoconf 2.64, with its improved AC_DEFUN_ONCE and | 9 | dnl been included in Autoconf. |
| 10 | dnl m4_divert semantics. The second part is needed until the clang fix | ||
| 11 | dnl has been included in Autoconf. | ||
| 12 | |||
| 13 | # Until autoconf 2.63, handling of the diversion stack required m4_init | ||
| 14 | # to be called first; but this does not happen with aclocal. Wrapping | ||
| 15 | # the entire execution in another layer of the diversion stack fixes this. | ||
| 16 | # Worse, prior to autoconf 2.62, m4_wrap depended on the underlying m4 | ||
| 17 | # for whether it was FIFO or LIFO; in order to properly balance with | ||
| 18 | # m4_init, we need to undo our push just before anything wrapped within | ||
| 19 | # the m4_init body. The way to ensure this is to wrap both sides of | ||
| 20 | # m4_init with a one-shot macro that does the pop at the right time. | ||
| 21 | m4_ifndef([_m4_divert_diversion], | ||
| 22 | [m4_divert_push([KILL]) | ||
| 23 | m4_define([gl_divert_fixup], [m4_divert_pop()m4_define([$0])]) | ||
| 24 | m4_define([m4_init], | ||
| 25 | [gl_divert_fixup()]m4_defn([m4_init])[gl_divert_fixup()])]) | ||
| 26 | |||
| 27 | |||
| 28 | # AC_DEFUN_ONCE([NAME], VALUE) | ||
| 29 | # ---------------------------- | ||
| 30 | # Define NAME to expand to VALUE on the first use (whether by direct | ||
| 31 | # expansion, or by AC_REQUIRE), and to nothing on all subsequent uses. | ||
| 32 | # Avoid bugs in AC_REQUIRE in Autoconf 2.63 and earlier. This | ||
| 33 | # definition is slower than the version in Autoconf 2.64, because it | ||
| 34 | # can only use interfaces that existed since 2.59; but it achieves the | ||
| 35 | # same effect. Quoting is necessary to avoid confusing Automake. | ||
| 36 | m4_version_prereq([2.63.263], [], | ||
| 37 | [m4_define([AC][_DEFUN_ONCE], | ||
| 38 | [AC][_DEFUN([$1], | ||
| 39 | [AC_REQUIRE([_gl_DEFUN_ONCE([$1])], | ||
| 40 | [m4_indir([_gl_DEFUN_ONCE([$1])])])])]dnl | ||
| 41 | [AC][_DEFUN([_gl_DEFUN_ONCE([$1])], [$2])])]) | ||
| 42 | 10 | ||
| 43 | # The following definitions arrange to use a compiler option | 11 | # The following definitions arrange to use a compiler option |
| 44 | # -Werror=implicit-function-declaration in AC_CHECK_DECL, when the | 12 | # -Werror=implicit-function-declaration in AC_CHECK_DECL, when the |
diff --git a/m4/absolute-header.m4 b/m4/absolute-header.m4 index 39726ba57ba..c043233de36 100644 --- a/m4/absolute-header.m4 +++ b/m4/absolute-header.m4 | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | # absolute-header.m4 serial 16 | 1 | # absolute-header.m4 serial 17 |
| 2 | dnl Copyright (C) 2006-2020 Free Software Foundation, Inc. | 2 | dnl Copyright (C) 2006-2020 Free Software Foundation, Inc. |
| 3 | dnl This file is free software; the Free Software Foundation | 3 | dnl This file is free software; the Free Software Foundation |
| 4 | dnl gives unlimited permission to copy and/or distribute it, | 4 | dnl gives unlimited permission to copy and/or distribute it, |
| @@ -22,23 +22,21 @@ dnl From Derek Price. | |||
| 22 | AC_DEFUN([gl_ABSOLUTE_HEADER], | 22 | AC_DEFUN([gl_ABSOLUTE_HEADER], |
| 23 | [AC_REQUIRE([AC_CANONICAL_HOST]) | 23 | [AC_REQUIRE([AC_CANONICAL_HOST]) |
| 24 | AC_LANG_PREPROC_REQUIRE()dnl | 24 | AC_LANG_PREPROC_REQUIRE()dnl |
| 25 | dnl FIXME: gl_absolute_header and ac_header_exists must be used unquoted | ||
| 26 | dnl until we can assume autoconf 2.64 or newer. | ||
| 27 | m4_foreach_w([gl_HEADER_NAME], [$1], | 25 | m4_foreach_w([gl_HEADER_NAME], [$1], |
| 28 | [AS_VAR_PUSHDEF([gl_absolute_header], | 26 | [AS_VAR_PUSHDEF([gl_absolute_header], |
| 29 | [gl_cv_absolute_]m4_defn([gl_HEADER_NAME]))dnl | 27 | [gl_cv_absolute_]m4_defn([gl_HEADER_NAME]))dnl |
| 30 | AC_CACHE_CHECK([absolute name of <]m4_defn([gl_HEADER_NAME])[>], | 28 | AC_CACHE_CHECK([absolute name of <]m4_defn([gl_HEADER_NAME])[>], |
| 31 | m4_defn([gl_absolute_header]), | 29 | [gl_absolute_header], |
| 32 | [AS_VAR_PUSHDEF([ac_header_exists], | 30 | [AS_VAR_PUSHDEF([ac_header_exists], |
| 33 | [ac_cv_header_]m4_defn([gl_HEADER_NAME]))dnl | 31 | [ac_cv_header_]m4_defn([gl_HEADER_NAME]))dnl |
| 34 | AC_CHECK_HEADERS_ONCE(m4_defn([gl_HEADER_NAME]))dnl | 32 | AC_CHECK_HEADERS_ONCE(m4_defn([gl_HEADER_NAME]))dnl |
| 35 | if test AS_VAR_GET(ac_header_exists) = yes; then | 33 | if test AS_VAR_GET([ac_header_exists]) = yes; then |
| 36 | gl_ABSOLUTE_HEADER_ONE(m4_defn([gl_HEADER_NAME])) | 34 | gl_ABSOLUTE_HEADER_ONE(m4_defn([gl_HEADER_NAME])) |
| 37 | fi | 35 | fi |
| 38 | AS_VAR_POPDEF([ac_header_exists])dnl | 36 | AS_VAR_POPDEF([ac_header_exists])dnl |
| 39 | ])dnl | 37 | ])dnl |
| 40 | AC_DEFINE_UNQUOTED(AS_TR_CPP([ABSOLUTE_]m4_defn([gl_HEADER_NAME])), | 38 | AC_DEFINE_UNQUOTED(AS_TR_CPP([ABSOLUTE_]m4_defn([gl_HEADER_NAME])), |
| 41 | ["AS_VAR_GET(gl_absolute_header)"], | 39 | ["AS_VAR_GET([gl_absolute_header])"], |
| 42 | [Define this to an absolute name of <]m4_defn([gl_HEADER_NAME])[>.]) | 40 | [Define this to an absolute name of <]m4_defn([gl_HEADER_NAME])[>.]) |
| 43 | AS_VAR_POPDEF([gl_absolute_header])dnl | 41 | AS_VAR_POPDEF([gl_absolute_header])dnl |
| 44 | ])dnl | 42 | ])dnl |
diff --git a/m4/alloca.m4 b/m4/alloca.m4 index b777f8450ce..d8414896308 100644 --- a/m4/alloca.m4 +++ b/m4/alloca.m4 | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | # alloca.m4 serial 17 | 1 | # alloca.m4 serial 18 |
| 2 | dnl Copyright (C) 2002-2004, 2006-2007, 2009-2020 Free Software Foundation, | 2 | dnl Copyright (C) 2002-2004, 2006-2007, 2009-2020 Free Software Foundation, |
| 3 | dnl Inc. | 3 | dnl Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| @@ -102,7 +102,7 @@ AH_VERBATIM([STACK_DIRECTION], | |||
| 102 | STACK_DIRECTION > 0 => grows toward higher addresses | 102 | STACK_DIRECTION > 0 => grows toward higher addresses |
| 103 | STACK_DIRECTION < 0 => grows toward lower addresses | 103 | STACK_DIRECTION < 0 => grows toward lower addresses |
| 104 | STACK_DIRECTION = 0 => direction of growth unknown */ | 104 | STACK_DIRECTION = 0 => direction of growth unknown */ |
| 105 | @%:@undef STACK_DIRECTION])dnl | 105 | #undef STACK_DIRECTION])dnl |
| 106 | AC_DEFINE_UNQUOTED(STACK_DIRECTION, $ac_cv_c_stack_direction) | 106 | AC_DEFINE_UNQUOTED(STACK_DIRECTION, $ac_cv_c_stack_direction) |
| 107 | ]) | 107 | ]) |
| 108 | ]) | 108 | ]) |
diff --git a/m4/canonicalize.m4 b/m4/canonicalize.m4 index bdc5c8f71a7..14ea3e12fa0 100644 --- a/m4/canonicalize.m4 +++ b/m4/canonicalize.m4 | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | # canonicalize.m4 serial 31 | 1 | # canonicalize.m4 serial 33 |
| 2 | 2 | ||
| 3 | dnl Copyright (C) 2003-2007, 2009-2020 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2003-2007, 2009-2020 Free Software Foundation, Inc. |
| 4 | 4 | ||
| @@ -56,7 +56,16 @@ AC_DEFUN([gl_CANONICALIZE_LGPL], | |||
| 56 | AC_DEFUN([gl_CANONICALIZE_LGPL_SEPARATE], | 56 | AC_DEFUN([gl_CANONICALIZE_LGPL_SEPARATE], |
| 57 | [ | 57 | [ |
| 58 | AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) | 58 | AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) |
| 59 | AC_CHECK_FUNCS_ONCE([canonicalize_file_name getcwd readlink]) | 59 | AC_CHECK_FUNCS_ONCE([canonicalize_file_name readlink]) |
| 60 | |||
| 61 | dnl On native Windows, we use _getcwd(), regardless whether getcwd() is | ||
| 62 | dnl available through the linker option '-loldnames'. | ||
| 63 | AC_REQUIRE([AC_CANONICAL_HOST]) | ||
| 64 | case "$host_os" in | ||
| 65 | mingw*) ;; | ||
| 66 | *) AC_CHECK_FUNCS([getcwd]) ;; | ||
| 67 | esac | ||
| 68 | |||
| 60 | AC_REQUIRE([gl_DOUBLE_SLASH_ROOT]) | 69 | AC_REQUIRE([gl_DOUBLE_SLASH_ROOT]) |
| 61 | AC_REQUIRE([gl_FUNC_REALPATH_WORKS]) | 70 | AC_REQUIRE([gl_FUNC_REALPATH_WORKS]) |
| 62 | AC_CHECK_HEADERS_ONCE([sys/param.h]) | 71 | AC_CHECK_HEADERS_ONCE([sys/param.h]) |
| @@ -70,6 +79,7 @@ AC_DEFUN([gl_FUNC_REALPATH_WORKS], | |||
| 70 | AC_CHECK_FUNCS_ONCE([realpath]) | 79 | AC_CHECK_FUNCS_ONCE([realpath]) |
| 71 | AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles | 80 | AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles |
| 72 | AC_CACHE_CHECK([whether realpath works], [gl_cv_func_realpath_works], [ | 81 | AC_CACHE_CHECK([whether realpath works], [gl_cv_func_realpath_works], [ |
| 82 | rm -rf conftest.a conftest.d | ||
| 73 | touch conftest.a | 83 | touch conftest.a |
| 74 | mkdir conftest.d | 84 | mkdir conftest.d |
| 75 | AC_RUN_IFELSE([ | 85 | AC_RUN_IFELSE([ |
diff --git a/m4/dup2.m4 b/m4/dup2.m4 index 462bfd0e526..a82798d6bba 100644 --- a/m4/dup2.m4 +++ b/m4/dup2.m4 | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | #serial 26 | 1 | #serial 27 |
| 2 | dnl Copyright (C) 2002, 2005, 2007, 2009-2020 Free Software Foundation, Inc. | 2 | dnl Copyright (C) 2002, 2005, 2007, 2009-2020 Free Software Foundation, Inc. |
| 3 | dnl This file is free software; the Free Software Foundation | 3 | dnl This file is free software; the Free Software Foundation |
| 4 | dnl gives unlimited permission to copy and/or distribute it, | 4 | dnl gives unlimited permission to copy and/or distribute it, |
| @@ -16,6 +16,7 @@ AC_DEFUN([gl_FUNC_DUP2], | |||
| 16 | #include <limits.h> | 16 | #include <limits.h> |
| 17 | #include <sys/resource.h> | 17 | #include <sys/resource.h> |
| 18 | #include <unistd.h> | 18 | #include <unistd.h> |
| 19 | ]GL_MDA_DEFINES[ | ||
| 19 | #ifndef RLIM_SAVED_CUR | 20 | #ifndef RLIM_SAVED_CUR |
| 20 | # define RLIM_SAVED_CUR RLIM_INFINITY | 21 | # define RLIM_SAVED_CUR RLIM_INFINITY |
| 21 | #endif | 22 | #endif |
diff --git a/m4/fchmodat.m4 b/m4/fchmodat.m4 index e3f2f048162..cf5c87999c5 100644 --- a/m4/fchmodat.m4 +++ b/m4/fchmodat.m4 | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | # fchmodat.m4 serial 4 | 1 | # fchmodat.m4 serial 5 |
| 2 | dnl Copyright (C) 2004-2020 Free Software Foundation, Inc. | 2 | dnl Copyright (C) 2004-2020 Free Software Foundation, Inc. |
| 3 | dnl This file is free software; the Free Software Foundation | 3 | dnl This file is free software; the Free Software Foundation |
| 4 | dnl gives unlimited permission to copy and/or distribute it, | 4 | dnl gives unlimited permission to copy and/or distribute it, |
| @@ -40,7 +40,7 @@ AC_DEFUN([gl_FUNC_FCHMODAT], | |||
| 40 | #ifndef S_IRWXO | 40 | #ifndef S_IRWXO |
| 41 | #define S_IRWXO 0007 | 41 | #define S_IRWXO 0007 |
| 42 | #endif | 42 | #endif |
| 43 | ]], | 43 | ]GL_MDA_DEFINES], |
| 44 | [[ | 44 | [[ |
| 45 | int permissive = S_IRWXU | S_IRWXG | S_IRWXO; | 45 | int permissive = S_IRWXU | S_IRWXG | S_IRWXO; |
| 46 | int desired = S_IRUSR | S_IWUSR; | 46 | int desired = S_IRUSR | S_IWUSR; |
diff --git a/m4/fcntl.m4 b/m4/fcntl.m4 index 562ae2395df..ea24f3d64ef 100644 --- a/m4/fcntl.m4 +++ b/m4/fcntl.m4 | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | # fcntl.m4 serial 9 | 1 | # fcntl.m4 serial 10 |
| 2 | dnl Copyright (C) 2009-2020 Free Software Foundation, Inc. | 2 | dnl Copyright (C) 2009-2020 Free Software Foundation, Inc. |
| 3 | dnl This file is free software; the Free Software Foundation | 3 | dnl This file is free software; the Free Software Foundation |
| 4 | dnl gives unlimited permission to copy and/or distribute it, | 4 | dnl gives unlimited permission to copy and/or distribute it, |
| @@ -34,6 +34,7 @@ AC_DEFUN([gl_FUNC_FCNTL], | |||
| 34 | #include <limits.h> | 34 | #include <limits.h> |
| 35 | #include <sys/resource.h> | 35 | #include <sys/resource.h> |
| 36 | #include <unistd.h> | 36 | #include <unistd.h> |
| 37 | ]GL_MDA_DEFINES[ | ||
| 37 | #ifndef RLIM_SAVED_CUR | 38 | #ifndef RLIM_SAVED_CUR |
| 38 | # define RLIM_SAVED_CUR RLIM_INFINITY | 39 | # define RLIM_SAVED_CUR RLIM_INFINITY |
| 39 | #endif | 40 | #endif |
diff --git a/m4/fdopendir.m4 b/m4/fdopendir.m4 index d9cc1a00173..9937a74ea8d 100644 --- a/m4/fdopendir.m4 +++ b/m4/fdopendir.m4 | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | # serial 12 | 1 | # serial 14 |
| 2 | # See if we need to provide fdopendir. | 2 | # See if we need to provide fdopendir. |
| 3 | 3 | ||
| 4 | dnl Copyright (C) 2009-2020 Free Software Foundation, Inc. | 4 | dnl Copyright (C) 2009-2020 Free Software Foundation, Inc. |
| @@ -25,10 +25,12 @@ AC_DEFUN([gl_FUNC_FDOPENDIR], | |||
| 25 | else | 25 | else |
| 26 | AC_CACHE_CHECK([whether fdopendir works], | 26 | AC_CACHE_CHECK([whether fdopendir works], |
| 27 | [gl_cv_func_fdopendir_works], | 27 | [gl_cv_func_fdopendir_works], |
| 28 | [AC_RUN_IFELSE([AC_LANG_PROGRAM([[ | 28 | [AC_RUN_IFELSE( |
| 29 | [AC_LANG_PROGRAM([[ | ||
| 29 | #include <dirent.h> | 30 | #include <dirent.h> |
| 30 | #include <fcntl.h> | 31 | #include <fcntl.h> |
| 31 | #include <unistd.h> | 32 | #include <unistd.h> |
| 33 | ]GL_MDA_DEFINES[ | ||
| 32 | #if !HAVE_DECL_FDOPENDIR | 34 | #if !HAVE_DECL_FDOPENDIR |
| 33 | extern | 35 | extern |
| 34 | # ifdef __cplusplus | 36 | # ifdef __cplusplus |
| @@ -36,12 +38,14 @@ extern | |||
| 36 | # endif | 38 | # endif |
| 37 | DIR *fdopendir (int); | 39 | DIR *fdopendir (int); |
| 38 | #endif | 40 | #endif |
| 39 | ]], [int result = 0; | 41 | ]], |
| 40 | int fd = open ("conftest.c", O_RDONLY); | 42 | [[int result = 0; |
| 41 | if (fd < 0) result |= 1; | 43 | int fd = open ("conftest.c", O_RDONLY); |
| 42 | if (fdopendir (fd)) result |= 2; | 44 | if (fd < 0) result |= 1; |
| 43 | if (close (fd)) result |= 4; | 45 | if (fdopendir (fd)) result |= 2; |
| 44 | return result;])], | 46 | if (close (fd)) result |= 4; |
| 47 | return result; | ||
| 48 | ]])], | ||
| 45 | [gl_cv_func_fdopendir_works=yes], | 49 | [gl_cv_func_fdopendir_works=yes], |
| 46 | [gl_cv_func_fdopendir_works=no], | 50 | [gl_cv_func_fdopendir_works=no], |
| 47 | [case "$host_os" in | 51 | [case "$host_os" in |
diff --git a/m4/fpending.m4 b/m4/fpending.m4 index ea9725e4890..edabcec5f0b 100644 --- a/m4/fpending.m4 +++ b/m4/fpending.m4 | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | # serial 22 | 1 | # serial 23 |
| 2 | 2 | ||
| 3 | # Copyright (C) 2000-2001, 2004-2020 Free Software Foundation, Inc. | 3 | # Copyright (C) 2000-2001, 2004-2020 Free Software Foundation, Inc. |
| 4 | # This file is free software; the Free Software Foundation | 4 | # This file is free software; the Free Software Foundation |
| @@ -25,7 +25,7 @@ AC_DEFUN([gl_FUNC_FPENDING], | |||
| 25 | AC_CACHE_CHECK([for __fpending], [gl_cv_func___fpending], | 25 | AC_CACHE_CHECK([for __fpending], [gl_cv_func___fpending], |
| 26 | [ | 26 | [ |
| 27 | AC_LINK_IFELSE( | 27 | AC_LINK_IFELSE( |
| 28 | [AC_LANG_PROGRAM([$fp_headers], | 28 | [AC_LANG_PROGRAM([[$fp_headers]], |
| 29 | [[return ! __fpending (stdin);]])], | 29 | [[return ! __fpending (stdin);]])], |
| 30 | [gl_cv_func___fpending=yes], | 30 | [gl_cv_func___fpending=yes], |
| 31 | [gl_cv_func___fpending=no]) | 31 | [gl_cv_func___fpending=no]) |
diff --git a/m4/futimens.m4 b/m4/futimens.m4 index dc5cfa94119..145b8ff0d51 100644 --- a/m4/futimens.m4 +++ b/m4/futimens.m4 | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | # serial 8 | 1 | # serial 9 |
| 2 | # See if we need to provide futimens replacement. | 2 | # See if we need to provide futimens replacement. |
| 3 | 3 | ||
| 4 | dnl Copyright (C) 2009-2020 Free Software Foundation, Inc. | 4 | dnl Copyright (C) 2009-2020 Free Software Foundation, Inc. |
| @@ -24,7 +24,8 @@ AC_DEFUN([gl_FUNC_FUTIMENS], | |||
| 24 | #include <sys/stat.h> | 24 | #include <sys/stat.h> |
| 25 | #include <unistd.h> | 25 | #include <unistd.h> |
| 26 | #include <errno.h> | 26 | #include <errno.h> |
| 27 | ]], [[struct timespec ts[2]; | 27 | ]GL_MDA_DEFINES], |
| 28 | [[struct timespec ts[2]; | ||
| 28 | int fd = creat ("conftest.file", 0600); | 29 | int fd = creat ("conftest.file", 0600); |
| 29 | struct stat st; | 30 | struct stat st; |
| 30 | if (fd < 0) return 1; | 31 | if (fd < 0) return 1; |
diff --git a/m4/getdtablesize.m4 b/m4/getdtablesize.m4 index ab2e3feb37b..af328644adb 100644 --- a/m4/getdtablesize.m4 +++ b/m4/getdtablesize.m4 | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | # getdtablesize.m4 serial 7 | 1 | # getdtablesize.m4 serial 8 |
| 2 | dnl Copyright (C) 2008-2020 Free Software Foundation, Inc. | 2 | dnl Copyright (C) 2008-2020 Free Software Foundation, Inc. |
| 3 | dnl This file is free software; the Free Software Foundation | 3 | dnl This file is free software; the Free Software Foundation |
| 4 | dnl gives unlimited permission to copy and/or distribute it, | 4 | dnl gives unlimited permission to copy and/or distribute it, |
| @@ -29,13 +29,16 @@ AC_DEFUN([gl_FUNC_GETDTABLESIZE], | |||
| 29 | dnl correctly require setrlimit before getdtablesize() can report | 29 | dnl correctly require setrlimit before getdtablesize() can report |
| 30 | dnl a larger value. | 30 | dnl a larger value. |
| 31 | AC_RUN_IFELSE([ | 31 | AC_RUN_IFELSE([ |
| 32 | AC_LANG_PROGRAM([[#include <unistd.h>]], | 32 | AC_LANG_PROGRAM( |
| 33 | [int size = getdtablesize(); | 33 | [[#include <unistd.h>] |
| 34 | if (dup2 (0, getdtablesize()) != -1) | 34 | GL_MDA_DEFINES |
| 35 | return 1; | 35 | ], |
| 36 | if (size != getdtablesize()) | 36 | [[int size = getdtablesize(); |
| 37 | return 2; | 37 | if (dup2 (0, getdtablesize()) != -1) |
| 38 | ])], | 38 | return 1; |
| 39 | if (size != getdtablesize()) | ||
| 40 | return 2; | ||
| 41 | ]])], | ||
| 39 | [gl_cv_func_getdtablesize_works=yes], | 42 | [gl_cv_func_getdtablesize_works=yes], |
| 40 | [gl_cv_func_getdtablesize_works=no], | 43 | [gl_cv_func_getdtablesize_works=no], |
| 41 | [case "$host_os" in | 44 | [case "$host_os" in |
diff --git a/m4/getloadavg.m4 b/m4/getloadavg.m4 index 8e96965d828..9fe328efc02 100644 --- a/m4/getloadavg.m4 +++ b/m4/getloadavg.m4 | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | # gives unlimited permission to copy and/or distribute it, | 7 | # gives unlimited permission to copy and/or distribute it, |
| 8 | # with or without modifications, as long as this notice is preserved. | 8 | # with or without modifications, as long as this notice is preserved. |
| 9 | 9 | ||
| 10 | #serial 9 | 10 | #serial 10 |
| 11 | 11 | ||
| 12 | # Autoconf defines AC_FUNC_GETLOADAVG, but that is obsolescent. | 12 | # Autoconf defines AC_FUNC_GETLOADAVG, but that is obsolescent. |
| 13 | # New applications should use gl_GETLOADAVG instead. | 13 | # New applications should use gl_GETLOADAVG instead. |
| @@ -147,7 +147,7 @@ fi | |||
| 147 | AC_CHECK_HEADERS([nlist.h], | 147 | AC_CHECK_HEADERS([nlist.h], |
| 148 | [AC_CHECK_MEMBERS([struct nlist.n_un.n_name], | 148 | [AC_CHECK_MEMBERS([struct nlist.n_un.n_name], |
| 149 | [], [], | 149 | [], [], |
| 150 | [@%:@include <nlist.h>]) | 150 | [#include <nlist.h>]) |
| 151 | AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <nlist.h>]], | 151 | AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <nlist.h>]], |
| 152 | [[struct nlist x; | 152 | [[struct nlist x; |
| 153 | #ifdef HAVE_STRUCT_NLIST_N_UN_N_NAME | 153 | #ifdef HAVE_STRUCT_NLIST_N_UN_N_NAME |
diff --git a/m4/getrandom.m4 b/m4/getrandom.m4 index 424c2fad3e3..d6da71a2c83 100644 --- a/m4/getrandom.m4 +++ b/m4/getrandom.m4 | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | # getrandom.m4 serial 7 | 1 | # getrandom.m4 serial 8 |
| 2 | dnl Copyright 2020 Free Software Foundation, Inc. | 2 | dnl Copyright 2020 Free Software Foundation, Inc. |
| 3 | dnl This file is free software; the Free Software Foundation | 3 | dnl This file is free software; the Free Software Foundation |
| 4 | dnl gives unlimited permission to copy and/or distribute it, | 4 | dnl gives unlimited permission to copy and/or distribute it, |
| @@ -18,7 +18,8 @@ AC_DEFUN([gl_FUNC_GETRANDOM], | |||
| 18 | [gl_cv_func_getrandom_ok], | 18 | [gl_cv_func_getrandom_ok], |
| 19 | [AC_COMPILE_IFELSE( | 19 | [AC_COMPILE_IFELSE( |
| 20 | [AC_LANG_PROGRAM( | 20 | [AC_LANG_PROGRAM( |
| 21 | [[/* Additional includes are needed before <sys/random.h> on Mac OS X. */ | 21 | [[/* Additional includes are needed before <sys/random.h> on uClibc |
| 22 | and Mac OS X. */ | ||
| 22 | #include <sys/types.h> | 23 | #include <sys/types.h> |
| 23 | #include <stdlib.h> | 24 | #include <stdlib.h> |
| 24 | #include <sys/random.h> | 25 | #include <sys/random.h> |
diff --git a/m4/gnulib-common.m4 b/m4/gnulib-common.m4 index 03da2287d48..33e56faa98e 100644 --- a/m4/gnulib-common.m4 +++ b/m4/gnulib-common.m4 | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | # gnulib-common.m4 serial 55 | 1 | # gnulib-common.m4 serial 57 |
| 2 | dnl Copyright (C) 2007-2020 Free Software Foundation, Inc. | 2 | dnl Copyright (C) 2007-2020 Free Software Foundation, Inc. |
| 3 | dnl This file is free software; the Free Software Foundation | 3 | dnl This file is free software; the Free Software Foundation |
| 4 | dnl gives unlimited permission to copy and/or distribute it, | 4 | dnl gives unlimited permission to copy and/or distribute it, |
| @@ -480,14 +480,6 @@ AC_DEFUN([gl_FEATURES_H], | |||
| 480 | AC_SUBST([HAVE_FEATURES_H]) | 480 | AC_SUBST([HAVE_FEATURES_H]) |
| 481 | ]) | 481 | ]) |
| 482 | 482 | ||
| 483 | # AS_VAR_IF(VAR, VALUE, [IF-MATCH], [IF-NOT-MATCH]) | ||
| 484 | # ---------------------------------------------------- | ||
| 485 | # Backport of autoconf-2.63b's macro. | ||
| 486 | # Remove this macro when we can assume autoconf >= 2.64. | ||
| 487 | m4_ifndef([AS_VAR_IF], | ||
| 488 | [m4_define([AS_VAR_IF], | ||
| 489 | [AS_IF([test x"AS_VAR_GET([$1])" = x""$2], [$3], [$4])])]) | ||
| 490 | |||
| 491 | # gl_PROG_CC_C99 | 483 | # gl_PROG_CC_C99 |
| 492 | # Modifies the value of the shell variable CC in an attempt to make $CC | 484 | # Modifies the value of the shell variable CC in an attempt to make $CC |
| 493 | # understand ISO C99 source code. | 485 | # understand ISO C99 source code. |
| @@ -660,6 +652,72 @@ AC_DEFUN([gl_CACHE_VAL_SILENT], | |||
| 660 | as_echo_n="$saved_as_echo_n" | 652 | as_echo_n="$saved_as_echo_n" |
| 661 | ]) | 653 | ]) |
| 662 | 654 | ||
| 663 | # AS_VAR_COPY was added in autoconf 2.63b | 655 | dnl Expands to some code for use in .c programs that, on native Windows, defines |
| 664 | m4_define_default([AS_VAR_COPY], | 656 | dnl the Microsoft deprecated alias function names to the underscore-prefixed |
| 665 | [AS_LITERAL_IF([$1[]$2], [$1=$$2], [eval $1=\$$2])]) | 657 | dnl actual function names. With this macro, these function names are available |
| 658 | dnl without linking with '-loldnames' and without generating warnings. | ||
| 659 | dnl Usage: Use it after all system header files are included. | ||
| 660 | dnl #include <...> | ||
| 661 | dnl #include <...> | ||
| 662 | dnl ]GL_MDA_DEFINES[ | ||
| 663 | dnl ... | ||
| 664 | AC_DEFUN([GL_MDA_DEFINES],[ | ||
| 665 | AC_REQUIRE([_GL_MDA_DEFINES]) | ||
| 666 | [$gl_mda_defines] | ||
| 667 | ]) | ||
| 668 | AC_DEFUN([_GL_MDA_DEFINES], | ||
| 669 | [gl_mda_defines=' | ||
| 670 | #if defined _WIN32 && !defined __CYGWIN__ | ||
| 671 | #define access _access | ||
| 672 | #define chdir _chdir | ||
| 673 | #define chmod _chmod | ||
| 674 | #define close _close | ||
| 675 | #define creat _creat | ||
| 676 | #define dup _dup | ||
| 677 | #define dup2 _dup2 | ||
| 678 | #define ecvt _ecvt | ||
| 679 | #define execl _execl | ||
| 680 | #define execle _execle | ||
| 681 | #define execlp _execlp | ||
| 682 | #define execv _execv | ||
| 683 | #define execve _execve | ||
| 684 | #define execvp _execvp | ||
| 685 | #define execvpe _execvpe | ||
| 686 | #define fcloseall _fcloseall | ||
| 687 | #define fcvt _fcvt | ||
| 688 | #define fdopen _fdopen | ||
| 689 | #define fileno _fileno | ||
| 690 | #define gcvt _gcvt | ||
| 691 | #define getcwd _getcwd | ||
| 692 | #define getpid _getpid | ||
| 693 | #define getw _getw | ||
| 694 | #define isatty _isatty | ||
| 695 | #define j0 _j0 | ||
| 696 | #define j1 _j1 | ||
| 697 | #define jn _jn | ||
| 698 | #define lfind _lfind | ||
| 699 | #define lsearch _lsearch | ||
| 700 | #define lseek _lseek | ||
| 701 | #define memccpy _memccpy | ||
| 702 | #define mkdir _mkdir | ||
| 703 | #define mktemp _mktemp | ||
| 704 | #define open _open | ||
| 705 | #define putenv _putenv | ||
| 706 | #define putw _putw | ||
| 707 | #define read _read | ||
| 708 | #define rmdir _rmdir | ||
| 709 | #define strdup _strdup | ||
| 710 | #define swab _swab | ||
| 711 | #define tempnam _tempnam | ||
| 712 | #define tzset _tzset | ||
| 713 | #define umask _umask | ||
| 714 | #define unlink _unlink | ||
| 715 | #define utime _utime | ||
| 716 | #define wcsdup _wcsdup | ||
| 717 | #define write _write | ||
| 718 | #define y0 _y0 | ||
| 719 | #define y1 _y1 | ||
| 720 | #define yn _yn | ||
| 721 | #endif | ||
| 722 | ' | ||
| 723 | ]) | ||
diff --git a/m4/include_next.m4 b/m4/include_next.m4 index 9009e293b53..33601aa3b43 100644 --- a/m4/include_next.m4 +++ b/m4/include_next.m4 | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | # include_next.m4 serial 24 | 1 | # include_next.m4 serial 25 |
| 2 | dnl Copyright (C) 2006-2020 Free Software Foundation, Inc. | 2 | dnl Copyright (C) 2006-2020 Free Software Foundation, Inc. |
| 3 | dnl This file is free software; the Free Software Foundation | 3 | dnl This file is free software; the Free Software Foundation |
| 4 | dnl gives unlimited permission to copy and/or distribute it, | 4 | dnl gives unlimited permission to copy and/or distribute it, |
| @@ -176,42 +176,40 @@ AC_DEFUN([gl_NEXT_HEADERS_INTERNAL], | |||
| 176 | [AC_CHECK_HEADERS_ONCE([$1]) | 176 | [AC_CHECK_HEADERS_ONCE([$1]) |
| 177 | ]) | 177 | ]) |
| 178 | 178 | ||
| 179 | dnl FIXME: gl_next_header and gl_header_exists must be used unquoted | ||
| 180 | dnl until we can assume autoconf 2.64 or newer. | ||
| 181 | m4_foreach_w([gl_HEADER_NAME], [$1], | 179 | m4_foreach_w([gl_HEADER_NAME], [$1], |
| 182 | [AS_VAR_PUSHDEF([gl_next_header], | 180 | [AS_VAR_PUSHDEF([gl_next_header], |
| 183 | [gl_cv_next_]m4_defn([gl_HEADER_NAME])) | 181 | [gl_cv_next_]m4_defn([gl_HEADER_NAME])) |
| 184 | if test $gl_cv_have_include_next = yes; then | 182 | if test $gl_cv_have_include_next = yes; then |
| 185 | AS_VAR_SET(gl_next_header, ['<'gl_HEADER_NAME'>']) | 183 | AS_VAR_SET([gl_next_header], ['<'gl_HEADER_NAME'>']) |
| 186 | else | 184 | else |
| 187 | AC_CACHE_CHECK( | 185 | AC_CACHE_CHECK( |
| 188 | [absolute name of <]m4_defn([gl_HEADER_NAME])[>], | 186 | [absolute name of <]m4_defn([gl_HEADER_NAME])[>], |
| 189 | m4_defn([gl_next_header]), | 187 | [gl_next_header], |
| 190 | [m4_if([$2], [check], | 188 | [m4_if([$2], [check], |
| 191 | [AS_VAR_PUSHDEF([gl_header_exists], | 189 | [AS_VAR_PUSHDEF([gl_header_exists], |
| 192 | [ac_cv_header_]m4_defn([gl_HEADER_NAME])) | 190 | [ac_cv_header_]m4_defn([gl_HEADER_NAME])) |
| 193 | if test AS_VAR_GET(gl_header_exists) = yes; then | 191 | if test AS_VAR_GET([gl_header_exists]) = yes; then |
| 194 | AS_VAR_POPDEF([gl_header_exists]) | 192 | AS_VAR_POPDEF([gl_header_exists]) |
| 195 | ]) | 193 | ]) |
| 196 | gl_ABSOLUTE_HEADER_ONE(gl_HEADER_NAME) | 194 | gl_ABSOLUTE_HEADER_ONE(gl_HEADER_NAME) |
| 197 | AS_VAR_COPY([gl_header], [gl_cv_absolute_]AS_TR_SH(gl_HEADER_NAME)) | 195 | AS_VAR_COPY([gl_header], [gl_cv_absolute_]AS_TR_SH(gl_HEADER_NAME)) |
| 198 | AS_VAR_SET(gl_next_header, ['"'$gl_header'"']) | 196 | AS_VAR_SET([gl_next_header], ['"'$gl_header'"']) |
| 199 | m4_if([$2], [check], | 197 | m4_if([$2], [check], |
| 200 | [else | 198 | [else |
| 201 | AS_VAR_SET(gl_next_header, ['<'gl_HEADER_NAME'>']) | 199 | AS_VAR_SET([gl_next_header], ['<'gl_HEADER_NAME'>']) |
| 202 | fi | 200 | fi |
| 203 | ]) | 201 | ]) |
| 204 | ]) | 202 | ]) |
| 205 | fi | 203 | fi |
| 206 | AC_SUBST( | 204 | AC_SUBST( |
| 207 | AS_TR_CPP([NEXT_]m4_defn([gl_HEADER_NAME])), | 205 | AS_TR_CPP([NEXT_]m4_defn([gl_HEADER_NAME])), |
| 208 | [AS_VAR_GET(gl_next_header)]) | 206 | [AS_VAR_GET([gl_next_header])]) |
| 209 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then | 207 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then |
| 210 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | 208 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' |
| 211 | gl_next_as_first_directive='<'gl_HEADER_NAME'>' | 209 | gl_next_as_first_directive='<'gl_HEADER_NAME'>' |
| 212 | else | 210 | else |
| 213 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | 211 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' |
| 214 | gl_next_as_first_directive=AS_VAR_GET(gl_next_header) | 212 | gl_next_as_first_directive=AS_VAR_GET([gl_next_header]) |
| 215 | fi | 213 | fi |
| 216 | AC_SUBST( | 214 | AC_SUBST( |
| 217 | AS_TR_CPP([NEXT_AS_FIRST_DIRECTIVE_]m4_defn([gl_HEADER_NAME])), | 215 | AS_TR_CPP([NEXT_AS_FIRST_DIRECTIVE_]m4_defn([gl_HEADER_NAME])), |
diff --git a/m4/largefile.m4 b/m4/largefile.m4 index f7140dd0a3a..f4c5d3a5cea 100644 --- a/m4/largefile.m4 +++ b/m4/largefile.m4 | |||
| @@ -30,12 +30,12 @@ m4_version_prereq([2.70], [] ,[ | |||
| 30 | # _AC_SYS_LARGEFILE_TEST_INCLUDES | 30 | # _AC_SYS_LARGEFILE_TEST_INCLUDES |
| 31 | # ------------------------------- | 31 | # ------------------------------- |
| 32 | m4_define([_AC_SYS_LARGEFILE_TEST_INCLUDES], | 32 | m4_define([_AC_SYS_LARGEFILE_TEST_INCLUDES], |
| 33 | [@%:@include <sys/types.h> | 33 | [#include <sys/types.h> |
| 34 | /* Check that off_t can represent 2**63 - 1 correctly. | 34 | /* Check that off_t can represent 2**63 - 1 correctly. |
| 35 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | 35 | We can't simply define LARGE_OFF_T to be 9223372036854775807, |
| 36 | since some C++ compilers masquerading as C compilers | 36 | since some C++ compilers masquerading as C compilers |
| 37 | incorrectly reject 9223372036854775807. */ | 37 | incorrectly reject 9223372036854775807. */ |
| 38 | @%:@define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31)) | 38 | #define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31)) |
| 39 | int off_t_is_large[[(LARGE_OFF_T % 2147483629 == 721 | 39 | int off_t_is_large[[(LARGE_OFF_T % 2147483629 == 721 |
| 40 | && LARGE_OFF_T % 2147483647 == 1) | 40 | && LARGE_OFF_T % 2147483647 == 1) |
| 41 | ? 1 : -1]];[]dnl | 41 | ? 1 : -1]];[]dnl |
| @@ -54,7 +54,7 @@ m4_define([_AC_SYS_LARGEFILE_MACRO_VALUE], | |||
| 54 | [AC_LANG_PROGRAM([$5], [$6])], | 54 | [AC_LANG_PROGRAM([$5], [$6])], |
| 55 | [$3=no; break]) | 55 | [$3=no; break]) |
| 56 | m4_ifval([$6], [AC_LINK_IFELSE], [AC_COMPILE_IFELSE])( | 56 | m4_ifval([$6], [AC_LINK_IFELSE], [AC_COMPILE_IFELSE])( |
| 57 | [AC_LANG_PROGRAM([@%:@define $1 $2 | 57 | [AC_LANG_PROGRAM([#define $1 $2 |
| 58 | $5], [$6])], | 58 | $5], [$6])], |
| 59 | [$3=$2; break]) | 59 | [$3=$2; break]) |
| 60 | $3=unknown | 60 | $3=unknown |
diff --git a/m4/manywarnings.m4 b/m4/manywarnings.m4 index d18da048d9e..a37cd15b69a 100644 --- a/m4/manywarnings.m4 +++ b/m4/manywarnings.m4 | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | # manywarnings.m4 serial 20 | 1 | # manywarnings.m4 serial 21 |
| 2 | dnl Copyright (C) 2008-2020 Free Software Foundation, Inc. | 2 | dnl Copyright (C) 2008-2020 Free Software Foundation, Inc. |
| 3 | dnl This file is free software; the Free Software Foundation | 3 | dnl This file is free software; the Free Software Foundation |
| 4 | dnl gives unlimited permission to copy and/or distribute it, | 4 | dnl gives unlimited permission to copy and/or distribute it, |
| @@ -39,8 +39,7 @@ AC_DEFUN([gl_MANYWARN_ALL_GCC], | |||
| 39 | [_AC_LANG_DISPATCH([$0], _AC_LANG, $@)]) | 39 | [_AC_LANG_DISPATCH([$0], _AC_LANG, $@)]) |
| 40 | 40 | ||
| 41 | # Specialization for _AC_LANG = C. | 41 | # Specialization for _AC_LANG = C. |
| 42 | # Use of m4_defun rather than AC_DEFUN works around a bug in autoconf < 2.63b. | 42 | AC_DEFUN([gl_MANYWARN_ALL_GCC(C)], |
| 43 | m4_defun([gl_MANYWARN_ALL_GCC(C)], | ||
| 44 | [ | 43 | [ |
| 45 | AC_LANG_PUSH([C]) | 44 | AC_LANG_PUSH([C]) |
| 46 | 45 | ||
| @@ -210,8 +209,7 @@ m4_defun([gl_MANYWARN_ALL_GCC(C)], | |||
| 210 | ]) | 209 | ]) |
| 211 | 210 | ||
| 212 | # Specialization for _AC_LANG = C++. | 211 | # Specialization for _AC_LANG = C++. |
| 213 | # Use of m4_defun rather than AC_DEFUN works around a bug in autoconf < 2.63b. | 212 | AC_DEFUN([gl_MANYWARN_ALL_GCC(C++)], |
| 214 | m4_defun([gl_MANYWARN_ALL_GCC(C++)], | ||
| 215 | [ | 213 | [ |
| 216 | gl_MANYWARN_ALL_GCC_CXX_IMPL([$1]) | 214 | gl_MANYWARN_ALL_GCC_CXX_IMPL([$1]) |
| 217 | ]) | 215 | ]) |
diff --git a/m4/mktime.m4 b/m4/mktime.m4 index 8d9b827fe21..4e7e423fa54 100644 --- a/m4/mktime.m4 +++ b/m4/mktime.m4 | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | # serial 32 | 1 | # serial 35 |
| 2 | dnl Copyright (C) 2002-2003, 2005-2007, 2009-2020 Free Software Foundation, | 2 | dnl Copyright (C) 2002-2003, 2005-2007, 2009-2020 Free Software Foundation, |
| 3 | dnl Inc. | 3 | dnl Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| @@ -31,7 +31,6 @@ AC_DEFUN([gl_FUNC_MKTIME_WORKS], | |||
| 31 | dnl in Autoconf and because it invokes AC_LIBOBJ. | 31 | dnl in Autoconf and because it invokes AC_LIBOBJ. |
| 32 | AC_CHECK_HEADERS_ONCE([unistd.h]) | 32 | AC_CHECK_HEADERS_ONCE([unistd.h]) |
| 33 | AC_CHECK_DECLS_ONCE([alarm]) | 33 | AC_CHECK_DECLS_ONCE([alarm]) |
| 34 | AC_CHECK_FUNCS_ONCE([tzset]) | ||
| 35 | AC_REQUIRE([gl_MULTIARCH]) | 34 | AC_REQUIRE([gl_MULTIARCH]) |
| 36 | AC_CACHE_CHECK([for working mktime], [gl_cv_func_working_mktime], | 35 | AC_CACHE_CHECK([for working mktime], [gl_cv_func_working_mktime], |
| 37 | [if test $APPLE_UNIVERSAL_BUILD = 1; then | 36 | [if test $APPLE_UNIVERSAL_BUILD = 1; then |
| @@ -55,13 +54,12 @@ AC_DEFUN([gl_FUNC_MKTIME_WORKS], | |||
| 55 | # include <signal.h> | 54 | # include <signal.h> |
| 56 | #endif | 55 | #endif |
| 57 | 56 | ||
| 57 | ]GL_MDA_DEFINES[ | ||
| 58 | |||
| 58 | #ifndef TIME_T_IS_SIGNED | 59 | #ifndef TIME_T_IS_SIGNED |
| 59 | # define TIME_T_IS_SIGNED 0 | 60 | # define TIME_T_IS_SIGNED 0 |
| 60 | #endif | 61 | #endif |
| 61 | 62 | ||
| 62 | /* Work around redefinition to rpl_putenv by other config tests. */ | ||
| 63 | #undef putenv | ||
| 64 | |||
| 65 | static time_t time_t_max; | 63 | static time_t time_t_max; |
| 66 | static time_t time_t_min; | 64 | static time_t time_t_min; |
| 67 | 65 | ||
diff --git a/m4/nstrftime.m4 b/m4/nstrftime.m4 index 6f2762aa276..e4eb87de0b9 100644 --- a/m4/nstrftime.m4 +++ b/m4/nstrftime.m4 | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | # serial 35 | 1 | # serial 36 |
| 2 | 2 | ||
| 3 | # Copyright (C) 1996-1997, 1999-2007, 2009-2020 Free Software Foundation, Inc. | 3 | # Copyright (C) 1996-1997, 1999-2007, 2009-2020 Free Software Foundation, Inc. |
| 4 | # | 4 | # |
| @@ -17,8 +17,6 @@ AC_DEFUN([gl_FUNC_GNU_STRFTIME], | |||
| 17 | 17 | ||
| 18 | AC_REQUIRE([gl_TM_GMTOFF]) | 18 | AC_REQUIRE([gl_TM_GMTOFF]) |
| 19 | 19 | ||
| 20 | AC_CHECK_FUNCS_ONCE([tzset]) | ||
| 21 | |||
| 22 | AC_DEFINE([my_strftime], [nstrftime], | 20 | AC_DEFINE([my_strftime], [nstrftime], |
| 23 | [Define to the name of the strftime replacement function.]) | 21 | [Define to the name of the strftime replacement function.]) |
| 24 | ]) | 22 | ]) |
diff --git a/m4/open-slash.m4 b/m4/open-slash.m4 index 1e57c96960e..5d84f2b548a 100644 --- a/m4/open-slash.m4 +++ b/m4/open-slash.m4 | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | # open-slash.m4 serial 1 | 1 | # open-slash.m4 serial 2 |
| 2 | dnl Copyright (C) 2007-2020 Free Software Foundation, Inc. | 2 | dnl Copyright (C) 2007-2020 Free Software Foundation, Inc. |
| 3 | dnl This file is free software; the Free Software Foundation | 3 | dnl This file is free software; the Free Software Foundation |
| 4 | dnl gives unlimited permission to copy and/or distribute it, | 4 | dnl gives unlimited permission to copy and/or distribute it, |
| @@ -25,6 +25,7 @@ AC_DEFUN([gl_OPEN_TRAILING_SLASH_BUG], | |||
| 25 | #if HAVE_UNISTD_H | 25 | #if HAVE_UNISTD_H |
| 26 | # include <unistd.h> | 26 | # include <unistd.h> |
| 27 | #endif | 27 | #endif |
| 28 | ]GL_MDA_DEFINES[ | ||
| 28 | int main () | 29 | int main () |
| 29 | { | 30 | { |
| 30 | int result = 0; | 31 | int result = 0; |
diff --git a/m4/pselect.m4 b/m4/pselect.m4 index f3e5afe0b38..08a5823c6f9 100644 --- a/m4/pselect.m4 +++ b/m4/pselect.m4 | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | # pselect.m4 serial 8 | 1 | # pselect.m4 serial 9 |
| 2 | dnl Copyright (C) 2011-2020 Free Software Foundation, Inc. | 2 | dnl Copyright (C) 2011-2020 Free Software Foundation, Inc. |
| 3 | dnl This file is free software; the Free Software Foundation | 3 | dnl This file is free software; the Free Software Foundation |
| 4 | dnl gives unlimited permission to copy and/or distribute it, | 4 | dnl gives unlimited permission to copy and/or distribute it, |
| @@ -37,7 +37,8 @@ AC_DEFUN([gl_FUNC_PSELECT], | |||
| 37 | #endif | 37 | #endif |
| 38 | #include <unistd.h> | 38 | #include <unistd.h> |
| 39 | #include <errno.h> | 39 | #include <errno.h> |
| 40 | ]],[[ | 40 | ]GL_MDA_DEFINES], |
| 41 | [[ | ||
| 41 | fd_set set; | 42 | fd_set set; |
| 42 | dup2(0, 16); | 43 | dup2(0, 16); |
| 43 | FD_ZERO(&set); | 44 | FD_ZERO(&set); |
diff --git a/m4/pthread_sigmask.m4 b/m4/pthread_sigmask.m4 index d67511f73dd..030862de015 100644 --- a/m4/pthread_sigmask.m4 +++ b/m4/pthread_sigmask.m4 | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | # pthread_sigmask.m4 serial 18 | 1 | # pthread_sigmask.m4 serial 19 |
| 2 | dnl Copyright (C) 2011-2020 Free Software Foundation, Inc. | 2 | dnl Copyright (C) 2011-2020 Free Software Foundation, Inc. |
| 3 | dnl This file is free software; the Free Software Foundation | 3 | dnl This file is free software; the Free Software Foundation |
| 4 | dnl gives unlimited permission to copy and/or distribute it, | 4 | dnl gives unlimited permission to copy and/or distribute it, |
| @@ -220,6 +220,7 @@ int main () | |||
| 220 | #include <stdio.h> | 220 | #include <stdio.h> |
| 221 | #include <stdlib.h> | 221 | #include <stdlib.h> |
| 222 | #include <unistd.h> | 222 | #include <unistd.h> |
| 223 | ]GL_MDA_DEFINES[ | ||
| 223 | static volatile int sigint_occurred; | 224 | static volatile int sigint_occurred; |
| 224 | static void | 225 | static void |
| 225 | sigint_handler (int sig) | 226 | sigint_handler (int sig) |
diff --git a/m4/sys_random_h.m4 b/m4/sys_random_h.m4 index a964b157841..8c5d53703be 100644 --- a/m4/sys_random_h.m4 +++ b/m4/sys_random_h.m4 | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | # sys_random_h.m4 serial 4 | 1 | # sys_random_h.m4 serial 5 |
| 2 | dnl Copyright (C) 2020 Free Software Foundation, Inc. | 2 | dnl Copyright (C) 2020 Free Software Foundation, Inc. |
| 3 | dnl This file is free software; the Free Software Foundation | 3 | dnl This file is free software; the Free Software Foundation |
| 4 | dnl gives unlimited permission to copy and/or distribute it, | 4 | dnl gives unlimited permission to copy and/or distribute it, |
| @@ -25,7 +25,8 @@ AC_DEFUN([gl_HEADER_SYS_RANDOM], | |||
| 25 | dnl corresponding gnulib module is not in use. | 25 | dnl corresponding gnulib module is not in use. |
| 26 | gl_WARN_ON_USE_PREPARE([[ | 26 | gl_WARN_ON_USE_PREPARE([[ |
| 27 | #if HAVE_SYS_RANDOM_H | 27 | #if HAVE_SYS_RANDOM_H |
| 28 | /* Additional includes are needed before <sys/random.h> on Mac OS X. */ | 28 | /* Additional includes are needed before <sys/random.h> on uClibc |
| 29 | and Mac OS X. */ | ||
| 29 | # include <sys/types.h> | 30 | # include <sys/types.h> |
| 30 | # include <stdlib.h> | 31 | # include <stdlib.h> |
| 31 | # include <sys/random.h> | 32 | # include <sys/random.h> |
diff --git a/m4/time_h.m4 b/m4/time_h.m4 index d0f89327c4b..a15c09dc07b 100644 --- a/m4/time_h.m4 +++ b/m4/time_h.m4 | |||
| @@ -121,7 +121,6 @@ AC_DEFUN([gl_HEADER_TIME_H_DEFAULTS], | |||
| 121 | HAVE_NANOSLEEP=1; AC_SUBST([HAVE_NANOSLEEP]) | 121 | HAVE_NANOSLEEP=1; AC_SUBST([HAVE_NANOSLEEP]) |
| 122 | HAVE_STRPTIME=1; AC_SUBST([HAVE_STRPTIME]) | 122 | HAVE_STRPTIME=1; AC_SUBST([HAVE_STRPTIME]) |
| 123 | HAVE_TIMEGM=1; AC_SUBST([HAVE_TIMEGM]) | 123 | HAVE_TIMEGM=1; AC_SUBST([HAVE_TIMEGM]) |
| 124 | HAVE_TZSET=1; AC_SUBST([HAVE_TZSET]) | ||
| 125 | dnl Even GNU libc does not have timezone_t yet. | 124 | dnl Even GNU libc does not have timezone_t yet. |
| 126 | HAVE_TIMEZONE_T=0; AC_SUBST([HAVE_TIMEZONE_T]) | 125 | HAVE_TIMEZONE_T=0; AC_SUBST([HAVE_TIMEZONE_T]) |
| 127 | dnl If another module says to replace or to not replace, do that. | 126 | dnl If another module says to replace or to not replace, do that. |
diff --git a/m4/utimens.m4 b/m4/utimens.m4 index 65617ac862c..3d31085fc6d 100644 --- a/m4/utimens.m4 +++ b/m4/utimens.m4 | |||
| @@ -3,7 +3,7 @@ dnl This file is free software; the Free Software Foundation | |||
| 3 | dnl gives unlimited permission to copy and/or distribute it, | 3 | dnl gives unlimited permission to copy and/or distribute it, |
| 4 | dnl with or without modifications, as long as this notice is preserved. | 4 | dnl with or without modifications, as long as this notice is preserved. |
| 5 | 5 | ||
| 6 | dnl serial 10 | 6 | dnl serial 11 |
| 7 | 7 | ||
| 8 | AC_DEFUN([gl_UTIMENS], | 8 | AC_DEFUN([gl_UTIMENS], |
| 9 | [ | 9 | [ |
| @@ -24,7 +24,8 @@ AC_DEFUN([gl_UTIMENS], | |||
| 24 | #include <stddef.h> | 24 | #include <stddef.h> |
| 25 | #include <sys/times.h> | 25 | #include <sys/times.h> |
| 26 | #include <fcntl.h> | 26 | #include <fcntl.h> |
| 27 | ]], [[ int fd = open ("conftest.file", O_RDWR); | 27 | ]GL_MDA_DEFINES], |
| 28 | [[int fd = open ("conftest.file", O_RDWR); | ||
| 28 | if (fd < 0) return 1; | 29 | if (fd < 0) return 1; |
| 29 | if (futimesat (fd, NULL, NULL)) return 2; | 30 | if (futimesat (fd, NULL, NULL)) return 2; |
| 30 | ]])], | 31 | ]])], |
diff --git a/m4/utimensat.m4 b/m4/utimensat.m4 index 2bc1bfebb5d..e9e4f26b1c1 100644 --- a/m4/utimensat.m4 +++ b/m4/utimensat.m4 | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | # serial 6 | 1 | # serial 7 |
| 2 | # See if we need to provide utimensat replacement. | 2 | # See if we need to provide utimensat replacement. |
| 3 | 3 | ||
| 4 | dnl Copyright (C) 2009-2020 Free Software Foundation, Inc. | 4 | dnl Copyright (C) 2009-2020 Free Software Foundation, Inc. |
| @@ -23,7 +23,8 @@ AC_DEFUN([gl_FUNC_UTIMENSAT], | |||
| 23 | #include <fcntl.h> | 23 | #include <fcntl.h> |
| 24 | #include <sys/stat.h> | 24 | #include <sys/stat.h> |
| 25 | #include <unistd.h> | 25 | #include <unistd.h> |
| 26 | ]], [[int result = 0; | 26 | ]GL_MDA_DEFINES], |
| 27 | [[int result = 0; | ||
| 27 | const char *f = "conftest.file"; | 28 | const char *f = "conftest.file"; |
| 28 | if (close (creat (f, 0600))) | 29 | if (close (creat (f, 0600))) |
| 29 | return 1; | 30 | return 1; |
diff --git a/m4/utimes.m4 b/m4/utimes.m4 index e1056bbba4e..877bfd2a735 100644 --- a/m4/utimes.m4 +++ b/m4/utimes.m4 | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | # Detect some bugs in glibc's implementation of utimes. | 1 | # Detect some bugs in glibc's implementation of utimes. |
| 2 | # serial 7 | 2 | # serial 8 |
| 3 | 3 | ||
| 4 | dnl Copyright (C) 2003-2005, 2009-2020 Free Software Foundation, Inc. | 4 | dnl Copyright (C) 2003-2005, 2009-2020 Free Software Foundation, Inc. |
| 5 | dnl This file is free software; the Free Software Foundation | 5 | dnl This file is free software; the Free Software Foundation |
| @@ -34,6 +34,7 @@ AC_DEFUN([gl_FUNC_UTIMES], | |||
| 34 | #include <stdio.h> | 34 | #include <stdio.h> |
| 35 | #include <utime.h> | 35 | #include <utime.h> |
| 36 | #include <errno.h> | 36 | #include <errno.h> |
| 37 | ]GL_MDA_DEFINES[ | ||
| 37 | 38 | ||
| 38 | static int | 39 | static int |
| 39 | inorder (time_t a, time_t b, time_t c) | 40 | inorder (time_t a, time_t b, time_t c) |
diff --git a/m4/warnings.m4 b/m4/warnings.m4 index d272365f0a1..d4e4b073453 100644 --- a/m4/warnings.m4 +++ b/m4/warnings.m4 | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | # warnings.m4 serial 14 | 1 | # warnings.m4 serial 16 |
| 2 | dnl Copyright (C) 2008-2020 Free Software Foundation, Inc. | 2 | dnl Copyright (C) 2008-2020 Free Software Foundation, Inc. |
| 3 | dnl This file is free software; the Free Software Foundation | 3 | dnl This file is free software; the Free Software Foundation |
| 4 | dnl gives unlimited permission to copy and/or distribute it, | 4 | dnl gives unlimited permission to copy and/or distribute it, |
| @@ -23,8 +23,6 @@ m4_ifdef([AS_VAR_APPEND], | |||
| 23 | # The effects of this macro depend on the current language (_AC_LANG). | 23 | # The effects of this macro depend on the current language (_AC_LANG). |
| 24 | AC_DEFUN([gl_COMPILER_OPTION_IF], | 24 | AC_DEFUN([gl_COMPILER_OPTION_IF], |
| 25 | [ | 25 | [ |
| 26 | dnl FIXME: gl_Warn must be used unquoted until we can assume Autoconf | ||
| 27 | dnl 2.64 or newer. | ||
| 28 | AS_VAR_PUSHDEF([gl_Warn], [gl_cv_warn_[]_AC_LANG_ABBREV[]_$1])dnl | 26 | AS_VAR_PUSHDEF([gl_Warn], [gl_cv_warn_[]_AC_LANG_ABBREV[]_$1])dnl |
| 29 | AS_VAR_PUSHDEF([gl_Flags], [_AC_LANG_PREFIX[]FLAGS])dnl | 27 | AS_VAR_PUSHDEF([gl_Flags], [_AC_LANG_PREFIX[]FLAGS])dnl |
| 30 | AS_LITERAL_IF([$1], | 28 | AS_LITERAL_IF([$1], |
| @@ -34,13 +32,13 @@ case $gl_positive in | |||
| 34 | -Wno-*) gl_positive=-W`expr "X$gl_positive" : 'X-Wno-\(.*\)'` ;; | 32 | -Wno-*) gl_positive=-W`expr "X$gl_positive" : 'X-Wno-\(.*\)'` ;; |
| 35 | esac | 33 | esac |
| 36 | m4_pushdef([gl_Positive], [$gl_positive])])dnl | 34 | m4_pushdef([gl_Positive], [$gl_positive])])dnl |
| 37 | AC_CACHE_CHECK([whether _AC_LANG compiler handles $1], m4_defn([gl_Warn]), [ | 35 | AC_CACHE_CHECK([whether _AC_LANG compiler handles $1], [gl_Warn], [ |
| 38 | gl_save_compiler_FLAGS="$gl_Flags" | 36 | gl_save_compiler_FLAGS="$gl_Flags" |
| 39 | gl_AS_VAR_APPEND(m4_defn([gl_Flags]), | 37 | gl_AS_VAR_APPEND(m4_defn([gl_Flags]), |
| 40 | [" $gl_unknown_warnings_are_errors ]m4_defn([gl_Positive])["]) | 38 | [" $gl_unknown_warnings_are_errors ]m4_defn([gl_Positive])["]) |
| 41 | AC_LINK_IFELSE([m4_default([$4], [AC_LANG_PROGRAM([])])], | 39 | AC_LINK_IFELSE([m4_default([$4], [AC_LANG_PROGRAM([[]])])], |
| 42 | [AS_VAR_SET(gl_Warn, [yes])], | 40 | [AS_VAR_SET([gl_Warn], [yes])], |
| 43 | [AS_VAR_SET(gl_Warn, [no])]) | 41 | [AS_VAR_SET([gl_Warn], [no])]) |
| 44 | gl_Flags="$gl_save_compiler_FLAGS" | 42 | gl_Flags="$gl_save_compiler_FLAGS" |
| 45 | ]) | 43 | ]) |
| 46 | AS_VAR_IF(gl_Warn, [yes], [$2], [$3]) | 44 | AS_VAR_IF(gl_Warn, [yes], [$2], [$3]) |
| @@ -59,8 +57,7 @@ AC_DEFUN([gl_UNKNOWN_WARNINGS_ARE_ERRORS], | |||
| 59 | [_AC_LANG_DISPATCH([$0], _AC_LANG, $@)]) | 57 | [_AC_LANG_DISPATCH([$0], _AC_LANG, $@)]) |
| 60 | 58 | ||
| 61 | # Specialization for _AC_LANG = C. This macro can be AC_REQUIREd. | 59 | # Specialization for _AC_LANG = C. This macro can be AC_REQUIREd. |
| 62 | # Use of m4_defun rather than AC_DEFUN works around a bug in autoconf < 2.63b. | 60 | AC_DEFUN([gl_UNKNOWN_WARNINGS_ARE_ERRORS(C)], |
| 63 | m4_defun([gl_UNKNOWN_WARNINGS_ARE_ERRORS(C)], | ||
| 64 | [ | 61 | [ |
| 65 | AC_LANG_PUSH([C]) | 62 | AC_LANG_PUSH([C]) |
| 66 | gl_UNKNOWN_WARNINGS_ARE_ERRORS_IMPL | 63 | gl_UNKNOWN_WARNINGS_ARE_ERRORS_IMPL |
| @@ -68,8 +65,7 @@ m4_defun([gl_UNKNOWN_WARNINGS_ARE_ERRORS(C)], | |||
| 68 | ]) | 65 | ]) |
| 69 | 66 | ||
| 70 | # Specialization for _AC_LANG = C++. This macro can be AC_REQUIREd. | 67 | # Specialization for _AC_LANG = C++. This macro can be AC_REQUIREd. |
| 71 | # Use of m4_defun rather than AC_DEFUN works around a bug in autoconf < 2.63b. | 68 | AC_DEFUN([gl_UNKNOWN_WARNINGS_ARE_ERRORS(C++)], |
| 72 | m4_defun([gl_UNKNOWN_WARNINGS_ARE_ERRORS(C++)], | ||
| 73 | [ | 69 | [ |
| 74 | AC_LANG_PUSH([C++]) | 70 | AC_LANG_PUSH([C++]) |
| 75 | gl_UNKNOWN_WARNINGS_ARE_ERRORS_IMPL | 71 | gl_UNKNOWN_WARNINGS_ARE_ERRORS_IMPL |
| @@ -77,8 +73,7 @@ m4_defun([gl_UNKNOWN_WARNINGS_ARE_ERRORS(C++)], | |||
| 77 | ]) | 73 | ]) |
| 78 | 74 | ||
| 79 | # Specialization for _AC_LANG = Objective C. This macro can be AC_REQUIREd. | 75 | # Specialization for _AC_LANG = Objective C. This macro can be AC_REQUIREd. |
| 80 | # Use of m4_defun rather than AC_DEFUN works around a bug in autoconf < 2.63b. | 76 | AC_DEFUN([gl_UNKNOWN_WARNINGS_ARE_ERRORS(Objective C)], |
| 81 | m4_defun([gl_UNKNOWN_WARNINGS_ARE_ERRORS(Objective C)], | ||
| 82 | [ | 77 | [ |
| 83 | AC_LANG_PUSH([Objective C]) | 78 | AC_LANG_PUSH([Objective C]) |
| 84 | gl_UNKNOWN_WARNINGS_ARE_ERRORS_IMPL | 79 | gl_UNKNOWN_WARNINGS_ARE_ERRORS_IMPL |