aboutsummaryrefslogtreecommitdiffstats
path: root/m4
diff options
context:
space:
mode:
Diffstat (limited to 'm4')
-rw-r--r--m4/c-strtod.m431
-rw-r--r--m4/gnulib-common.m49
-rw-r--r--m4/gnulib-comp.m48
-rw-r--r--m4/inttypes.m43
-rw-r--r--m4/lstat.m45
-rw-r--r--m4/nocrash.m44
-rw-r--r--m4/pselect.m412
-rw-r--r--m4/readlink.m412
-rw-r--r--m4/stdio_h.m44
-rw-r--r--m4/symlink.m412
-rw-r--r--m4/unistd_h.m46
-rw-r--r--m4/utimens.m412
12 files changed, 82 insertions, 36 deletions
diff --git a/m4/c-strtod.m4 b/m4/c-strtod.m4
index ccff0e6e8a2..9282cee58e9 100644
--- a/m4/c-strtod.m4
+++ b/m4/c-strtod.m4
@@ -1,4 +1,4 @@
1# c-strtod.m4 serial 15 1# c-strtod.m4 serial 16
2 2
3# Copyright (C) 2004-2006, 2009-2018 Free Software Foundation, Inc. 3# Copyright (C) 2004-2006, 2009-2018 Free Software Foundation, Inc.
4# This file is free software; the Free Software Foundation 4# This file is free software; the Free Software Foundation
@@ -37,7 +37,34 @@ dnl Prerequisites of lib/c-strtod.c.
37AC_DEFUN([gl_C_STRTOD], 37AC_DEFUN([gl_C_STRTOD],
38[ 38[
39 AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) 39 AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
40 AC_CHECK_FUNCS([strtod_l]) 40
41 AC_CHECK_HEADERS_ONCE([xlocale.h])
42 dnl We can't use AC_CHECK_FUNC here, because strtod_l() is defined as a
43 dnl static inline function when compiling for Android 7.1 or older.
44 AC_CACHE_CHECK([for strtod_l], [gl_cv_func_strtod_l],
45 [AC_LINK_IFELSE(
46 [AC_LANG_PROGRAM(
47 [[#include <stdlib.h>
48 #include <locale.h>
49 #if HAVE_XLOCALE_H
50 # include <xlocale.h>
51 #endif
52 locale_t loc;
53 ]],
54 [[char *end;
55 return strtod_l("0",&end,loc) < 0.0;
56 ]])
57 ],
58 [gl_cv_func_strtod_l=yes],
59 [gl_cv_func_strtod_l=no])
60 ])
61 if test $gl_cv_func_strtod_l = yes; then
62 HAVE_STRTOD_L=1
63 else
64 HAVE_STRTOD_L=0
65 fi
66 AC_DEFINE_UNQUOTED([HAVE_STRTOD_L], [$HAVE_STRTOD_L],
67 [Define to 1 if the system has the 'strtod_l' function.])
41]) 68])
42 69
43dnl Prerequisites of lib/c-strtold.c. 70dnl Prerequisites of lib/c-strtold.c.
diff --git a/m4/gnulib-common.m4 b/m4/gnulib-common.m4
index de65f6b82e8..736e421016c 100644
--- a/m4/gnulib-common.m4
+++ b/m4/gnulib-common.m4
@@ -1,4 +1,4 @@
1# gnulib-common.m4 serial 38 1# gnulib-common.m4 serial 39
2dnl Copyright (C) 2007-2018 Free Software Foundation, Inc. 2dnl Copyright (C) 2007-2018 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
@@ -72,6 +72,13 @@ AC_DEFUN([gl_COMMON_BODY], [
72#else 72#else
73# define _GL_ATTRIBUTE_CONST /* empty */ 73# define _GL_ATTRIBUTE_CONST /* empty */
74#endif 74#endif
75
76/* The __malloc__ attribute was added in gcc 3. */
77#if 3 <= __GNUC__
78# define _GL_ATTRIBUTE_MALLOC __attribute__ ((__malloc__))
79#else
80# define _GL_ATTRIBUTE_MALLOC /* empty */
81#endif
75]) 82])
76 dnl Preparation for running test programs: 83 dnl Preparation for running test programs:
77 dnl Tell glibc to write diagnostics from -D_FORTIFY_SOURCE=2 to stderr, not 84 dnl Tell glibc to write diagnostics from -D_FORTIFY_SOURCE=2 to stderr, not
diff --git a/m4/gnulib-comp.m4 b/m4/gnulib-comp.m4
index fc03db2aa86..5c78f5a809c 100644
--- a/m4/gnulib-comp.m4
+++ b/m4/gnulib-comp.m4
@@ -58,10 +58,10 @@ AC_DEFUN([gl_EARLY],
58 # Code from module count-leading-zeros: 58 # Code from module count-leading-zeros:
59 # Code from module count-one-bits: 59 # Code from module count-one-bits:
60 # Code from module count-trailing-zeros: 60 # Code from module count-trailing-zeros:
61 # Code from module crypto/md5: 61 # Code from module crypto/md5-buffer:
62 # Code from module crypto/sha1: 62 # Code from module crypto/sha1-buffer:
63 # Code from module crypto/sha256: 63 # Code from module crypto/sha256-buffer:
64 # Code from module crypto/sha512: 64 # Code from module crypto/sha512-buffer:
65 # Code from module d-type: 65 # Code from module d-type:
66 # Code from module diffseq: 66 # Code from module diffseq:
67 # Code from module dirent: 67 # Code from module dirent:
diff --git a/m4/inttypes.m4 b/m4/inttypes.m4
index 8069493cab5..d756f012f6a 100644
--- a/m4/inttypes.m4
+++ b/m4/inttypes.m4
@@ -1,4 +1,4 @@
1# inttypes.m4 serial 26 1# inttypes.m4 serial 27
2dnl Copyright (C) 2006-2018 Free Software Foundation, Inc. 2dnl Copyright (C) 2006-2018 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
@@ -147,6 +147,7 @@ AC_DEFUN([gl_INTTYPES_H_DEFAULTS],
147 HAVE_DECL_IMAXDIV=1; AC_SUBST([HAVE_DECL_IMAXDIV]) 147 HAVE_DECL_IMAXDIV=1; AC_SUBST([HAVE_DECL_IMAXDIV])
148 HAVE_DECL_STRTOIMAX=1; AC_SUBST([HAVE_DECL_STRTOIMAX]) 148 HAVE_DECL_STRTOIMAX=1; AC_SUBST([HAVE_DECL_STRTOIMAX])
149 HAVE_DECL_STRTOUMAX=1; AC_SUBST([HAVE_DECL_STRTOUMAX]) 149 HAVE_DECL_STRTOUMAX=1; AC_SUBST([HAVE_DECL_STRTOUMAX])
150 HAVE_IMAXDIV_T=1; AC_SUBST([HAVE_IMAXDIV_T])
150 REPLACE_STRTOIMAX=0; AC_SUBST([REPLACE_STRTOIMAX]) 151 REPLACE_STRTOIMAX=0; AC_SUBST([REPLACE_STRTOIMAX])
151 REPLACE_STRTOUMAX=0; AC_SUBST([REPLACE_STRTOUMAX]) 152 REPLACE_STRTOUMAX=0; AC_SUBST([REPLACE_STRTOUMAX])
152 INT32_MAX_LT_INTMAX_MAX=1; AC_SUBST([INT32_MAX_LT_INTMAX_MAX]) 153 INT32_MAX_LT_INTMAX_MAX=1; AC_SUBST([INT32_MAX_LT_INTMAX_MAX])
diff --git a/m4/lstat.m4 b/m4/lstat.m4
index ac6f143ce7d..3694e4ceaf7 100644
--- a/m4/lstat.m4
+++ b/m4/lstat.m4
@@ -1,4 +1,4 @@
1# serial 31 1# serial 32
2 2
3# Copyright (C) 1997-2001, 2003-2018 Free Software Foundation, Inc. 3# Copyright (C) 1997-2001, 2003-2018 Free Software Foundation, Inc.
4# 4#
@@ -53,6 +53,9 @@ AC_DEFUN([gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK],
53 [gl_cv_func_lstat_dereferences_slashed_symlink=yes], 53 [gl_cv_func_lstat_dereferences_slashed_symlink=yes],
54 [gl_cv_func_lstat_dereferences_slashed_symlink=no], 54 [gl_cv_func_lstat_dereferences_slashed_symlink=no],
55 [case "$host_os" in 55 [case "$host_os" in
56 linux-* | linux)
57 # Guess yes on Linux systems.
58 gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
56 *-gnu* | gnu*) 59 *-gnu* | gnu*)
57 # Guess yes on glibc systems. 60 # Guess yes on glibc systems.
58 gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;; 61 gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
diff --git a/m4/nocrash.m4 b/m4/nocrash.m4
index 87b2d4cbf69..49140074d08 100644
--- a/m4/nocrash.m4
+++ b/m4/nocrash.m4
@@ -1,4 +1,4 @@
1# nocrash.m4 serial 4 1# nocrash.m4 serial 5
2dnl Copyright (C) 2005, 2009-2018 Free Software Foundation, Inc. 2dnl Copyright (C) 2005, 2009-2018 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
@@ -79,7 +79,7 @@ nocrash_init (void)
79 } 79 }
80 } 80 }
81} 81}
82#elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ 82#elif defined _WIN32 && ! defined __CYGWIN__
83/* Avoid a crash on native Windows. */ 83/* Avoid a crash on native Windows. */
84#define WIN32_LEAN_AND_MEAN 84#define WIN32_LEAN_AND_MEAN
85#include <windows.h> 85#include <windows.h>
diff --git a/m4/pselect.m4 b/m4/pselect.m4
index edf4d828209..5cd1e044fc9 100644
--- a/m4/pselect.m4
+++ b/m4/pselect.m4
@@ -1,4 +1,4 @@
1# pselect.m4 serial 6 1# pselect.m4 serial 7
2dnl Copyright (C) 2011-2018 Free Software Foundation, Inc. 2dnl Copyright (C) 2011-2018 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
@@ -51,10 +51,12 @@ AC_DEFUN([gl_FUNC_PSELECT],
51 [gl_cv_func_pselect_detects_ebadf=no], 51 [gl_cv_func_pselect_detects_ebadf=no],
52 [ 52 [
53 case "$host_os" in 53 case "$host_os" in
54 # Guess yes on glibc systems. 54 # Guess yes on Linux systems.
55 *-gnu* | gnu*) gl_cv_func_pselect_detects_ebadf="guessing yes" ;; 55 linux-* | linux) gl_cv_func_pselect_detects_ebadf="guessing yes" ;;
56 # If we don't know, assume the worst. 56 # Guess yes on glibc systems.
57 *) gl_cv_func_pselect_detects_ebadf="guessing no" ;; 57 *-gnu* | gnu*) gl_cv_func_pselect_detects_ebadf="guessing yes" ;;
58 # If we don't know, assume the worst.
59 *) gl_cv_func_pselect_detects_ebadf="guessing no" ;;
58 esac 60 esac
59 ]) 61 ])
60 ]) 62 ])
diff --git a/m4/readlink.m4 b/m4/readlink.m4
index 9d73f5cfa18..4d0ab4836b0 100644
--- a/m4/readlink.m4
+++ b/m4/readlink.m4
@@ -1,4 +1,4 @@
1# readlink.m4 serial 13 1# readlink.m4 serial 14
2dnl Copyright (C) 2003, 2007, 2009-2018 Free Software Foundation, Inc. 2dnl Copyright (C) 2003, 2007, 2009-2018 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
@@ -34,10 +34,12 @@ AC_DEFUN([gl_FUNC_READLINK],
34 return readlink ("conftest.lnk2/", buf, sizeof buf) != -1;]])], 34 return readlink ("conftest.lnk2/", buf, sizeof buf) != -1;]])],
35 [gl_cv_func_readlink_works=yes], [gl_cv_func_readlink_works=no], 35 [gl_cv_func_readlink_works=yes], [gl_cv_func_readlink_works=no],
36 [case "$host_os" in 36 [case "$host_os" in
37 # Guess yes on glibc systems. 37 # Guess yes on Linux systems.
38 *-gnu* | gnu*) gl_cv_func_readlink_works="guessing yes" ;; 38 linux-* | linux) gl_cv_func_readlink_works="guessing yes" ;;
39 # If we don't know, assume the worst. 39 # Guess yes on glibc systems.
40 *) gl_cv_func_readlink_works="guessing no" ;; 40 *-gnu* | gnu*) gl_cv_func_readlink_works="guessing yes" ;;
41 # If we don't know, assume the worst.
42 *) gl_cv_func_readlink_works="guessing no" ;;
41 esac 43 esac
42 ]) 44 ])
43 rm -f conftest.link conftest.lnk2]) 45 rm -f conftest.link conftest.lnk2])
diff --git a/m4/stdio_h.m4 b/m4/stdio_h.m4
index e06461e6934..0debe69e92d 100644
--- a/m4/stdio_h.m4
+++ b/m4/stdio_h.m4
@@ -1,4 +1,4 @@
1# stdio_h.m4 serial 48 1# stdio_h.m4 serial 49
2dnl Copyright (C) 2007-2018 Free Software Foundation, Inc. 2dnl Copyright (C) 2007-2018 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
@@ -28,7 +28,7 @@ AC_DEFUN([gl_STDIO_H],
28 /* For non-mingw systems, compilation will trivially succeed. 28 /* For non-mingw systems, compilation will trivially succeed.
29 For mingw, compilation will succeed for older mingw (system 29 For mingw, compilation will succeed for older mingw (system
30 printf, "I64d") and fail for newer mingw (gnu printf, "lld"). */ 30 printf, "I64d") and fail for newer mingw (gnu printf, "lld"). */
31 #if ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) && \ 31 #if (defined _WIN32 && ! defined __CYGWIN__) && \
32 (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) 32 (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
33 extern char PRIdMAX_probe[sizeof PRIdMAX == sizeof "I64d" ? 1 : -1]; 33 extern char PRIdMAX_probe[sizeof PRIdMAX == sizeof "I64d" ? 1 : -1];
34 #endif 34 #endif
diff --git a/m4/symlink.m4 b/m4/symlink.m4
index a452f7cc3a8..afaa941744e 100644
--- a/m4/symlink.m4
+++ b/m4/symlink.m4
@@ -1,4 +1,4 @@
1# serial 7 1# serial 8
2# See if we need to provide symlink replacement. 2# See if we need to provide symlink replacement.
3 3
4dnl Copyright (C) 2009-2018 Free Software Foundation, Inc. 4dnl Copyright (C) 2009-2018 Free Software Foundation, Inc.
@@ -36,10 +36,12 @@ AC_DEFUN([gl_FUNC_SYMLINK],
36 ]])], 36 ]])],
37 [gl_cv_func_symlink_works=yes], [gl_cv_func_symlink_works=no], 37 [gl_cv_func_symlink_works=yes], [gl_cv_func_symlink_works=no],
38 [case "$host_os" in 38 [case "$host_os" in
39 # Guess yes on glibc systems. 39 # Guess yes on Linux systems.
40 *-gnu* | gnu*) gl_cv_func_symlink_works="guessing yes" ;; 40 linux-* | linux) gl_cv_func_symlink_works="guessing yes" ;;
41 # If we don't know, assume the worst. 41 # Guess yes on glibc systems.
42 *) gl_cv_func_symlink_works="guessing no" ;; 42 *-gnu* | gnu*) gl_cv_func_symlink_works="guessing yes" ;;
43 # If we don't know, assume the worst.
44 *) gl_cv_func_symlink_works="guessing no" ;;
43 esac 45 esac
44 ]) 46 ])
45 rm -f conftest.f conftest.link conftest.lnk2]) 47 rm -f conftest.f conftest.link conftest.lnk2])
diff --git a/m4/unistd_h.m4 b/m4/unistd_h.m4
index b3b71ec2709..159c48aeef1 100644
--- a/m4/unistd_h.m4
+++ b/m4/unistd_h.m4
@@ -1,4 +1,4 @@
1# unistd_h.m4 serial 71 1# unistd_h.m4 serial 73
2dnl Copyright (C) 2006-2018 Free Software Foundation, Inc. 2dnl Copyright (C) 2006-2018 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
@@ -37,7 +37,7 @@ AC_DEFUN([gl_UNISTD_H],
37# include <fcntl.h> 37# include <fcntl.h>
38# include <stdio.h> 38# include <stdio.h>
39# include <stdlib.h> 39# include <stdlib.h>
40# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ 40# if defined _WIN32 && ! defined __CYGWIN__
41# include <io.h> 41# include <io.h>
42# endif 42# endif
43#endif 43#endif
@@ -140,7 +140,6 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS],
140 HAVE_SLEEP=1; AC_SUBST([HAVE_SLEEP]) 140 HAVE_SLEEP=1; AC_SUBST([HAVE_SLEEP])
141 HAVE_SYMLINK=1; AC_SUBST([HAVE_SYMLINK]) 141 HAVE_SYMLINK=1; AC_SUBST([HAVE_SYMLINK])
142 HAVE_SYMLINKAT=1; AC_SUBST([HAVE_SYMLINKAT]) 142 HAVE_SYMLINKAT=1; AC_SUBST([HAVE_SYMLINKAT])
143 HAVE_TRUNCATE=1; AC_SUBST([HAVE_TRUNCATE])
144 HAVE_UNLINKAT=1; AC_SUBST([HAVE_UNLINKAT]) 143 HAVE_UNLINKAT=1; AC_SUBST([HAVE_UNLINKAT])
145 HAVE_USLEEP=1; AC_SUBST([HAVE_USLEEP]) 144 HAVE_USLEEP=1; AC_SUBST([HAVE_USLEEP])
146 HAVE_DECL_ENVIRON=1; AC_SUBST([HAVE_DECL_ENVIRON]) 145 HAVE_DECL_ENVIRON=1; AC_SUBST([HAVE_DECL_ENVIRON])
@@ -152,6 +151,7 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS],
152 HAVE_DECL_GETPAGESIZE=1; AC_SUBST([HAVE_DECL_GETPAGESIZE]) 151 HAVE_DECL_GETPAGESIZE=1; AC_SUBST([HAVE_DECL_GETPAGESIZE])
153 HAVE_DECL_GETUSERSHELL=1; AC_SUBST([HAVE_DECL_GETUSERSHELL]) 152 HAVE_DECL_GETUSERSHELL=1; AC_SUBST([HAVE_DECL_GETUSERSHELL])
154 HAVE_DECL_SETHOSTNAME=1; AC_SUBST([HAVE_DECL_SETHOSTNAME]) 153 HAVE_DECL_SETHOSTNAME=1; AC_SUBST([HAVE_DECL_SETHOSTNAME])
154 HAVE_DECL_TRUNCATE=1; AC_SUBST([HAVE_DECL_TRUNCATE])
155 HAVE_DECL_TTYNAME_R=1; AC_SUBST([HAVE_DECL_TTYNAME_R]) 155 HAVE_DECL_TTYNAME_R=1; AC_SUBST([HAVE_DECL_TTYNAME_R])
156 HAVE_OS_H=0; AC_SUBST([HAVE_OS_H]) 156 HAVE_OS_H=0; AC_SUBST([HAVE_OS_H])
157 HAVE_SYS_PARAM_H=0; AC_SUBST([HAVE_SYS_PARAM_H]) 157 HAVE_SYS_PARAM_H=0; AC_SUBST([HAVE_SYS_PARAM_H])
diff --git a/m4/utimens.m4 b/m4/utimens.m4
index 16798a0ad1e..9a4db07a3da 100644
--- a/m4/utimens.m4
+++ b/m4/utimens.m4
@@ -3,7 +3,7 @@ dnl This file is free software; the Free Software Foundation
3dnl gives unlimited permission to copy and/or distribute it, 3dnl gives unlimited permission to copy and/or distribute it,
4dnl with or without modifications, as long as this notice is preserved. 4dnl with or without modifications, as long as this notice is preserved.
5 5
6dnl serial 8 6dnl serial 9
7 7
8AC_DEFUN([gl_UTIMENS], 8AC_DEFUN([gl_UTIMENS],
9[ 9[
@@ -31,10 +31,12 @@ AC_DEFUN([gl_UTIMENS],
31 [gl_cv_func_futimesat_works=yes], 31 [gl_cv_func_futimesat_works=yes],
32 [gl_cv_func_futimesat_works=no], 32 [gl_cv_func_futimesat_works=no],
33 [case "$host_os" in 33 [case "$host_os" in
34 # Guess yes on glibc systems. 34 # Guess yes on Linux systems.
35 *-gnu*) gl_cv_func_futimesat_works="guessing yes" ;; 35 linux-* | linux) gl_cv_func_futimesat_works="guessing yes" ;;
36 # If we don't know, assume the worst. 36 # Guess yes on glibc systems.
37 *) gl_cv_func_futimesat_works="guessing no" ;; 37 *-gnu*) gl_cv_func_futimesat_works="guessing yes" ;;
38 # If we don't know, assume the worst.
39 *) gl_cv_func_futimesat_works="guessing no" ;;
38 esac 40 esac
39 ]) 41 ])
40 rm -f conftest.file]) 42 rm -f conftest.file])