aboutsummaryrefslogtreecommitdiffstats
path: root/m4
diff options
context:
space:
mode:
authorPaul Eggert2012-05-26 16:14:36 -0700
committerPaul Eggert2012-05-26 16:14:36 -0700
commitcaf8a9b2b301aba06735d403317b75b41df59bfe (patch)
treebfafb3cc0cf8a2f2394b4ed721e7c3d4891b78ab /m4
parentfe453991eafc32a890297a2003ac532b9f579f92 (diff)
downloademacs-caf8a9b2b301aba06735d403317b75b41df59bfe.tar.gz
emacs-caf8a9b2b301aba06735d403317b75b41df59bfe.zip
Merge from gnulib.
Fixes: debbugs:11527
Diffstat (limited to 'm4')
-rw-r--r--m4/00gnulib.m42
-rw-r--r--m4/alloca.m418
-rw-r--r--m4/c-strtod.m42
-rw-r--r--m4/dup2.m429
-rw-r--r--m4/extensions.m46
-rw-r--r--m4/filemode.m42
-rw-r--r--m4/getloadavg.m44
-rw-r--r--m4/getopt.m46
-rw-r--r--m4/gnulib-common.m413
-rw-r--r--m4/gnulib-comp.m432
-rw-r--r--m4/gnulib-tool.m42
-rw-r--r--m4/include_next.m417
-rw-r--r--m4/inttypes.m421
-rw-r--r--m4/largefile.m447
-rw-r--r--m4/longlong.m48
-rw-r--r--m4/lstat.m435
-rw-r--r--m4/md5.m42
-rw-r--r--m4/mktime.m42
-rw-r--r--m4/multiarch.m42
-rw-r--r--m4/nocrash.m42
-rw-r--r--m4/off_t.m418
-rw-r--r--m4/pathmax.m42
-rw-r--r--m4/pthread_sigmask.m46
-rw-r--r--m4/readlink.m432
-rw-r--r--m4/sha1.m42
-rw-r--r--m4/sha256.m42
-rw-r--r--m4/sha512.m42
-rw-r--r--m4/signal_h.m42
-rw-r--r--m4/signalblocking.m42
-rw-r--r--m4/socklen.m42
-rw-r--r--m4/ssize_t.m42
-rw-r--r--m4/st_dm_mode.m42
-rw-r--r--m4/stat.m417
-rw-r--r--m4/stdalign.m451
-rw-r--r--m4/stdarg.m42
-rw-r--r--m4/stdbool.m42
-rw-r--r--m4/stddef_h.m42
-rw-r--r--m4/stdint.m48
-rw-r--r--m4/stdio_h.m412
-rw-r--r--m4/stdlib_h.m421
-rw-r--r--m4/strftime.m42
-rw-r--r--m4/strtoimax.m464
-rw-r--r--m4/strtoll.m42
-rw-r--r--m4/strtoull.m42
-rw-r--r--m4/strtoumax.m42
-rw-r--r--m4/symlink.m422
-rw-r--r--m4/sys_stat_h.m417
-rw-r--r--m4/sys_types_h.m424
-rw-r--r--m4/time_h.m44
-rw-r--r--m4/time_r.m42
-rw-r--r--m4/tm_gmtoff.m42
-rw-r--r--m4/unistd_h.m423
-rw-r--r--m4/warnings.m447
-rw-r--r--m4/wchar_t.m42
54 files changed, 473 insertions, 183 deletions
diff --git a/m4/00gnulib.m4 b/m4/00gnulib.m4
index 7feed466940..d978cb898cf 100644
--- a/m4/00gnulib.m4
+++ b/m4/00gnulib.m4
@@ -1,5 +1,5 @@
1# 00gnulib.m4 serial 2 1# 00gnulib.m4 serial 2
2dnl Copyright (C) 2009-2011 Free Software Foundation, Inc. 2dnl Copyright (C) 2009-2012 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,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/alloca.m4 b/m4/alloca.m4
index a8744a844f3..656924be889 100644
--- a/m4/alloca.m4
+++ b/m4/alloca.m4
@@ -1,5 +1,5 @@
1# alloca.m4 serial 13 1# alloca.m4 serial 14
2dnl Copyright (C) 2002-2004, 2006-2007, 2009-2011 Free Software Foundation, 2dnl Copyright (C) 2002-2004, 2006-2007, 2009-2012 Free Software Foundation,
3dnl Inc. 3dnl Inc.
4dnl This file is free software; the Free Software Foundation 4dnl This file is free software; the Free Software Foundation
5dnl gives unlimited permission to copy and/or distribute it, 5dnl gives unlimited permission to copy and/or distribute it,
@@ -53,8 +53,8 @@ m4_version_prereq([2.69], [] ,[
53 53
54# _AC_LIBOBJ_ALLOCA 54# _AC_LIBOBJ_ALLOCA
55# ----------------- 55# -----------------
56# Set up the LIBOBJ replacement of `alloca'. Well, not exactly 56# Set up the LIBOBJ replacement of 'alloca'. Well, not exactly
57# AC_LIBOBJ since we actually set the output variable `ALLOCA'. 57# AC_LIBOBJ since we actually set the output variable 'ALLOCA'.
58# Nevertheless, for Automake, AC_LIBSOURCES it. 58# Nevertheless, for Automake, AC_LIBSOURCES it.
59m4_define([_AC_LIBOBJ_ALLOCA], 59m4_define([_AC_LIBOBJ_ALLOCA],
60[# The SVR3 libPW and SVR4 libucb both contain incompatible functions 60[# The SVR3 libPW and SVR4 libucb both contain incompatible functions
@@ -63,9 +63,9 @@ m4_define([_AC_LIBOBJ_ALLOCA],
63# use ar to extract alloca.o from them instead of compiling alloca.c. 63# use ar to extract alloca.o from them instead of compiling alloca.c.
64AC_LIBSOURCES(alloca.c) 64AC_LIBSOURCES(alloca.c)
65AC_SUBST([ALLOCA], [\${LIBOBJDIR}alloca.$ac_objext])dnl 65AC_SUBST([ALLOCA], [\${LIBOBJDIR}alloca.$ac_objext])dnl
66AC_DEFINE(C_ALLOCA, 1, [Define to 1 if using `alloca.c'.]) 66AC_DEFINE(C_ALLOCA, 1, [Define to 1 if using 'alloca.c'.])
67 67
68AC_CACHE_CHECK(whether `alloca.c' needs Cray hooks, ac_cv_os_cray, 68AC_CACHE_CHECK(whether 'alloca.c' needs Cray hooks, ac_cv_os_cray,
69[AC_EGREP_CPP(webecray, 69[AC_EGREP_CPP(webecray,
70[#if defined CRAY && ! defined CRAY2 70[#if defined CRAY && ! defined CRAY2
71webecray 71webecray
@@ -77,10 +77,10 @@ if test $ac_cv_os_cray = yes; then
77 for ac_func in _getb67 GETB67 getb67; do 77 for ac_func in _getb67 GETB67 getb67; do
78 AC_CHECK_FUNC($ac_func, 78 AC_CHECK_FUNC($ac_func,
79 [AC_DEFINE_UNQUOTED(CRAY_STACKSEG_END, $ac_func, 79 [AC_DEFINE_UNQUOTED(CRAY_STACKSEG_END, $ac_func,
80 [Define to one of `_getb67', `GETB67', 80 [Define to one of '_getb67', 'GETB67',
81 `getb67' for Cray-2 and Cray-YMP 81 'getb67' for Cray-2 and Cray-YMP
82 systems. This function is required for 82 systems. This function is required for
83 `alloca.c' support on those systems.]) 83 'alloca.c' support on those systems.])
84 break]) 84 break])
85 done 85 done
86fi 86fi
diff --git a/m4/c-strtod.m4 b/m4/c-strtod.m4
index 20c65b82584..c002e5fcead 100644
--- a/m4/c-strtod.m4
+++ b/m4/c-strtod.m4
@@ -1,6 +1,6 @@
1# c-strtod.m4 serial 14 1# c-strtod.m4 serial 14
2 2
3# Copyright (C) 2004-2006, 2009-2011 Free Software Foundation, Inc. 3# Copyright (C) 2004-2006, 2009-2012 Free Software Foundation, Inc.
4# This file is free software; the Free Software Foundation 4# This file is free software; the Free Software Foundation
5# gives unlimited permission to copy and/or distribute it, 5# gives unlimited permission to copy and/or distribute it,
6# with or without modifications, as long as this notice is preserved. 6# with or without modifications, as long as this notice is preserved.
diff --git a/m4/dup2.m4 b/m4/dup2.m4
index cd9d254b440..fc86e8085ba 100644
--- a/m4/dup2.m4
+++ b/m4/dup2.m4
@@ -1,5 +1,5 @@
1#serial 16 1#serial 18
2dnl Copyright (C) 2002, 2005, 2007, 2009-2011 Free Software Foundation, Inc. 2dnl Copyright (C) 2002, 2005, 2007, 2009-2012 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,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
@@ -45,29 +45,34 @@ AC_DEFUN([gl_FUNC_DUP2],
45 [gl_cv_func_dup2_works=yes], [gl_cv_func_dup2_works=no], 45 [gl_cv_func_dup2_works=yes], [gl_cv_func_dup2_works=no],
46 [case "$host_os" in 46 [case "$host_os" in
47 mingw*) # on this platform, dup2 always returns 0 for success 47 mingw*) # on this platform, dup2 always returns 0 for success
48 gl_cv_func_dup2_works=no;; 48 gl_cv_func_dup2_works="guessing no" ;;
49 cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0 49 cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
50 gl_cv_func_dup2_works=no;; 50 gl_cv_func_dup2_works="guessing no" ;;
51 linux*) # On linux between 2008-07-27 and 2009-05-11, dup2 of a 51 linux*) # On linux between 2008-07-27 and 2009-05-11, dup2 of a
52 # closed fd may yield -EBADF instead of -1 / errno=EBADF. 52 # closed fd may yield -EBADF instead of -1 / errno=EBADF.
53 gl_cv_func_dup2_works=no;; 53 gl_cv_func_dup2_works="guessing no" ;;
54 freebsd*) # on FreeBSD 6.1, dup2(1,1000000) gives EMFILE, not EBADF. 54 freebsd*) # on FreeBSD 6.1, dup2(1,1000000) gives EMFILE, not EBADF.
55 gl_cv_func_dup2_works=no;; 55 gl_cv_func_dup2_works="guessing no" ;;
56 haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC. 56 haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC.
57 gl_cv_func_dup2_works=no;; 57 gl_cv_func_dup2_works="guessing no" ;;
58 *) gl_cv_func_dup2_works=yes;; 58 *) gl_cv_func_dup2_works="guessing yes" ;;
59 esac]) 59 esac])
60 ]) 60 ])
61 if test "$gl_cv_func_dup2_works" = no; then 61 case "$gl_cv_func_dup2_works" in
62 REPLACE_DUP2=1 62 *yes) ;;
63 fi 63 *)
64 REPLACE_DUP2=1
65 ;;
66 esac
64 fi 67 fi
65 dnl Replace dup2() for supporting the gnulib-defined fchdir() function, 68 dnl Replace dup2() for supporting the gnulib-defined fchdir() function,
66 dnl to keep fchdir's bookkeeping up-to-date. 69 dnl to keep fchdir's bookkeeping up-to-date.
67 m4_ifdef([gl_FUNC_FCHDIR], [ 70 m4_ifdef([gl_FUNC_FCHDIR], [
68 gl_TEST_FCHDIR 71 gl_TEST_FCHDIR
69 if test $HAVE_FCHDIR = 0; then 72 if test $HAVE_FCHDIR = 0; then
70 REPLACE_DUP2=1 73 if test $HAVE_DUP2 = 1; then
74 REPLACE_DUP2=1
75 fi
71 fi 76 fi
72 ]) 77 ])
73]) 78])
diff --git a/m4/extensions.m4 b/m4/extensions.m4
index 22156e068c6..0bfaef6f904 100644
--- a/m4/extensions.m4
+++ b/m4/extensions.m4
@@ -1,7 +1,7 @@
1# serial 10 -*- Autoconf -*- 1# serial 11 -*- Autoconf -*-
2# Enable extensions on systems that normally disable them. 2# Enable extensions on systems that normally disable them.
3 3
4# Copyright (C) 2003, 2006-2011 Free Software Foundation, Inc. 4# Copyright (C) 2003, 2006-2012 Free Software Foundation, Inc.
5# This file is free software; the Free Software Foundation 5# This file is free software; the Free Software Foundation
6# gives unlimited permission to copy and/or distribute it, 6# gives unlimited permission to copy and/or distribute it,
7# with or without modifications, as long as this notice is preserved. 7# with or without modifications, as long as this notice is preserved.
@@ -43,7 +43,7 @@ AC_BEFORE([$0], [AC_RUN_IFELSE])dnl
43 AC_CHECK_HEADER([minix/config.h], [MINIX=yes], [MINIX=]) 43 AC_CHECK_HEADER([minix/config.h], [MINIX=yes], [MINIX=])
44 if test "$MINIX" = yes; then 44 if test "$MINIX" = yes; then
45 AC_DEFINE([_POSIX_SOURCE], [1], 45 AC_DEFINE([_POSIX_SOURCE], [1],
46 [Define to 1 if you need to in order for `stat' and other 46 [Define to 1 if you need to in order for 'stat' and other
47 things to work.]) 47 things to work.])
48 AC_DEFINE([_POSIX_1_SOURCE], [2], 48 AC_DEFINE([_POSIX_1_SOURCE], [2],
49 [Define to 2 if the system does not provide POSIX.1 features 49 [Define to 2 if the system does not provide POSIX.1 features
diff --git a/m4/filemode.m4 b/m4/filemode.m4
index 8f6e8bc3bb0..1aa6cdd57b2 100644
--- a/m4/filemode.m4
+++ b/m4/filemode.m4
@@ -1,5 +1,5 @@
1# filemode.m4 serial 8 1# filemode.m4 serial 8
2dnl Copyright (C) 2002, 2005-2006, 2009-2011 Free Software Foundation, Inc. 2dnl Copyright (C) 2002, 2005-2006, 2009-2012 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,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/getloadavg.m4 b/m4/getloadavg.m4
index b16f40de0aa..ad09c80d01c 100644
--- a/m4/getloadavg.m4
+++ b/m4/getloadavg.m4
@@ -1,6 +1,6 @@
1# Check for getloadavg. 1# Check for getloadavg.
2 2
3# Copyright (C) 1992-1996, 1999-2000, 2002-2003, 2006, 2008-2011 Free Software 3# Copyright (C) 1992-1996, 1999-2000, 2002-2003, 2006, 2008-2012 Free Software
4# Foundation, Inc. 4# Foundation, Inc.
5 5
6# This file is free software; the Free Software Foundation 6# This file is free software; the Free Software Foundation
@@ -100,7 +100,7 @@ AC_CHECK_DECL([getloadavg], [], [HAVE_DECL_GETLOADAVG=0],
100 100
101# gl_PREREQ_GETLOADAVG 101# gl_PREREQ_GETLOADAVG
102# -------------------- 102# --------------------
103# Set up the AC_LIBOBJ replacement of `getloadavg'. 103# Set up the AC_LIBOBJ replacement of 'getloadavg'.
104AC_DEFUN([gl_PREREQ_GETLOADAVG], 104AC_DEFUN([gl_PREREQ_GETLOADAVG],
105[ 105[
106# Figure out what our getloadavg.c needs. 106# Figure out what our getloadavg.c needs.
diff --git a/m4/getopt.m4 b/m4/getopt.m4
index 047a3db0221..2aea89595ee 100644
--- a/m4/getopt.m4
+++ b/m4/getopt.m4
@@ -1,5 +1,5 @@
1# getopt.m4 serial 38 1# getopt.m4 serial 39
2dnl Copyright (C) 2002-2006, 2008-2011 Free Software Foundation, Inc. 2dnl Copyright (C) 2002-2006, 2008-2012 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,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
@@ -25,8 +25,6 @@ AC_DEFUN([gl_FUNC_GETOPT_POSIX],
25 if test $REPLACE_GETOPT = 1; then 25 if test $REPLACE_GETOPT = 1; then
26 dnl Arrange for getopt.h to be created. 26 dnl Arrange for getopt.h to be created.
27 gl_GETOPT_SUBSTITUTE_HEADER 27 gl_GETOPT_SUBSTITUTE_HEADER
28 dnl Arrange for unistd.h to include getopt.h.
29 GNULIB_UNISTD_H_GETOPT=1
30 fi 28 fi
31]) 29])
32 30
diff --git a/m4/gnulib-common.m4 b/m4/gnulib-common.m4
index 7d832999591..d62b7677ab9 100644
--- a/m4/gnulib-common.m4
+++ b/m4/gnulib-common.m4
@@ -1,5 +1,5 @@
1# gnulib-common.m4 serial 31 1# gnulib-common.m4 serial 32
2dnl Copyright (C) 2007-2011 Free Software Foundation, Inc. 2dnl Copyright (C) 2007-2012 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,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
@@ -13,12 +13,13 @@ AC_DEFUN([gl_COMMON], [
13]) 13])
14AC_DEFUN([gl_COMMON_BODY], [ 14AC_DEFUN([gl_COMMON_BODY], [
15 AH_VERBATIM([_Noreturn], 15 AH_VERBATIM([_Noreturn],
16[/* The _Noreturn keyword of draft C1X. */ 16[/* The _Noreturn keyword of C11. */
17#ifndef _Noreturn 17#if ! (defined _Noreturn \
18 || (defined __STDC_VERSION__ && 201112 <= __STDC_VERSION__))
18# if (3 <= __GNUC__ || (__GNUC__ == 2 && 8 <= __GNUC_MINOR__) \ 19# if (3 <= __GNUC__ || (__GNUC__ == 2 && 8 <= __GNUC_MINOR__) \
19 || 0x5110 <= __SUNPRO_C) 20 || 0x5110 <= __SUNPRO_C)
20# define _Noreturn __attribute__ ((__noreturn__)) 21# define _Noreturn __attribute__ ((__noreturn__))
21# elif 1200 <= _MSC_VER 22# elif defined _MSC_VER && 1200 <= _MSC_VER
22# define _Noreturn __declspec (noreturn) 23# define _Noreturn __declspec (noreturn)
23# else 24# else
24# define _Noreturn 25# define _Noreturn
@@ -224,7 +225,7 @@ m4_ifndef([AS_VAR_IF],
224# - When AC_PROG_CC_STDC is invoked twice, it adds the C99 enabling options 225# - When AC_PROG_CC_STDC is invoked twice, it adds the C99 enabling options
225# to CC twice 226# to CC twice
226# <http://lists.gnu.org/archive/html/bug-gnulib/2011-09/msg00431.html>. 227# <http://lists.gnu.org/archive/html/bug-gnulib/2011-09/msg00431.html>.
227# - AC_PROG_CC_STDC is likely to change when C1X is an ISO standard. 228# - AC_PROG_CC_STDC is likely to change now that C11 is an ISO standard.
228AC_DEFUN([gl_PROG_CC_C99], 229AC_DEFUN([gl_PROG_CC_C99],
229[ 230[
230 dnl Change that version number to the minimum Autoconf version that supports 231 dnl Change that version number to the minimum Autoconf version that supports
diff --git a/m4/gnulib-comp.m4 b/m4/gnulib-comp.m4
index 73a26c41324..37067031da5 100644
--- a/m4/gnulib-comp.m4
+++ b/m4/gnulib-comp.m4
@@ -1,5 +1,5 @@
1# DO NOT EDIT! GENERATED AUTOMATICALLY! 1# DO NOT EDIT! GENERATED AUTOMATICALLY!
2# Copyright (C) 2002-2011 Free Software Foundation, Inc. 2# Copyright (C) 2002-2012 Free Software Foundation, Inc.
3# 3#
4# This file is free software; you can redistribute it and/or modify 4# This file is free software; you can redistribute it and/or modify
5# it under the terms of the GNU General Public License as published by 5# it under the terms of the GNU General Public License as published by
@@ -78,6 +78,7 @@ AC_DEFUN([gl_EARLY],
78 # Code from module socklen: 78 # Code from module socklen:
79 # Code from module ssize_t: 79 # Code from module ssize_t:
80 # Code from module stat: 80 # Code from module stat:
81 # Code from module stdalign:
81 # Code from module stdarg: 82 # Code from module stdarg:
82 dnl Some compilers (e.g., AIX 5.3 cc) need to be in c99 mode 83 dnl Some compilers (e.g., AIX 5.3 cc) need to be in c99 mode
83 dnl for the builtin va_copy to work. With Autoconf 2.60 or later, 84 dnl for the builtin va_copy to work. With Autoconf 2.60 or later,
@@ -96,6 +97,7 @@ AC_DEFUN([gl_EARLY],
96 # Code from module strtoumax: 97 # Code from module strtoumax:
97 # Code from module symlink: 98 # Code from module symlink:
98 # Code from module sys_stat: 99 # Code from module sys_stat:
100 # Code from module sys_types:
99 # Code from module time: 101 # Code from module time:
100 # Code from module time_r: 102 # Code from module time_r:
101 # Code from module u64: 103 # Code from module u64:
@@ -145,16 +147,23 @@ if test $REPLACE_GETOPT = 1; then
145 AC_LIBOBJ([getopt]) 147 AC_LIBOBJ([getopt])
146 AC_LIBOBJ([getopt1]) 148 AC_LIBOBJ([getopt1])
147 gl_PREREQ_GETOPT 149 gl_PREREQ_GETOPT
150 dnl Arrange for unistd.h to include getopt.h.
151 GNULIB_GL_UNISTD_H_GETOPT=1
148fi 152fi
153AC_SUBST([GNULIB_GL_UNISTD_H_GETOPT])
149gl_MODULE_INDICATOR_FOR_TESTS([getopt-gnu]) 154gl_MODULE_INDICATOR_FOR_TESTS([getopt-gnu])
150gl_FUNC_GETOPT_POSIX 155gl_FUNC_GETOPT_POSIX
151if test $REPLACE_GETOPT = 1; then 156if test $REPLACE_GETOPT = 1; then
152 AC_LIBOBJ([getopt]) 157 AC_LIBOBJ([getopt])
153 AC_LIBOBJ([getopt1]) 158 AC_LIBOBJ([getopt1])
154 gl_PREREQ_GETOPT 159 gl_PREREQ_GETOPT
160 dnl Arrange for unistd.h to include getopt.h.
161 GNULIB_GL_UNISTD_H_GETOPT=1
155fi 162fi
163AC_SUBST([GNULIB_GL_UNISTD_H_GETOPT])
156AC_REQUIRE([AC_C_INLINE]) 164AC_REQUIRE([AC_C_INLINE])
157gl_INTTYPES_INCOMPLETE 165gl_INTTYPES_INCOMPLETE
166AC_REQUIRE([gl_LARGEFILE])
158gl_FUNC_LSTAT 167gl_FUNC_LSTAT
159if test $REPLACE_LSTAT = 1; then 168if test $REPLACE_LSTAT = 1; then
160 AC_LIBOBJ([lstat]) 169 AC_LIBOBJ([lstat])
@@ -183,6 +192,7 @@ gl_UNISTD_MODULE_INDICATOR([readlink])
183gl_SIGNAL_H 192gl_SIGNAL_H
184gl_TYPE_SOCKLEN_T 193gl_TYPE_SOCKLEN_T
185gt_TYPE_SSIZE_T 194gt_TYPE_SSIZE_T
195gl_STDALIGN_H
186gl_STDARG_H 196gl_STDARG_H
187AM_STDBOOL_H 197AM_STDBOOL_H
188gl_STDDEF_H 198gl_STDDEF_H
@@ -191,7 +201,7 @@ gl_STDIO_H
191gl_STDLIB_H 201gl_STDLIB_H
192gl_FUNC_GNU_STRFTIME 202gl_FUNC_GNU_STRFTIME
193gl_FUNC_STRTOIMAX 203gl_FUNC_STRTOIMAX
194if test $ac_cv_func_strtoimax = no; then 204if test $HAVE_STRTOIMAX = 0 || test $REPLACE_STRTOIMAX = 1; then
195 AC_LIBOBJ([strtoimax]) 205 AC_LIBOBJ([strtoimax])
196 gl_PREREQ_STRTOIMAX 206 gl_PREREQ_STRTOIMAX
197fi 207fi
@@ -209,6 +219,8 @@ fi
209gl_UNISTD_MODULE_INDICATOR([symlink]) 219gl_UNISTD_MODULE_INDICATOR([symlink])
210gl_HEADER_SYS_STAT_H 220gl_HEADER_SYS_STAT_H
211AC_PROG_MKDIR_P 221AC_PROG_MKDIR_P
222gl_SYS_TYPES_H
223AC_PROG_MKDIR_P
212gl_HEADER_TIME_H 224gl_HEADER_TIME_H
213gl_TIME_R 225gl_TIME_R
214if test $HAVE_LOCALTIME_R = 0 || test $REPLACE_LOCALTIME_R = 1; then 226if test $HAVE_LOCALTIME_R = 0 || test $REPLACE_LOCALTIME_R = 1; then
@@ -218,7 +230,6 @@ fi
218gl_TIME_MODULE_INDICATOR([time_r]) 230gl_TIME_MODULE_INDICATOR([time_r])
219AC_REQUIRE([AC_C_INLINE]) 231AC_REQUIRE([AC_C_INLINE])
220gl_UNISTD_H 232gl_UNISTD_H
221AC_SUBST([WARN_CFLAGS])
222 gl_gnulib_enabled_dosname=false 233 gl_gnulib_enabled_dosname=false
223 gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36=false 234 gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36=false
224 gl_gnulib_enabled_pathmax=false 235 gl_gnulib_enabled_pathmax=false
@@ -326,18 +337,18 @@ gl_STDLIB_MODULE_INDICATOR([strtoull])
326 if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then 337 if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
327 func_gl_gnulib_m4code_stat 338 func_gl_gnulib_m4code_stat
328 fi 339 fi
329 if test $ac_cv_func_strtoimax = no; then 340 if { test $HAVE_STRTOIMAX = 0 || test $REPLACE_STRTOIMAX = 1; } && test $ac_cv_type_long_long_int = yes; then
330 func_gl_gnulib_m4code_verify
331 fi
332 if test $ac_cv_func_strtoimax = no && test $ac_cv_type_long_long_int = yes; then
333 func_gl_gnulib_m4code_strtoll 341 func_gl_gnulib_m4code_strtoll
334 fi 342 fi
335 if test $ac_cv_func_strtoumax = no; then 343 if test $HAVE_STRTOIMAX = 0 || test $REPLACE_STRTOIMAX = 1; then
336 func_gl_gnulib_m4code_verify 344 func_gl_gnulib_m4code_verify
337 fi 345 fi
338 if test $ac_cv_func_strtoumax = no && test $ac_cv_type_unsigned_long_long_int = yes; then 346 if test $ac_cv_func_strtoumax = no && test $ac_cv_type_unsigned_long_long_int = yes; then
339 func_gl_gnulib_m4code_strtoull 347 func_gl_gnulib_m4code_strtoull
340 fi 348 fi
349 if test $ac_cv_func_strtoumax = no; then
350 func_gl_gnulib_m4code_verify
351 fi
341 m4_pattern_allow([^gl_GNULIB_ENABLED_]) 352 m4_pattern_allow([^gl_GNULIB_ENABLED_])
342 AM_CONDITIONAL([gl_GNULIB_ENABLED_dosname], [$gl_gnulib_enabled_dosname]) 353 AM_CONDITIONAL([gl_GNULIB_ENABLED_dosname], [$gl_gnulib_enabled_dosname])
343 AM_CONDITIONAL([gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36], [$gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36]) 354 AM_CONDITIONAL([gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36], [$gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36])
@@ -530,6 +541,7 @@ AC_DEFUN([gl_FILE_LIST], [
530 lib/signal.in.h 541 lib/signal.in.h
531 lib/sigprocmask.c 542 lib/sigprocmask.c
532 lib/stat.c 543 lib/stat.c
544 lib/stdalign.in.h
533 lib/stdarg.in.h 545 lib/stdarg.in.h
534 lib/stdbool.in.h 546 lib/stdbool.in.h
535 lib/stddef.in.h 547 lib/stddef.in.h
@@ -546,6 +558,7 @@ AC_DEFUN([gl_FILE_LIST], [
546 lib/strtoumax.c 558 lib/strtoumax.c
547 lib/symlink.c 559 lib/symlink.c
548 lib/sys_stat.in.h 560 lib/sys_stat.in.h
561 lib/sys_types.in.h
549 lib/time.in.h 562 lib/time.in.h
550 lib/time_r.c 563 lib/time_r.c
551 lib/u64.h 564 lib/u64.h
@@ -570,6 +583,7 @@ AC_DEFUN([gl_FILE_LIST], [
570 m4/mktime.m4 583 m4/mktime.m4
571 m4/multiarch.m4 584 m4/multiarch.m4
572 m4/nocrash.m4 585 m4/nocrash.m4
586 m4/off_t.m4
573 m4/pathmax.m4 587 m4/pathmax.m4
574 m4/pthread_sigmask.m4 588 m4/pthread_sigmask.m4
575 m4/readlink.m4 589 m4/readlink.m4
@@ -582,6 +596,7 @@ AC_DEFUN([gl_FILE_LIST], [
582 m4/ssize_t.m4 596 m4/ssize_t.m4
583 m4/st_dm_mode.m4 597 m4/st_dm_mode.m4
584 m4/stat.m4 598 m4/stat.m4
599 m4/stdalign.m4
585 m4/stdarg.m4 600 m4/stdarg.m4
586 m4/stdbool.m4 601 m4/stdbool.m4
587 m4/stddef_h.m4 602 m4/stddef_h.m4
@@ -595,6 +610,7 @@ AC_DEFUN([gl_FILE_LIST], [
595 m4/strtoumax.m4 610 m4/strtoumax.m4
596 m4/symlink.m4 611 m4/symlink.m4
597 m4/sys_stat_h.m4 612 m4/sys_stat_h.m4
613 m4/sys_types_h.m4
598 m4/time_h.m4 614 m4/time_h.m4
599 m4/time_r.m4 615 m4/time_r.m4
600 m4/tm_gmtoff.m4 616 m4/tm_gmtoff.m4
diff --git a/m4/gnulib-tool.m4 b/m4/gnulib-tool.m4
index ed41e9d4159..a09ffc1d1a0 100644
--- a/m4/gnulib-tool.m4
+++ b/m4/gnulib-tool.m4
@@ -1,5 +1,5 @@
1# gnulib-tool.m4 serial 2 1# gnulib-tool.m4 serial 2
2dnl Copyright (C) 2004-2005, 2009-2011 Free Software Foundation, Inc. 2dnl Copyright (C) 2004-2005, 2009-2012 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,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/include_next.m4 b/m4/include_next.m4
index d5230ced8de..a60a2614dc8 100644
--- a/m4/include_next.m4
+++ b/m4/include_next.m4
@@ -1,5 +1,5 @@
1# include_next.m4 serial 22 1# include_next.m4 serial 23
2dnl Copyright (C) 2006-2011 Free Software Foundation, Inc. 2dnl Copyright (C) 2006-2012 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,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
@@ -143,7 +143,7 @@ choke me
143# even if the compiler does not support include_next. 143# even if the compiler does not support include_next.
144# The three "///" are to pacify Sun C 5.8, which otherwise would say 144# The three "///" are to pacify Sun C 5.8, which otherwise would say
145# "warning: #include of /usr/include/... may be non-portable". 145# "warning: #include of /usr/include/... may be non-portable".
146# Use `""', not `<>', so that the /// cannot be confused with a C99 comment. 146# Use '""', not '<>', so that the /// cannot be confused with a C99 comment.
147# Note: This macro assumes that the header file is not empty after 147# Note: This macro assumes that the header file is not empty after
148# preprocessing, i.e. it does not only define preprocessor macros but also 148# preprocessing, i.e. it does not only define preprocessor macros but also
149# provides some type/enum definitions or function/variable declarations. 149# provides some type/enum definitions or function/variable declarations.
@@ -219,12 +219,17 @@ changequote(,)
219 gl_dirsep_regex='[/\\]' 219 gl_dirsep_regex='[/\\]'
220 ;; 220 ;;
221 *) 221 *)
222 gl_dirsep_regex='/' 222 gl_dirsep_regex='\/'
223 ;; 223 ;;
224 esac 224 esac
225 dnl A sed expression that turns a string into a basic regular
226 dnl expression, for use within "/.../".
227 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
225changequote([,]) 228changequote([,])
226 gl_absolute_header_sed='\|'"${gl_dirsep_regex}"']m4_defn([gl_HEADER_NAME])[|{ 229 gl_header_literal_regex=`echo ']m4_defn([gl_HEADER_NAME])[' \
227 s|.*"\(.*'"${gl_dirsep_regex}"']m4_defn([gl_HEADER_NAME])[\)".*|\1| 230 | sed -e "$gl_make_literal_regex_sed"`
231 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
232 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
228changequote(,)dnl 233changequote(,)dnl
229 s|^/[^/]|//&| 234 s|^/[^/]|//&|
230changequote([,])dnl 235changequote([,])dnl
diff --git a/m4/inttypes.m4 b/m4/inttypes.m4
index cc027a417fa..eec4f41d032 100644
--- a/m4/inttypes.m4
+++ b/m4/inttypes.m4
@@ -1,5 +1,5 @@
1# inttypes.m4 serial 24 1# inttypes.m4 serial 26
2dnl Copyright (C) 2006-2011 Free Software Foundation, Inc. 2dnl Copyright (C) 2006-2012 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,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
@@ -24,22 +24,6 @@ AC_DEFUN_ONCE([gl_INTTYPES_INCOMPLETE],
24 24
25 AC_REQUIRE([gl_MULTIARCH]) 25 AC_REQUIRE([gl_MULTIARCH])
26 26
27 dnl Ensure that <stdint.h> defines the limit macros, since gnulib's
28 dnl <inttypes.h> relies on them. This macro is only needed when a
29 dnl C++ compiler is in use; it has no effect for a C compiler.
30 dnl Also be careful to define __STDC_LIMIT_MACROS only when gnulib's
31 dnl <inttypes.h> is going to be created, and to avoid redefinition warnings
32 dnl if the __STDC_LIMIT_MACROS is already defined through the CPPFLAGS.
33 AC_DEFINE([GL_TRIGGER_STDC_LIMIT_MACROS], [1],
34 [Define to make the limit macros in <stdint.h> visible.])
35 AH_VERBATIM([__STDC_LIMIT_MACROS_ZZZ],
36[/* Ensure that <stdint.h> defines the limit macros, since gnulib's
37 <inttypes.h> relies on them. */
38#if defined __cplusplus && !defined __STDC_LIMIT_MACROS && GL_TRIGGER_STDC_LIMIT_MACROS
39# define __STDC_LIMIT_MACROS 1
40#endif
41])
42
43 dnl Check for declarations of anything we want to poison if the 27 dnl Check for declarations of anything we want to poison if the
44 dnl corresponding gnulib module is not in use. 28 dnl corresponding gnulib module is not in use.
45 gl_WARN_ON_USE_PREPARE([[#include <inttypes.h> 29 gl_WARN_ON_USE_PREPARE([[#include <inttypes.h>
@@ -163,6 +147,7 @@ AC_DEFUN([gl_INTTYPES_H_DEFAULTS],
163 HAVE_DECL_IMAXDIV=1; AC_SUBST([HAVE_DECL_IMAXDIV]) 147 HAVE_DECL_IMAXDIV=1; AC_SUBST([HAVE_DECL_IMAXDIV])
164 HAVE_DECL_STRTOIMAX=1; AC_SUBST([HAVE_DECL_STRTOIMAX]) 148 HAVE_DECL_STRTOIMAX=1; AC_SUBST([HAVE_DECL_STRTOIMAX])
165 HAVE_DECL_STRTOUMAX=1; AC_SUBST([HAVE_DECL_STRTOUMAX]) 149 HAVE_DECL_STRTOUMAX=1; AC_SUBST([HAVE_DECL_STRTOUMAX])
150 REPLACE_STRTOIMAX=0; AC_SUBST([REPLACE_STRTOIMAX])
166 INT32_MAX_LT_INTMAX_MAX=1; AC_SUBST([INT32_MAX_LT_INTMAX_MAX]) 151 INT32_MAX_LT_INTMAX_MAX=1; AC_SUBST([INT32_MAX_LT_INTMAX_MAX])
167 INT64_MAX_EQ_LONG_MAX='defined _LP64'; AC_SUBST([INT64_MAX_EQ_LONG_MAX]) 152 INT64_MAX_EQ_LONG_MAX='defined _LP64'; AC_SUBST([INT64_MAX_EQ_LONG_MAX])
168 PRI_MACROS_BROKEN=0; AC_SUBST([PRI_MACROS_BROKEN]) 153 PRI_MACROS_BROKEN=0; AC_SUBST([PRI_MACROS_BROKEN])
diff --git a/m4/largefile.m4 b/m4/largefile.m4
index d83fea1233d..a159f4ab2ce 100644
--- a/m4/largefile.m4
+++ b/m4/largefile.m4
@@ -1,6 +1,6 @@
1# Enable large files on systems where this is not the default. 1# Enable large files on systems where this is not the default.
2 2
3# Copyright 1992-1996, 1998-2011 Free Software Foundation, Inc. 3# Copyright 1992-1996, 1998-2012 Free Software Foundation, Inc.
4# This file is free software; the Free Software Foundation 4# This file is free software; the Free Software Foundation
5# gives unlimited permission to copy and/or distribute it, 5# gives unlimited permission to copy and/or distribute it,
6# with or without modifications, as long as this notice is preserved. 6# with or without modifications, as long as this notice is preserved.
@@ -102,3 +102,48 @@ fi
102])# AC_SYS_LARGEFILE 102])# AC_SYS_LARGEFILE
103 103
104])# m4_version_prereq 2.69 104])# m4_version_prereq 2.69
105
106# Enable large files on systems where this is implemented by Gnulib, not by the
107# system headers.
108# Set the variables WINDOWS_64_BIT_OFF_T, WINDOWS_64_BIT_ST_SIZE if Gnulib
109# overrides ensure that off_t or 'struct size.st_size' are 64-bit, respectively.
110AC_DEFUN([gl_LARGEFILE],
111[
112 AC_REQUIRE([AC_CANONICAL_HOST])
113 case "$host_os" in
114 mingw*)
115 dnl Native Windows.
116 dnl mingw64 defines off_t to a 64-bit type already, if
117 dnl _FILE_OFFSET_BITS=64, which is ensured by AC_SYS_LARGEFILE.
118 AC_CACHE_CHECK([for 64-bit off_t], [gl_cv_type_off_t_64],
119 [AC_COMPILE_IFELSE(
120 [AC_LANG_PROGRAM(
121 [[#include <sys/types.h>
122 int verify_off_t_size[sizeof (off_t) >= 8 ? 1 : -1];
123 ]],
124 [[]])],
125 [gl_cv_type_off_t_64=yes], [gl_cv_type_off_t_64=no])
126 ])
127 if test $gl_cv_type_off_t_64 = no; then
128 WINDOWS_64_BIT_OFF_T=1
129 else
130 WINDOWS_64_BIT_OFF_T=0
131 fi
132 dnl But all native Windows platforms (including mingw64) have a 32-bit
133 dnl st_size member in 'struct stat'.
134 WINDOWS_64_BIT_ST_SIZE=1
135 ;;
136 *)
137 dnl Nothing to do on gnulib's side.
138 dnl A 64-bit off_t is
139 dnl - already the default on MacOS X, FreeBSD, NetBSD, OpenBSD, IRIX,
140 dnl OSF/1, Cygwin,
141 dnl - enabled by _FILE_OFFSET_BITS=64 (ensured by AC_SYS_LARGEFILE) on
142 dnl glibc, HP-UX, Solaris,
143 dnl - enabled by _LARGE_FILES=1 (ensured by AC_SYS_LARGEFILE) on AIX,
144 dnl - impossible to achieve on Minix 3.1.8.
145 WINDOWS_64_BIT_OFF_T=0
146 WINDOWS_64_BIT_ST_SIZE=0
147 ;;
148 esac
149])
diff --git a/m4/longlong.m4 b/m4/longlong.m4
index aed816cfa5e..b9c65c756ee 100644
--- a/m4/longlong.m4
+++ b/m4/longlong.m4
@@ -1,5 +1,5 @@
1# longlong.m4 serial 16 1# longlong.m4 serial 17
2dnl Copyright (C) 1999-2007, 2009-2011 Free Software Foundation, Inc. 2dnl Copyright (C) 1999-2007, 2009-2012 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,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
@@ -51,7 +51,7 @@ AC_DEFUN([AC_TYPE_LONG_LONG_INT],
51 fi]) 51 fi])
52 if test $ac_cv_type_long_long_int = yes; then 52 if test $ac_cv_type_long_long_int = yes; then
53 AC_DEFINE([HAVE_LONG_LONG_INT], [1], 53 AC_DEFINE([HAVE_LONG_LONG_INT], [1],
54 [Define to 1 if the system has the type `long long int'.]) 54 [Define to 1 if the system has the type 'long long int'.])
55 fi 55 fi
56]) 56])
57 57
@@ -77,7 +77,7 @@ AC_DEFUN([AC_TYPE_UNSIGNED_LONG_LONG_INT],
77 fi]) 77 fi])
78 if test $ac_cv_type_unsigned_long_long_int = yes; then 78 if test $ac_cv_type_unsigned_long_long_int = yes; then
79 AC_DEFINE([HAVE_UNSIGNED_LONG_LONG_INT], [1], 79 AC_DEFINE([HAVE_UNSIGNED_LONG_LONG_INT], [1],
80 [Define to 1 if the system has the type `unsigned long long int'.]) 80 [Define to 1 if the system has the type 'unsigned long long int'.])
81 fi 81 fi
82]) 82])
83 83
diff --git a/m4/lstat.m4 b/m4/lstat.m4
index fe161d40101..b7335bda1b2 100644
--- a/m4/lstat.m4
+++ b/m4/lstat.m4
@@ -1,6 +1,6 @@
1# serial 23 1# serial 25
2 2
3# Copyright (C) 1997-2001, 2003-2011 Free Software Foundation, Inc. 3# Copyright (C) 1997-2001, 2003-2012 Free Software Foundation, Inc.
4# 4#
5# This file is free software; the Free Software Foundation 5# This file is free software; the Free Software Foundation
6# gives unlimited permission to copy and/or distribute it, 6# gives unlimited permission to copy and/or distribute it,
@@ -16,9 +16,11 @@ AC_DEFUN([gl_FUNC_LSTAT],
16 AC_CHECK_FUNCS_ONCE([lstat]) 16 AC_CHECK_FUNCS_ONCE([lstat])
17 if test $ac_cv_func_lstat = yes; then 17 if test $ac_cv_func_lstat = yes; then
18 AC_REQUIRE([gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK]) 18 AC_REQUIRE([gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK])
19 if test $gl_cv_func_lstat_dereferences_slashed_symlink = no; then 19 case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
20 REPLACE_LSTAT=1 20 *no)
21 fi 21 REPLACE_LSTAT=1
22 ;;
23 esac
22 else 24 else
23 HAVE_LSTAT=0 25 HAVE_LSTAT=0
24 fi 26 fi
@@ -51,20 +53,25 @@ AC_DEFUN([gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK],
51 ]])], 53 ]])],
52 [gl_cv_func_lstat_dereferences_slashed_symlink=yes], 54 [gl_cv_func_lstat_dereferences_slashed_symlink=yes],
53 [gl_cv_func_lstat_dereferences_slashed_symlink=no], 55 [gl_cv_func_lstat_dereferences_slashed_symlink=no],
54 [# When cross-compiling, be pessimistic so we will end up using the 56 [case "$host_os" in
55 # replacement version of lstat that checks for trailing slashes and 57 # Guess yes on glibc systems.
56 # calls lstat a second time when necessary. 58 *-gnu*) gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
57 gl_cv_func_lstat_dereferences_slashed_symlink=no 59 # If we don't know, assume the worst.
60 *) gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
61 esac
58 ]) 62 ])
59 else 63 else
60 # If the 'ln -s' command failed, then we probably don't even 64 # If the 'ln -s' command failed, then we probably don't even
61 # have an lstat function. 65 # have an lstat function.
62 gl_cv_func_lstat_dereferences_slashed_symlink=no 66 gl_cv_func_lstat_dereferences_slashed_symlink="guessing no"
63 fi 67 fi
64 rm -f conftest.sym conftest.file 68 rm -f conftest.sym conftest.file
65 ]) 69 ])
66 test $gl_cv_func_lstat_dereferences_slashed_symlink = yes && 70 case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
67 AC_DEFINE_UNQUOTED([LSTAT_FOLLOWS_SLASHED_SYMLINK], [1], 71 *yes)
68 [Define to 1 if `lstat' dereferences a symlink specified 72 AC_DEFINE_UNQUOTED([LSTAT_FOLLOWS_SLASHED_SYMLINK], [1],
69 with a trailing slash.]) 73 [Define to 1 if 'lstat' dereferences a symlink specified
74 with a trailing slash.])
75 ;;
76 esac
70]) 77])
diff --git a/m4/md5.m4 b/m4/md5.m4
index 4b41a85b354..e22f7bdb17a 100644
--- a/m4/md5.m4
+++ b/m4/md5.m4
@@ -1,5 +1,5 @@
1# md5.m4 serial 12 1# md5.m4 serial 12
2dnl Copyright (C) 2002-2006, 2008-2011 Free Software Foundation, Inc. 2dnl Copyright (C) 2002-2006, 2008-2012 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,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/mktime.m4 b/m4/mktime.m4
index 8ed6d5d2a30..5e05dfa697e 100644
--- a/m4/mktime.m4
+++ b/m4/mktime.m4
@@ -1,5 +1,5 @@
1# serial 21 1# serial 21
2dnl Copyright (C) 2002-2003, 2005-2007, 2009-2011 Free Software Foundation, 2dnl Copyright (C) 2002-2003, 2005-2007, 2009-2012 Free Software Foundation,
3dnl Inc. 3dnl Inc.
4dnl This file is free software; the Free Software Foundation 4dnl This file is free software; the Free Software Foundation
5dnl gives unlimited permission to copy and/or distribute it, 5dnl gives unlimited permission to copy and/or distribute it,
diff --git a/m4/multiarch.m4 b/m4/multiarch.m4
index 691d89270b6..b424dce652b 100644
--- a/m4/multiarch.m4
+++ b/m4/multiarch.m4
@@ -1,5 +1,5 @@
1# multiarch.m4 serial 6 1# multiarch.m4 serial 6
2dnl Copyright (C) 2008-2011 Free Software Foundation, Inc. 2dnl Copyright (C) 2008-2012 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,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/nocrash.m4 b/m4/nocrash.m4
index 60aad952956..08ef825499a 100644
--- a/m4/nocrash.m4
+++ b/m4/nocrash.m4
@@ -1,5 +1,5 @@
1# nocrash.m4 serial 3 1# nocrash.m4 serial 3
2dnl Copyright (C) 2005, 2009-2011 Free Software Foundation, Inc. 2dnl Copyright (C) 2005, 2009-2012 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,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/off_t.m4 b/m4/off_t.m4
new file mode 100644
index 00000000000..dfca2dfd233
--- /dev/null
+++ b/m4/off_t.m4
@@ -0,0 +1,18 @@
1# off_t.m4 serial 1
2dnl Copyright (C) 2012 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved.
6
7dnl Check whether to override the 'off_t' type.
8dnl Set WINDOWS_64_BIT_OFF_T.
9
10AC_DEFUN([gl_TYPE_OFF_T],
11[
12 m4_ifdef([gl_LARGEFILE], [
13 AC_REQUIRE([gl_LARGEFILE])
14 ], [
15 WINDOWS_64_BIT_OFF_T=0
16 ])
17 AC_SUBST([WINDOWS_64_BIT_OFF_T])
18])
diff --git a/m4/pathmax.m4 b/m4/pathmax.m4
index 4913fa06cb8..011786129e0 100644
--- a/m4/pathmax.m4
+++ b/m4/pathmax.m4
@@ -1,5 +1,5 @@
1# pathmax.m4 serial 10 1# pathmax.m4 serial 10
2dnl Copyright (C) 2002-2003, 2005-2006, 2009-2011 Free Software Foundation, 2dnl Copyright (C) 2002-2003, 2005-2006, 2009-2012 Free Software Foundation,
3dnl Inc. 3dnl Inc.
4dnl This file is free software; the Free Software Foundation 4dnl This file is free software; the Free Software Foundation
5dnl gives unlimited permission to copy and/or distribute it, 5dnl gives unlimited permission to copy and/or distribute it,
diff --git a/m4/pthread_sigmask.m4 b/m4/pthread_sigmask.m4
index f06bc119ff3..884edbdb5bb 100644
--- a/m4/pthread_sigmask.m4
+++ b/m4/pthread_sigmask.m4
@@ -1,11 +1,13 @@
1# pthread_sigmask.m4 serial 12 1# pthread_sigmask.m4 serial 13
2dnl Copyright (C) 2011 Free Software Foundation, Inc. 2dnl Copyright (C) 2011-2012 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,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
6 6
7AC_DEFUN([gl_FUNC_PTHREAD_SIGMASK], 7AC_DEFUN([gl_FUNC_PTHREAD_SIGMASK],
8[ 8[
9 AC_REQUIRE([gl_SIGNAL_H_DEFAULTS])
10
9 AC_CHECK_FUNCS_ONCE([pthread_sigmask]) 11 AC_CHECK_FUNCS_ONCE([pthread_sigmask])
10 LIB_PTHREAD_SIGMASK= 12 LIB_PTHREAD_SIGMASK=
11 13
diff --git a/m4/readlink.m4 b/m4/readlink.m4
index 91d7df3c91c..ccf5141d40b 100644
--- a/m4/readlink.m4
+++ b/m4/readlink.m4
@@ -1,5 +1,5 @@
1# readlink.m4 serial 11 1# readlink.m4 serial 12
2dnl Copyright (C) 2003, 2007, 2009-2011 Free Software Foundation, Inc. 2dnl Copyright (C) 2003, 2007, 2009-2012 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,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
@@ -7,6 +7,7 @@ dnl with or without modifications, as long as this notice is preserved.
7AC_DEFUN([gl_FUNC_READLINK], 7AC_DEFUN([gl_FUNC_READLINK],
8[ 8[
9 AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) 9 AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
10 AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
10 AC_CHECK_FUNCS_ONCE([readlink]) 11 AC_CHECK_FUNCS_ONCE([readlink])
11 if test $ac_cv_func_readlink = no; then 12 if test $ac_cv_func_readlink = no; then
12 HAVE_READLINK=0 13 HAVE_READLINK=0
@@ -32,15 +33,26 @@ AC_DEFUN([gl_FUNC_READLINK],
32]], [[char buf[20]; 33]], [[char buf[20];
33 return readlink ("conftest.lnk2/", buf, sizeof buf) != -1;]])], 34 return readlink ("conftest.lnk2/", buf, sizeof buf) != -1;]])],
34 [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],
35 [gl_cv_func_readlink_works="guessing no"]) 36 [case "$host_os" in
37 # Guess yes on glibc systems.
38 *-gnu*) gl_cv_func_readlink_works="guessing yes" ;;
39 # If we don't know, assume the worst.
40 *) gl_cv_func_readlink_works="guessing no" ;;
41 esac
42 ])
36 rm -f conftest.link conftest.lnk2]) 43 rm -f conftest.link conftest.lnk2])
37 if test "$gl_cv_func_readlink_works" != yes; then 44 case "$gl_cv_func_readlink_works" in
38 AC_DEFINE([READLINK_TRAILING_SLASH_BUG], [1], [Define to 1 if readlink 45 *yes)
39 fails to recognize a trailing slash.]) 46 if test "$gl_cv_decl_readlink_works" != yes; then
40 REPLACE_READLINK=1 47 REPLACE_READLINK=1
41 elif test "$gl_cv_decl_readlink_works" != yes; then 48 fi
42 REPLACE_READLINK=1 49 ;;
43 fi 50 *)
51 AC_DEFINE([READLINK_TRAILING_SLASH_BUG], [1], [Define to 1 if readlink
52 fails to recognize a trailing slash.])
53 REPLACE_READLINK=1
54 ;;
55 esac
44 fi 56 fi
45]) 57])
46 58
diff --git a/m4/sha1.m4 b/m4/sha1.m4
index b8f5c1dcafe..76198258b92 100644
--- a/m4/sha1.m4
+++ b/m4/sha1.m4
@@ -1,5 +1,5 @@
1# sha1.m4 serial 10 1# sha1.m4 serial 10
2dnl Copyright (C) 2002-2006, 2008-2011 Free Software Foundation, Inc. 2dnl Copyright (C) 2002-2006, 2008-2012 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,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/sha256.m4 b/m4/sha256.m4
index a3429ed3423..78cc95ed8b6 100644
--- a/m4/sha256.m4
+++ b/m4/sha256.m4
@@ -1,5 +1,5 @@
1# sha256.m4 serial 5 1# sha256.m4 serial 5
2dnl Copyright (C) 2005, 2008-2011 Free Software Foundation, Inc. 2dnl Copyright (C) 2005, 2008-2012 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,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/sha512.m4 b/m4/sha512.m4
index cd6a0bf302a..937ea8d5e9d 100644
--- a/m4/sha512.m4
+++ b/m4/sha512.m4
@@ -1,5 +1,5 @@
1# sha512.m4 serial 6 1# sha512.m4 serial 6
2dnl Copyright (C) 2005-2006, 2008-2011 Free Software Foundation, Inc. 2dnl Copyright (C) 2005-2006, 2008-2012 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,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/signal_h.m4 b/m4/signal_h.m4
index 5cf54a062fc..ed4d7306eee 100644
--- a/m4/signal_h.m4
+++ b/m4/signal_h.m4
@@ -1,5 +1,5 @@
1# signal_h.m4 serial 18 1# signal_h.m4 serial 18
2dnl Copyright (C) 2007-2011 Free Software Foundation, Inc. 2dnl Copyright (C) 2007-2012 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,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/signalblocking.m4 b/m4/signalblocking.m4
index eda856d04f9..ab8035efb75 100644
--- a/m4/signalblocking.m4
+++ b/m4/signalblocking.m4
@@ -1,5 +1,5 @@
1# signalblocking.m4 serial 13 1# signalblocking.m4 serial 13
2dnl Copyright (C) 2001-2002, 2006-2011 Free Software Foundation, Inc. 2dnl Copyright (C) 2001-2002, 2006-2012 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,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/socklen.m4 b/m4/socklen.m4
index 44751544485..a4ab43b3333 100644
--- a/m4/socklen.m4
+++ b/m4/socklen.m4
@@ -1,5 +1,5 @@
1# socklen.m4 serial 10 1# socklen.m4 serial 10
2dnl Copyright (C) 2005-2007, 2009-2011 Free Software Foundation, Inc. 2dnl Copyright (C) 2005-2007, 2009-2012 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,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/ssize_t.m4 b/m4/ssize_t.m4
index d7127521ebe..209d64c8235 100644
--- a/m4/ssize_t.m4
+++ b/m4/ssize_t.m4
@@ -1,5 +1,5 @@
1# ssize_t.m4 serial 5 (gettext-0.18.2) 1# ssize_t.m4 serial 5 (gettext-0.18.2)
2dnl Copyright (C) 2001-2003, 2006, 2010-2011 Free Software Foundation, Inc. 2dnl Copyright (C) 2001-2003, 2006, 2010-2012 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,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/st_dm_mode.m4 b/m4/st_dm_mode.m4
index 84f74638f12..b87cec00bee 100644
--- a/m4/st_dm_mode.m4
+++ b/m4/st_dm_mode.m4
@@ -1,6 +1,6 @@
1# serial 6 1# serial 6
2 2
3# Copyright (C) 1998-1999, 2001, 2009-2011 Free Software Foundation, Inc. 3# Copyright (C) 1998-1999, 2001, 2009-2012 Free Software Foundation, Inc.
4# This file is free software; the Free Software Foundation 4# This file is free software; the Free Software Foundation
5# gives unlimited permission to copy and/or distribute it, 5# gives unlimited permission to copy and/or distribute it,
6# with or without modifications, as long as this notice is preserved. 6# with or without modifications, as long as this notice is preserved.
diff --git a/m4/stat.m4 b/m4/stat.m4
index c63f59fd533..a8b79f5bcba 100644
--- a/m4/stat.m4
+++ b/m4/stat.m4
@@ -1,6 +1,6 @@
1# serial 8 1# serial 10
2 2
3# Copyright (C) 2009-2011 Free Software Foundation, Inc. 3# Copyright (C) 2009-2012 Free Software Foundation, Inc.
4# 4#
5# This file is free software; the Free Software Foundation 5# This file is free software; the Free Software Foundation
6# gives unlimited permission to copy and/or distribute it, 6# gives unlimited permission to copy and/or distribute it,
@@ -23,8 +23,9 @@ AC_DEFUN([gl_FUNC_STAT],
23 mingw*) gl_cv_func_stat_dir_slash="guessing no";; 23 mingw*) gl_cv_func_stat_dir_slash="guessing no";;
24 *) gl_cv_func_stat_dir_slash="guessing yes";; 24 *) gl_cv_func_stat_dir_slash="guessing yes";;
25 esac])]) 25 esac])])
26 dnl AIX 7.1, Solaris 9 mistakenly succeed on stat("file/") 26 dnl AIX 7.1, Solaris 9, mingw64 mistakenly succeed on stat("file/").
27 dnl FreeBSD 7.2 mistakenly succeeds on stat("link-to-file/") 27 dnl (For mingw, this is due to a broken stat() override in libmingwex.a.)
28 dnl FreeBSD 7.2 mistakenly succeeds on stat("link-to-file/").
28 AC_CACHE_CHECK([whether stat handles trailing slashes on files], 29 AC_CACHE_CHECK([whether stat handles trailing slashes on files],
29 [gl_cv_func_stat_file_slash], 30 [gl_cv_func_stat_file_slash],
30 [touch conftest.tmp 31 [touch conftest.tmp
@@ -46,7 +47,13 @@ AC_DEFUN([gl_FUNC_STAT],
46 return result; 47 return result;
47 ]])], 48 ]])],
48 [gl_cv_func_stat_file_slash=yes], [gl_cv_func_stat_file_slash=no], 49 [gl_cv_func_stat_file_slash=yes], [gl_cv_func_stat_file_slash=no],
49 [gl_cv_func_stat_file_slash="guessing no"]) 50 [case "$host_os" in
51 # Guess yes on glibc systems.
52 *-gnu*) gl_cv_func_stat_file_slash="guessing yes" ;;
53 # If we don't know, assume the worst.
54 *) gl_cv_func_stat_file_slash="guessing no" ;;
55 esac
56 ])
50 rm -f conftest.tmp conftest.lnk]) 57 rm -f conftest.tmp conftest.lnk])
51 case $gl_cv_func_stat_dir_slash in 58 case $gl_cv_func_stat_dir_slash in
52 *no) REPLACE_STAT=1 59 *no) REPLACE_STAT=1
diff --git a/m4/stdalign.m4 b/m4/stdalign.m4
new file mode 100644
index 00000000000..6659c9c3ecd
--- /dev/null
+++ b/m4/stdalign.m4
@@ -0,0 +1,51 @@
1# Check for stdalign.h that conforms to C11.
2
3dnl Copyright 2011-2012 Free Software Foundation, Inc.
4dnl This file is free software; the Free Software Foundation
5dnl gives unlimited permission to copy and/or distribute it,
6dnl with or without modifications, as long as this notice is preserved.
7
8# Prepare for substituting <stdalign.h> if it is not supported.
9
10AC_DEFUN([gl_STDALIGN_H],
11[
12 AC_CACHE_CHECK([for working stdalign.h],
13 [gl_cv_header_working_stdalign_h],
14 [AC_COMPILE_IFELSE(
15 [AC_LANG_PROGRAM(
16 [[#include <stdalign.h>
17 #include <stddef.h>
18
19 /* Test that alignof yields a result consistent with offsetof.
20 This catches GCC bug 52023
21 <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>. */
22 #ifdef __cplusplus
23 template <class t> struct alignof_helper { char a; t b; };
24 # define ao(type) offsetof (alignof_helper<type>, b)
25 #else
26 # define ao(type) offsetof (struct { char a; type b; }, b)
27 #endif
28 char test_double[ao (double) % _Alignof (double) == 0 ? 1 : -1];
29 char test_long[ao (long int) % _Alignof (long int) == 0 ? 1 : -1];
30 char test_alignof[alignof (double) == _Alignof (double) ? 1 : -1];
31
32 /* Test _Alignas only on platforms where gnulib can help. */
33 #if \
34 (__GNUC__ || __IBMC__ || __IBMCPP__ \
35 || 0x5110 <= __SUNPRO_C || 1300 <= _MSC_VER)
36 int alignas (8) alignas_int = 1;
37 char test_alignas[_Alignof (alignas_int) == 8 ? 1 : -1];
38 #endif
39 ]])],
40 [gl_cv_header_working_stdalign_h=yes],
41 [gl_cv_header_working_stdalign_h=no])])
42
43 if test $gl_cv_header_working_stdalign_h = yes; then
44 STDALIGN_H=''
45 else
46 STDALIGN_H='stdalign.h'
47 fi
48
49 AC_SUBST([STDALIGN_H])
50 AM_CONDITIONAL([GL_GENERATE_STDALIGN_H], [test -n "$STDALIGN_H"])
51])
diff --git a/m4/stdarg.m4 b/m4/stdarg.m4
index 5705de9ecaa..5c313cb8c91 100644
--- a/m4/stdarg.m4
+++ b/m4/stdarg.m4
@@ -1,5 +1,5 @@
1# stdarg.m4 serial 6 1# stdarg.m4 serial 6
2dnl Copyright (C) 2006, 2008-2011 Free Software Foundation, Inc. 2dnl Copyright (C) 2006, 2008-2012 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,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/stdbool.m4 b/m4/stdbool.m4
index 1ebf3e6808c..eabfa64579c 100644
--- a/m4/stdbool.m4
+++ b/m4/stdbool.m4
@@ -1,6 +1,6 @@
1# Check for stdbool.h that conforms to C99. 1# Check for stdbool.h that conforms to C99.
2 2
3dnl Copyright (C) 2002-2006, 2009-2011 Free Software Foundation, Inc. 3dnl Copyright (C) 2002-2006, 2009-2012 Free Software Foundation, Inc.
4dnl This file is free software; the Free Software Foundation 4dnl This file is free software; the Free Software Foundation
5dnl gives unlimited permission to copy and/or distribute it, 5dnl gives unlimited permission to copy and/or distribute it,
6dnl with or without modifications, as long as this notice is preserved. 6dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/stddef_h.m4 b/m4/stddef_h.m4
index 1ae2344318e..cc116096093 100644
--- a/m4/stddef_h.m4
+++ b/m4/stddef_h.m4
@@ -1,6 +1,6 @@
1dnl A placeholder for POSIX 2008 <stddef.h>, for platforms that have issues. 1dnl A placeholder for POSIX 2008 <stddef.h>, for platforms that have issues.
2# stddef_h.m4 serial 4 2# stddef_h.m4 serial 4
3dnl Copyright (C) 2009-2011 Free Software Foundation, Inc. 3dnl Copyright (C) 2009-2012 Free Software Foundation, Inc.
4dnl This file is free software; the Free Software Foundation 4dnl This file is free software; the Free Software Foundation
5dnl gives unlimited permission to copy and/or distribute it, 5dnl gives unlimited permission to copy and/or distribute it,
6dnl with or without modifications, as long as this notice is preserved. 6dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/stdint.m4 b/m4/stdint.m4
index 092161c9968..28d342ea233 100644
--- a/m4/stdint.m4
+++ b/m4/stdint.m4
@@ -1,5 +1,5 @@
1# stdint.m4 serial 41 1# stdint.m4 serial 43
2dnl Copyright (C) 2001-2011 Free Software Foundation, Inc. 2dnl Copyright (C) 2001-2012 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,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
@@ -69,8 +69,6 @@ AC_DEFUN_ONCE([gl_STDINT_H],
69 [gl_cv_header_working_stdint_h=no 69 [gl_cv_header_working_stdint_h=no
70 AC_COMPILE_IFELSE([ 70 AC_COMPILE_IFELSE([
71 AC_LANG_PROGRAM([[ 71 AC_LANG_PROGRAM([[
72#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
73#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */
74#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ 72#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
75#include <stdint.h> 73#include <stdint.h>
76/* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */ 74/* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */
@@ -219,8 +217,6 @@ struct s {
219 dnl This detects a bug on HP-UX 11.23/ia64. 217 dnl This detects a bug on HP-UX 11.23/ia64.
220 AC_RUN_IFELSE([ 218 AC_RUN_IFELSE([
221 AC_LANG_PROGRAM([[ 219 AC_LANG_PROGRAM([[
222#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
223#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */
224#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ 220#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
225#include <stdint.h> 221#include <stdint.h>
226] 222]
diff --git a/m4/stdio_h.m4 b/m4/stdio_h.m4
index 39bf80e2ac9..b03393b957b 100644
--- a/m4/stdio_h.m4
+++ b/m4/stdio_h.m4
@@ -1,5 +1,5 @@
1# stdio_h.m4 serial 40 1# stdio_h.m4 serial 41
2dnl Copyright (C) 2007-2011 Free Software Foundation, Inc. 2dnl Copyright (C) 2007-2012 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,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
@@ -18,7 +18,6 @@ AC_DEFUN([gl_STDIO_H],
18 GNULIB_GETC=1 18 GNULIB_GETC=1
19 GNULIB_GETCHAR=1 19 GNULIB_GETCHAR=1
20 GNULIB_FGETS=1 20 GNULIB_FGETS=1
21 GNULIB_GETS=1
22 GNULIB_FREAD=1 21 GNULIB_FREAD=1
23 dnl This ifdef is necessary to avoid an error "missing file lib/stdio-read.c" 22 dnl This ifdef is necessary to avoid an error "missing file lib/stdio-read.c"
24 dnl "expected source file, required through AC_LIBSOURCES, not found". It is 23 dnl "expected source file, required through AC_LIBSOURCES, not found". It is
@@ -72,10 +71,10 @@ AC_DEFUN([gl_STDIO_H],
72 71
73 dnl Check for declarations of anything we want to poison if the 72 dnl Check for declarations of anything we want to poison if the
74 dnl corresponding gnulib module is not in use, and which is not 73 dnl corresponding gnulib module is not in use, and which is not
75 dnl guaranteed by C89. 74 dnl guaranteed by both C89 and C11.
76 gl_WARN_ON_USE_PREPARE([[#include <stdio.h> 75 gl_WARN_ON_USE_PREPARE([[#include <stdio.h>
77 ]], [dprintf fpurge fseeko ftello getdelim getline pclose popen renameat 76 ]], [dprintf fpurge fseeko ftello getdelim getline gets pclose popen
78 snprintf tmpfile vdprintf vsnprintf]) 77 renameat snprintf tmpfile vdprintf vsnprintf])
79]) 78])
80 79
81AC_DEFUN([gl_STDIO_MODULE_INDICATOR], 80AC_DEFUN([gl_STDIO_MODULE_INDICATOR],
@@ -113,7 +112,6 @@ AC_DEFUN([gl_STDIO_H_DEFAULTS],
113 GNULIB_GETCHAR=0; AC_SUBST([GNULIB_GETCHAR]) 112 GNULIB_GETCHAR=0; AC_SUBST([GNULIB_GETCHAR])
114 GNULIB_GETDELIM=0; AC_SUBST([GNULIB_GETDELIM]) 113 GNULIB_GETDELIM=0; AC_SUBST([GNULIB_GETDELIM])
115 GNULIB_GETLINE=0; AC_SUBST([GNULIB_GETLINE]) 114 GNULIB_GETLINE=0; AC_SUBST([GNULIB_GETLINE])
116 GNULIB_GETS=0; AC_SUBST([GNULIB_GETS])
117 GNULIB_OBSTACK_PRINTF=0; AC_SUBST([GNULIB_OBSTACK_PRINTF]) 115 GNULIB_OBSTACK_PRINTF=0; AC_SUBST([GNULIB_OBSTACK_PRINTF])
118 GNULIB_OBSTACK_PRINTF_POSIX=0; AC_SUBST([GNULIB_OBSTACK_PRINTF_POSIX]) 116 GNULIB_OBSTACK_PRINTF_POSIX=0; AC_SUBST([GNULIB_OBSTACK_PRINTF_POSIX])
119 GNULIB_PCLOSE=0; AC_SUBST([GNULIB_PCLOSE]) 117 GNULIB_PCLOSE=0; AC_SUBST([GNULIB_PCLOSE])
diff --git a/m4/stdlib_h.m4 b/m4/stdlib_h.m4
index 25fdada0de7..ab43728ace4 100644
--- a/m4/stdlib_h.m4
+++ b/m4/stdlib_h.m4
@@ -1,5 +1,5 @@
1# stdlib_h.m4 serial 37 1# stdlib_h.m4 serial 41
2dnl Copyright (C) 2007-2011 Free Software Foundation, Inc. 2dnl Copyright (C) 2007-2012 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,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
@@ -19,10 +19,11 @@ AC_DEFUN([gl_STDLIB_H],
19#if HAVE_RANDOM_H 19#if HAVE_RANDOM_H
20# include <random.h> 20# include <random.h>
21#endif 21#endif
22 ]], [_Exit atoll canonicalize_file_name getloadavg getsubopt grantpt mkdtemp 22 ]], [_Exit atoll canonicalize_file_name getloadavg getsubopt grantpt
23 mkostemp mkostemps mkstemp mkstemps ptsname random_r initstat_r srandom_r 23 initstate initstate_r mkdtemp mkostemp mkostemps mkstemp mkstemps
24 setstate_r realpath rpmatch setenv strtod strtoll strtoull unlockpt 24 posix_openpt ptsname ptsname_r random random_r realpath rpmatch
25 unsetenv]) 25 setenv setstate setstate_r srandom srandom_r
26 strtod strtoll strtoull unlockpt unsetenv])
26]) 27])
27 28
28AC_DEFUN([gl_STDLIB_MODULE_INDICATOR], 29AC_DEFUN([gl_STDLIB_MODULE_INDICATOR],
@@ -50,8 +51,11 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS],
50 GNULIB_MKOSTEMPS=0; AC_SUBST([GNULIB_MKOSTEMPS]) 51 GNULIB_MKOSTEMPS=0; AC_SUBST([GNULIB_MKOSTEMPS])
51 GNULIB_MKSTEMP=0; AC_SUBST([GNULIB_MKSTEMP]) 52 GNULIB_MKSTEMP=0; AC_SUBST([GNULIB_MKSTEMP])
52 GNULIB_MKSTEMPS=0; AC_SUBST([GNULIB_MKSTEMPS]) 53 GNULIB_MKSTEMPS=0; AC_SUBST([GNULIB_MKSTEMPS])
54 GNULIB_POSIX_OPENPT=0; AC_SUBST([GNULIB_POSIX_OPENPT])
53 GNULIB_PTSNAME=0; AC_SUBST([GNULIB_PTSNAME]) 55 GNULIB_PTSNAME=0; AC_SUBST([GNULIB_PTSNAME])
56 GNULIB_PTSNAME_R=0; AC_SUBST([GNULIB_PTSNAME_R])
54 GNULIB_PUTENV=0; AC_SUBST([GNULIB_PUTENV]) 57 GNULIB_PUTENV=0; AC_SUBST([GNULIB_PUTENV])
58 GNULIB_RANDOM=0; AC_SUBST([GNULIB_RANDOM])
55 GNULIB_RANDOM_R=0; AC_SUBST([GNULIB_RANDOM_R]) 59 GNULIB_RANDOM_R=0; AC_SUBST([GNULIB_RANDOM_R])
56 GNULIB_REALLOC_POSIX=0; AC_SUBST([GNULIB_REALLOC_POSIX]) 60 GNULIB_REALLOC_POSIX=0; AC_SUBST([GNULIB_REALLOC_POSIX])
57 GNULIB_REALPATH=0; AC_SUBST([GNULIB_REALPATH]) 61 GNULIB_REALPATH=0; AC_SUBST([GNULIB_REALPATH])
@@ -76,7 +80,10 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS],
76 HAVE_MKOSTEMPS=1; AC_SUBST([HAVE_MKOSTEMPS]) 80 HAVE_MKOSTEMPS=1; AC_SUBST([HAVE_MKOSTEMPS])
77 HAVE_MKSTEMP=1; AC_SUBST([HAVE_MKSTEMP]) 81 HAVE_MKSTEMP=1; AC_SUBST([HAVE_MKSTEMP])
78 HAVE_MKSTEMPS=1; AC_SUBST([HAVE_MKSTEMPS]) 82 HAVE_MKSTEMPS=1; AC_SUBST([HAVE_MKSTEMPS])
83 HAVE_POSIX_OPENPT=1; AC_SUBST([HAVE_POSIX_OPENPT])
79 HAVE_PTSNAME=1; AC_SUBST([HAVE_PTSNAME]) 84 HAVE_PTSNAME=1; AC_SUBST([HAVE_PTSNAME])
85 HAVE_PTSNAME_R=1; AC_SUBST([HAVE_PTSNAME_R])
86 HAVE_RANDOM=1; AC_SUBST([HAVE_RANDOM])
80 HAVE_RANDOM_H=1; AC_SUBST([HAVE_RANDOM_H]) 87 HAVE_RANDOM_H=1; AC_SUBST([HAVE_RANDOM_H])
81 HAVE_RANDOM_R=1; AC_SUBST([HAVE_RANDOM_R]) 88 HAVE_RANDOM_R=1; AC_SUBST([HAVE_RANDOM_R])
82 HAVE_REALPATH=1; AC_SUBST([HAVE_REALPATH]) 89 HAVE_REALPATH=1; AC_SUBST([HAVE_REALPATH])
@@ -95,7 +102,9 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS],
95 REPLACE_MALLOC=0; AC_SUBST([REPLACE_MALLOC]) 102 REPLACE_MALLOC=0; AC_SUBST([REPLACE_MALLOC])
96 REPLACE_MBTOWC=0; AC_SUBST([REPLACE_MBTOWC]) 103 REPLACE_MBTOWC=0; AC_SUBST([REPLACE_MBTOWC])
97 REPLACE_MKSTEMP=0; AC_SUBST([REPLACE_MKSTEMP]) 104 REPLACE_MKSTEMP=0; AC_SUBST([REPLACE_MKSTEMP])
105 REPLACE_PTSNAME_R=0; AC_SUBST([REPLACE_PTSNAME_R])
98 REPLACE_PUTENV=0; AC_SUBST([REPLACE_PUTENV]) 106 REPLACE_PUTENV=0; AC_SUBST([REPLACE_PUTENV])
107 REPLACE_RANDOM_R=0; AC_SUBST([REPLACE_RANDOM_R])
99 REPLACE_REALLOC=0; AC_SUBST([REPLACE_REALLOC]) 108 REPLACE_REALLOC=0; AC_SUBST([REPLACE_REALLOC])
100 REPLACE_REALPATH=0; AC_SUBST([REPLACE_REALPATH]) 109 REPLACE_REALPATH=0; AC_SUBST([REPLACE_REALPATH])
101 REPLACE_SETENV=0; AC_SUBST([REPLACE_SETENV]) 110 REPLACE_SETENV=0; AC_SUBST([REPLACE_SETENV])
diff --git a/m4/strftime.m4 b/m4/strftime.m4
index dd30ccfc054..42043019b4b 100644
--- a/m4/strftime.m4
+++ b/m4/strftime.m4
@@ -1,6 +1,6 @@
1# serial 33 1# serial 33
2 2
3# Copyright (C) 1996-1997, 1999-2007, 2009-2011 Free Software Foundation, Inc. 3# Copyright (C) 1996-1997, 1999-2007, 2009-2012 Free Software Foundation, Inc.
4# 4#
5# This file is free software; the Free Software Foundation 5# This file is free software; the Free Software Foundation
6# gives unlimited permission to copy and/or distribute it, 6# gives unlimited permission to copy and/or distribute it,
diff --git a/m4/strtoimax.m4 b/m4/strtoimax.m4
index a8d0b69c205..58a31899b8b 100644
--- a/m4/strtoimax.m4
+++ b/m4/strtoimax.m4
@@ -1,5 +1,5 @@
1# strtoimax.m4 serial 11 1# strtoimax.m4 serial 13
2dnl Copyright (C) 2002-2004, 2006, 2009-2011 Free Software Foundation, Inc. 2dnl Copyright (C) 2002-2004, 2006, 2009-2012 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,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
@@ -14,6 +14,66 @@ AC_DEFUN([gl_FUNC_STRTOIMAX],
14 if test "$ac_cv_have_decl_strtoimax" != yes; then 14 if test "$ac_cv_have_decl_strtoimax" != yes; then
15 HAVE_DECL_STRTOIMAX=0 15 HAVE_DECL_STRTOIMAX=0
16 fi 16 fi
17
18 if test $ac_cv_func_strtoimax = yes; then
19 HAVE_STRTOIMAX=1
20 dnl On AIX 5.1, strtoimax() fails for values outside the 'int' range.
21 AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
22 AC_CACHE_CHECK([whether strtoimax works], [gl_cv_func_strtoimax],
23 [AC_RUN_IFELSE(
24 [AC_LANG_SOURCE([[
25#include <errno.h>
26#include <string.h>
27#include <inttypes.h>
28int main ()
29{
30 if (sizeof (intmax_t) > sizeof (int))
31 {
32 const char *s = "4294967295";
33 char *p;
34 intmax_t res;
35 errno = 0;
36 res = strtoimax (s, &p, 10);
37 if (p != s + strlen (s))
38 return 1;
39 if (errno != 0)
40 return 2;
41 if (res != (intmax_t) 65535 * (intmax_t) 65537)
42 return 3;
43 }
44 else
45 {
46 const char *s = "2147483647";
47 char *p;
48 intmax_t res;
49 errno = 0;
50 res = strtoimax (s, &p, 10);
51 if (p != s + strlen (s))
52 return 1;
53 if (errno != 0)
54 return 2;
55 if (res != 2147483647)
56 return 3;
57 }
58 return 0;
59}
60]])],
61 [gl_cv_func_strtoimax=yes],
62 [gl_cv_func_strtoimax=no],
63 [case "$host_os" in
64 # Guess no on AIX 5.
65 aix5*) gl_cv_func_strtoimax="guessing no" ;;
66 # Guess yes otherwise.
67 *) gl_cv_func_strtoimax="guessing yes" ;;
68 esac
69 ])
70 ])
71 case "$gl_cv_func_strtoimax" in
72 *no) REPLACE_STRTOIMAX=1 ;;
73 esac
74 else
75 HAVE_STRTOIMAX=0
76 fi
17]) 77])
18 78
19# Prerequisites of lib/strtoimax.c. 79# Prerequisites of lib/strtoimax.c.
diff --git a/m4/strtoll.m4 b/m4/strtoll.m4
index ed6a854b58c..5854bcb5827 100644
--- a/m4/strtoll.m4
+++ b/m4/strtoll.m4
@@ -1,5 +1,5 @@
1# strtoll.m4 serial 7 1# strtoll.m4 serial 7
2dnl Copyright (C) 2002, 2004, 2006, 2008-2011 Free Software Foundation, Inc. 2dnl Copyright (C) 2002, 2004, 2006, 2008-2012 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,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/strtoull.m4 b/m4/strtoull.m4
index 57ef75423df..7c659f57d4e 100644
--- a/m4/strtoull.m4
+++ b/m4/strtoull.m4
@@ -1,5 +1,5 @@
1# strtoull.m4 serial 7 1# strtoull.m4 serial 7
2dnl Copyright (C) 2002, 2004, 2006, 2008-2011 Free Software Foundation, Inc. 2dnl Copyright (C) 2002, 2004, 2006, 2008-2012 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,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/strtoumax.m4 b/m4/strtoumax.m4
index 1ddf6820e3f..5b2285c6b35 100644
--- a/m4/strtoumax.m4
+++ b/m4/strtoumax.m4
@@ -1,5 +1,5 @@
1# strtoumax.m4 serial 11 1# strtoumax.m4 serial 11
2dnl Copyright (C) 2002-2004, 2006, 2009-2011 Free Software Foundation, Inc. 2dnl Copyright (C) 2002-2004, 2006, 2009-2012 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,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/symlink.m4 b/m4/symlink.m4
index 680c14f6610..cfd90ec2b6e 100644
--- a/m4/symlink.m4
+++ b/m4/symlink.m4
@@ -1,7 +1,7 @@
1# serial 5 1# serial 6
2# See if we need to provide symlink replacement. 2# See if we need to provide symlink replacement.
3 3
4dnl Copyright (C) 2009-2011 Free Software Foundation, Inc. 4dnl Copyright (C) 2009-2012 Free Software Foundation, Inc.
5dnl This file is free software; the Free Software Foundation 5dnl This file is free software; the Free Software Foundation
6dnl gives unlimited permission to copy and/or distribute it, 6dnl gives unlimited permission to copy and/or distribute it,
7dnl with or without modifications, as long as this notice is preserved. 7dnl with or without modifications, as long as this notice is preserved.
@@ -11,6 +11,7 @@ dnl with or without modifications, as long as this notice is preserved.
11AC_DEFUN([gl_FUNC_SYMLINK], 11AC_DEFUN([gl_FUNC_SYMLINK],
12[ 12[
13 AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) 13 AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
14 AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
14 AC_CHECK_FUNCS_ONCE([symlink]) 15 AC_CHECK_FUNCS_ONCE([symlink])
15 dnl The best we can do on mingw is provide a dummy that always fails, so 16 dnl The best we can do on mingw is provide a dummy that always fails, so
16 dnl that compilation can proceed with fewer ifdefs. On FreeBSD 7.2, AIX 7.1, 17 dnl that compilation can proceed with fewer ifdefs. On FreeBSD 7.2, AIX 7.1,
@@ -34,10 +35,19 @@ AC_DEFUN([gl_FUNC_SYMLINK],
34 return result; 35 return result;
35 ]])], 36 ]])],
36 [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],
37 [gl_cv_func_symlink_works="guessing no"]) 38 [case "$host_os" in
39 # Guess yes on glibc systems.
40 *-gnu*) gl_cv_func_symlink_works="guessing yes" ;;
41 # If we don't know, assume the worst.
42 *) gl_cv_func_symlink_works="guessing no" ;;
43 esac
44 ])
38 rm -f conftest.f conftest.link conftest.lnk2]) 45 rm -f conftest.f conftest.link conftest.lnk2])
39 if test "$gl_cv_func_symlink_works" != yes; then 46 case "$gl_cv_func_symlink_works" in
40 REPLACE_SYMLINK=1 47 *yes) ;;
41 fi 48 *)
49 REPLACE_SYMLINK=1
50 ;;
51 esac
42 fi 52 fi
43]) 53])
diff --git a/m4/sys_stat_h.m4 b/m4/sys_stat_h.m4
index 83ebac613b7..f45dee1dc4d 100644
--- a/m4/sys_stat_h.m4
+++ b/m4/sys_stat_h.m4
@@ -1,5 +1,5 @@
1# sys_stat_h.m4 serial 26 -*- Autoconf -*- 1# sys_stat_h.m4 serial 27 -*- Autoconf -*-
2dnl Copyright (C) 2006-2011 Free Software Foundation, Inc. 2dnl Copyright (C) 2006-2012 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,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
@@ -22,6 +22,19 @@ AC_DEFUN([gl_HEADER_SYS_STAT_H],
22 dnl Ensure the type mode_t gets defined. 22 dnl Ensure the type mode_t gets defined.
23 AC_REQUIRE([AC_TYPE_MODE_T]) 23 AC_REQUIRE([AC_TYPE_MODE_T])
24 24
25 dnl Whether to override 'struct stat'.
26 m4_ifdef([gl_LARGEFILE], [
27 AC_REQUIRE([gl_LARGEFILE])
28 ], [
29 WINDOWS_64_BIT_ST_SIZE=0
30 ])
31 AC_SUBST([WINDOWS_64_BIT_ST_SIZE])
32 if test $WINDOWS_64_BIT_ST_SIZE = 1; then
33 AC_DEFINE([_GL_WINDOWS_64_BIT_ST_SIZE], [1],
34 [Define to 1 if Gnulib overrides 'struct stat' on Windows so that
35 struct stat.st_size becomes 64-bit.])
36 fi
37
25 dnl Define types that are supposed to be defined in <sys/types.h> or 38 dnl Define types that are supposed to be defined in <sys/types.h> or
26 dnl <sys/stat.h>. 39 dnl <sys/stat.h>.
27 AC_CHECK_TYPE([nlink_t], [], 40 AC_CHECK_TYPE([nlink_t], [],
diff --git a/m4/sys_types_h.m4 b/m4/sys_types_h.m4
new file mode 100644
index 00000000000..f11eef2fe8a
--- /dev/null
+++ b/m4/sys_types_h.m4
@@ -0,0 +1,24 @@
1# sys_types_h.m4 serial 4
2dnl Copyright (C) 2011-2012 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved.
6
7AC_DEFUN([gl_SYS_TYPES_H],
8[
9 AC_REQUIRE([gl_SYS_TYPES_H_DEFAULTS])
10 gl_NEXT_HEADERS([sys/types.h])
11
12 dnl Ensure the type pid_t gets defined.
13 AC_REQUIRE([AC_TYPE_PID_T])
14
15 dnl Ensure the type mode_t gets defined.
16 AC_REQUIRE([AC_TYPE_MODE_T])
17
18 dnl Whether to override the 'off_t' type.
19 AC_REQUIRE([gl_TYPE_OFF_T])
20])
21
22AC_DEFUN([gl_SYS_TYPES_H_DEFAULTS],
23[
24])
diff --git a/m4/time_h.m4 b/m4/time_h.m4
index 3454b23fa0c..b88da764630 100644
--- a/m4/time_h.m4
+++ b/m4/time_h.m4
@@ -1,6 +1,6 @@
1# Configure a more-standard replacement for <time.h>. 1# Configure a more-standard replacement for <time.h>.
2 2
3# Copyright (C) 2000-2001, 2003-2007, 2009-2011 Free Software Foundation, Inc. 3# Copyright (C) 2000-2001, 2003-2007, 2009-2012 Free Software Foundation, Inc.
4 4
5# serial 6 5# serial 6
6 6
@@ -25,7 +25,7 @@ AC_DEFUN([gl_HEADER_TIME_H_BODY],
25 AC_REQUIRE([gl_CHECK_TYPE_STRUCT_TIMESPEC]) 25 AC_REQUIRE([gl_CHECK_TYPE_STRUCT_TIMESPEC])
26]) 26])
27 27
28dnl Define HAVE_STRUCT_TIMESPEC if `struct timespec' is declared 28dnl Define HAVE_STRUCT_TIMESPEC if 'struct timespec' is declared
29dnl in time.h, sys/time.h, or pthread.h. 29dnl in time.h, sys/time.h, or pthread.h.
30 30
31AC_DEFUN([gl_CHECK_TYPE_STRUCT_TIMESPEC], 31AC_DEFUN([gl_CHECK_TYPE_STRUCT_TIMESPEC],
diff --git a/m4/time_r.m4 b/m4/time_r.m4
index d646edc2d3c..c3579fb3b89 100644
--- a/m4/time_r.m4
+++ b/m4/time_r.m4
@@ -1,6 +1,6 @@
1dnl Reentrant time functions: localtime_r, gmtime_r. 1dnl Reentrant time functions: localtime_r, gmtime_r.
2 2
3dnl Copyright (C) 2003, 2006-2011 Free Software Foundation, Inc. 3dnl Copyright (C) 2003, 2006-2012 Free Software Foundation, Inc.
4dnl This file is free software; the Free Software Foundation 4dnl This file is free software; the Free Software Foundation
5dnl gives unlimited permission to copy and/or distribute it, 5dnl gives unlimited permission to copy and/or distribute it,
6dnl with or without modifications, as long as this notice is preserved. 6dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/tm_gmtoff.m4 b/m4/tm_gmtoff.m4
index d65ddc013be..c12e6cefde2 100644
--- a/m4/tm_gmtoff.m4
+++ b/m4/tm_gmtoff.m4
@@ -1,5 +1,5 @@
1# tm_gmtoff.m4 serial 3 1# tm_gmtoff.m4 serial 3
2dnl Copyright (C) 2002, 2009-2011 Free Software Foundation, Inc. 2dnl Copyright (C) 2002, 2009-2012 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,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/unistd_h.m4 b/m4/unistd_h.m4
index 57c8094e42c..7e7651b9d2e 100644
--- a/m4/unistd_h.m4
+++ b/m4/unistd_h.m4
@@ -1,5 +1,5 @@
1# unistd_h.m4 serial 61 1# unistd_h.m4 serial 65
2dnl Copyright (C) 2006-2011 Free Software Foundation, Inc. 2dnl Copyright (C) 2006-2012 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,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
@@ -24,6 +24,9 @@ AC_DEFUN([gl_UNISTD_H],
24 dnl Ensure the type pid_t gets defined. 24 dnl Ensure the type pid_t gets defined.
25 AC_REQUIRE([AC_TYPE_PID_T]) 25 AC_REQUIRE([AC_TYPE_PID_T])
26 26
27 dnl Determine WINDOWS_64_BIT_OFF_T.
28 AC_REQUIRE([gl_TYPE_OFF_T])
29
27 dnl Check for declarations of anything we want to poison if the 30 dnl Check for declarations of anything we want to poison if the
28 dnl corresponding gnulib module is not in use. 31 dnl corresponding gnulib module is not in use.
29 gl_WARN_ON_USE_PREPARE([[ 32 gl_WARN_ON_USE_PREPARE([[
@@ -41,10 +44,11 @@ AC_DEFUN([gl_UNISTD_H],
41#endif 44#endif
42 ]], [chdir chown dup dup2 dup3 environ euidaccess faccessat fchdir fchownat 45 ]], [chdir chown dup dup2 dup3 environ euidaccess faccessat fchdir fchownat
43 fdatasync fsync ftruncate getcwd getdomainname getdtablesize getgroups 46 fdatasync fsync ftruncate getcwd getdomainname getdtablesize getgroups
44 gethostname getlogin getlogin_r getpagesize getusershell setusershell 47 gethostname getlogin getlogin_r getpagesize
45 endusershell group_member lchown link linkat lseek pipe pipe2 pread pwrite 48 getusershell setusershell endusershell
46 readlink readlinkat rmdir sleep symlink symlinkat ttyname_r unlink unlinkat 49 group_member isatty lchown link linkat lseek pipe pipe2 pread pwrite
47 usleep]) 50 readlink readlinkat rmdir sethostname sleep symlink symlinkat ttyname_r
51 unlink unlinkat usleep])
48]) 52])
49 53
50AC_DEFUN([gl_UNISTD_MODULE_INDICATOR], 54AC_DEFUN([gl_UNISTD_MODULE_INDICATOR],
@@ -82,6 +86,7 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS],
82 GNULIB_GETPAGESIZE=0; AC_SUBST([GNULIB_GETPAGESIZE]) 86 GNULIB_GETPAGESIZE=0; AC_SUBST([GNULIB_GETPAGESIZE])
83 GNULIB_GETUSERSHELL=0; AC_SUBST([GNULIB_GETUSERSHELL]) 87 GNULIB_GETUSERSHELL=0; AC_SUBST([GNULIB_GETUSERSHELL])
84 GNULIB_GROUP_MEMBER=0; AC_SUBST([GNULIB_GROUP_MEMBER]) 88 GNULIB_GROUP_MEMBER=0; AC_SUBST([GNULIB_GROUP_MEMBER])
89 GNULIB_ISATTY=0; AC_SUBST([GNULIB_ISATTY])
85 GNULIB_LCHOWN=0; AC_SUBST([GNULIB_LCHOWN]) 90 GNULIB_LCHOWN=0; AC_SUBST([GNULIB_LCHOWN])
86 GNULIB_LINK=0; AC_SUBST([GNULIB_LINK]) 91 GNULIB_LINK=0; AC_SUBST([GNULIB_LINK])
87 GNULIB_LINKAT=0; AC_SUBST([GNULIB_LINKAT]) 92 GNULIB_LINKAT=0; AC_SUBST([GNULIB_LINKAT])
@@ -94,11 +99,11 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS],
94 GNULIB_READLINK=0; AC_SUBST([GNULIB_READLINK]) 99 GNULIB_READLINK=0; AC_SUBST([GNULIB_READLINK])
95 GNULIB_READLINKAT=0; AC_SUBST([GNULIB_READLINKAT]) 100 GNULIB_READLINKAT=0; AC_SUBST([GNULIB_READLINKAT])
96 GNULIB_RMDIR=0; AC_SUBST([GNULIB_RMDIR]) 101 GNULIB_RMDIR=0; AC_SUBST([GNULIB_RMDIR])
102 GNULIB_SETHOSTNAME=0; AC_SUBST([GNULIB_SETHOSTNAME])
97 GNULIB_SLEEP=0; AC_SUBST([GNULIB_SLEEP]) 103 GNULIB_SLEEP=0; AC_SUBST([GNULIB_SLEEP])
98 GNULIB_SYMLINK=0; AC_SUBST([GNULIB_SYMLINK]) 104 GNULIB_SYMLINK=0; AC_SUBST([GNULIB_SYMLINK])
99 GNULIB_SYMLINKAT=0; AC_SUBST([GNULIB_SYMLINKAT]) 105 GNULIB_SYMLINKAT=0; AC_SUBST([GNULIB_SYMLINKAT])
100 GNULIB_TTYNAME_R=0; AC_SUBST([GNULIB_TTYNAME_R]) 106 GNULIB_TTYNAME_R=0; AC_SUBST([GNULIB_TTYNAME_R])
101 GNULIB_UNISTD_H_GETOPT=0; AC_SUBST([GNULIB_UNISTD_H_GETOPT])
102 GNULIB_UNISTD_H_NONBLOCKING=0; AC_SUBST([GNULIB_UNISTD_H_NONBLOCKING]) 107 GNULIB_UNISTD_H_NONBLOCKING=0; AC_SUBST([GNULIB_UNISTD_H_NONBLOCKING])
103 GNULIB_UNISTD_H_SIGPIPE=0; AC_SUBST([GNULIB_UNISTD_H_SIGPIPE]) 108 GNULIB_UNISTD_H_SIGPIPE=0; AC_SUBST([GNULIB_UNISTD_H_SIGPIPE])
104 GNULIB_UNLINK=0; AC_SUBST([GNULIB_UNLINK]) 109 GNULIB_UNLINK=0; AC_SUBST([GNULIB_UNLINK])
@@ -131,6 +136,7 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS],
131 HAVE_PWRITE=1; AC_SUBST([HAVE_PWRITE]) 136 HAVE_PWRITE=1; AC_SUBST([HAVE_PWRITE])
132 HAVE_READLINK=1; AC_SUBST([HAVE_READLINK]) 137 HAVE_READLINK=1; AC_SUBST([HAVE_READLINK])
133 HAVE_READLINKAT=1; AC_SUBST([HAVE_READLINKAT]) 138 HAVE_READLINKAT=1; AC_SUBST([HAVE_READLINKAT])
139 HAVE_SETHOSTNAME=1; AC_SUBST([HAVE_SETHOSTNAME])
134 HAVE_SLEEP=1; AC_SUBST([HAVE_SLEEP]) 140 HAVE_SLEEP=1; AC_SUBST([HAVE_SLEEP])
135 HAVE_SYMLINK=1; AC_SUBST([HAVE_SYMLINK]) 141 HAVE_SYMLINK=1; AC_SUBST([HAVE_SYMLINK])
136 HAVE_SYMLINKAT=1; AC_SUBST([HAVE_SYMLINKAT]) 142 HAVE_SYMLINKAT=1; AC_SUBST([HAVE_SYMLINKAT])
@@ -143,6 +149,7 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS],
143 HAVE_DECL_GETLOGIN_R=1; AC_SUBST([HAVE_DECL_GETLOGIN_R]) 149 HAVE_DECL_GETLOGIN_R=1; AC_SUBST([HAVE_DECL_GETLOGIN_R])
144 HAVE_DECL_GETPAGESIZE=1; AC_SUBST([HAVE_DECL_GETPAGESIZE]) 150 HAVE_DECL_GETPAGESIZE=1; AC_SUBST([HAVE_DECL_GETPAGESIZE])
145 HAVE_DECL_GETUSERSHELL=1; AC_SUBST([HAVE_DECL_GETUSERSHELL]) 151 HAVE_DECL_GETUSERSHELL=1; AC_SUBST([HAVE_DECL_GETUSERSHELL])
152 HAVE_DECL_SETHOSTNAME=1; AC_SUBST([HAVE_DECL_SETHOSTNAME])
146 HAVE_DECL_TTYNAME_R=1; AC_SUBST([HAVE_DECL_TTYNAME_R]) 153 HAVE_DECL_TTYNAME_R=1; AC_SUBST([HAVE_DECL_TTYNAME_R])
147 HAVE_OS_H=0; AC_SUBST([HAVE_OS_H]) 154 HAVE_OS_H=0; AC_SUBST([HAVE_OS_H])
148 HAVE_SYS_PARAM_H=0; AC_SUBST([HAVE_SYS_PARAM_H]) 155 HAVE_SYS_PARAM_H=0; AC_SUBST([HAVE_SYS_PARAM_H])
@@ -151,11 +158,13 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS],
151 REPLACE_DUP=0; AC_SUBST([REPLACE_DUP]) 158 REPLACE_DUP=0; AC_SUBST([REPLACE_DUP])
152 REPLACE_DUP2=0; AC_SUBST([REPLACE_DUP2]) 159 REPLACE_DUP2=0; AC_SUBST([REPLACE_DUP2])
153 REPLACE_FCHOWNAT=0; AC_SUBST([REPLACE_FCHOWNAT]) 160 REPLACE_FCHOWNAT=0; AC_SUBST([REPLACE_FCHOWNAT])
161 REPLACE_FTRUNCATE=0; AC_SUBST([REPLACE_FTRUNCATE])
154 REPLACE_GETCWD=0; AC_SUBST([REPLACE_GETCWD]) 162 REPLACE_GETCWD=0; AC_SUBST([REPLACE_GETCWD])
155 REPLACE_GETDOMAINNAME=0; AC_SUBST([REPLACE_GETDOMAINNAME]) 163 REPLACE_GETDOMAINNAME=0; AC_SUBST([REPLACE_GETDOMAINNAME])
156 REPLACE_GETLOGIN_R=0; AC_SUBST([REPLACE_GETLOGIN_R]) 164 REPLACE_GETLOGIN_R=0; AC_SUBST([REPLACE_GETLOGIN_R])
157 REPLACE_GETGROUPS=0; AC_SUBST([REPLACE_GETGROUPS]) 165 REPLACE_GETGROUPS=0; AC_SUBST([REPLACE_GETGROUPS])
158 REPLACE_GETPAGESIZE=0; AC_SUBST([REPLACE_GETPAGESIZE]) 166 REPLACE_GETPAGESIZE=0; AC_SUBST([REPLACE_GETPAGESIZE])
167 REPLACE_ISATTY=0; AC_SUBST([REPLACE_ISATTY])
159 REPLACE_LCHOWN=0; AC_SUBST([REPLACE_LCHOWN]) 168 REPLACE_LCHOWN=0; AC_SUBST([REPLACE_LCHOWN])
160 REPLACE_LINK=0; AC_SUBST([REPLACE_LINK]) 169 REPLACE_LINK=0; AC_SUBST([REPLACE_LINK])
161 REPLACE_LINKAT=0; AC_SUBST([REPLACE_LINKAT]) 170 REPLACE_LINKAT=0; AC_SUBST([REPLACE_LINKAT])
diff --git a/m4/warnings.m4 b/m4/warnings.m4
index c14c4801e78..28b8294ef04 100644
--- a/m4/warnings.m4
+++ b/m4/warnings.m4
@@ -1,4 +1,4 @@
1# warnings.m4 serial 6 1# warnings.m4 serial 7
2dnl Copyright (C) 2008-2012 Free Software Foundation, Inc. 2dnl Copyright (C) 2008-2012 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,
@@ -15,28 +15,47 @@ m4_ifdef([AS_VAR_APPEND],
15[AS_VAR_SET([$1], [AS_VAR_GET([$1])$2])])]) 15[AS_VAR_SET([$1], [AS_VAR_GET([$1])$2])])])
16 16
17 17
18# gl_WARN_ADD(PARAMETER, [VARIABLE = WARN_CFLAGS]) 18# gl_COMPILER_OPTION_IF(OPTION, [IF-SUPPORTED], [IF-NOT-SUPPORTED],
19# ------------------------------------------------ 19# [PROGRAM = AC_LANG_PROGRAM()])
20# Adds parameter to WARN_CFLAGS if the compiler supports it. For example, 20# -----------------------------------------------------------------
21# gl_WARN_ADD([-Wparentheses]). 21# Check if the compiler supports OPTION when compiling PROGRAM.
22# 22#
23# If VARIABLE is a variable name, AC_SUBST it. 23# FIXME: gl_Warn must be used unquoted until we can assume Autoconf
24AC_DEFUN([gl_WARN_ADD], 24# 2.64 or newer.
25dnl FIXME: gl_Warn must be used unquoted until we can assume 25AC_DEFUN([gl_COMPILER_OPTION_IF],
26dnl autoconf 2.64 or newer.
27[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
28AS_VAR_PUSHDEF([gl_Flags], [_AC_LANG_PREFIX[]FLAGS])dnl 27AS_VAR_PUSHDEF([gl_Flags], [_AC_LANG_PREFIX[]FLAGS])dnl
29AC_CACHE_CHECK([whether _AC_LANG compiler handles $1], m4_defn([gl_Warn]), [ 28AC_CACHE_CHECK([whether _AC_LANG compiler handles $1], m4_defn([gl_Warn]), [
30 gl_save_compiler_FLAGS="$gl_Flags" 29 gl_save_compiler_FLAGS="$gl_Flags"
31 gl_Flags="$gl_Flags $1" 30 gl_AS_VAR_APPEND(m4_defn([gl_Flags]), [" $1"])
32 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])], 31 AC_COMPILE_IFELSE([m4_default([$4], [AC_LANG_PROGRAM([])])],
33 [AS_VAR_SET(gl_Warn, [yes])], 32 [AS_VAR_SET(gl_Warn, [yes])],
34 [AS_VAR_SET(gl_Warn, [no])]) 33 [AS_VAR_SET(gl_Warn, [no])])
35 gl_Flags="$gl_save_compiler_FLAGS" 34 gl_Flags="$gl_save_compiler_FLAGS"
36]) 35])
37AS_VAR_IF(gl_Warn, [yes], 36AS_VAR_IF(gl_Warn, [yes], [$2], [$3])
38 [gl_AS_VAR_APPEND(m4_if([$2], [], [[WARN_CFLAGS]], [[$2]]), [" $1"])])
39AS_VAR_POPDEF([gl_Flags])dnl 37AS_VAR_POPDEF([gl_Flags])dnl
40AS_VAR_POPDEF([gl_Warn])dnl 38AS_VAR_POPDEF([gl_Warn])dnl
41m4_ifval([$2], [AS_LITERAL_IF([$2], [AC_SUBST([$2])], [])])dnl
42]) 39])
40
41
42# gl_WARN_ADD(OPTION, [VARIABLE = WARN_CFLAGS],
43# [PROGRAM = AC_LANG_PROGRAM()])
44# ---------------------------------------------
45# Adds parameter to WARN_CFLAGS if the compiler supports it when
46# compiling PROGRAM. For example, gl_WARN_ADD([-Wparentheses]).
47#
48# If VARIABLE is a variable name, AC_SUBST it.
49AC_DEFUN([gl_WARN_ADD],
50[gl_COMPILER_OPTION_IF([$1],
51 [gl_AS_VAR_APPEND(m4_if([$2], [], [[WARN_CFLAGS]], [[$2]]), [" $1"])],
52 [],
53 [$3])
54m4_ifval([$2],
55 [AS_LITERAL_IF([$2], [AC_SUBST([$2])])],
56 [AC_SUBST([WARN_CFLAGS])])dnl
57])
58
59# Local Variables:
60# mode: autoconf
61# End:
diff --git a/m4/wchar_t.m4 b/m4/wchar_t.m4
index d2c03c42d2b..534735d8c63 100644
--- a/m4/wchar_t.m4
+++ b/m4/wchar_t.m4
@@ -1,5 +1,5 @@
1# wchar_t.m4 serial 4 (gettext-0.18.2) 1# wchar_t.m4 serial 4 (gettext-0.18.2)
2dnl Copyright (C) 2002-2003, 2008-2011 Free Software Foundation, Inc. 2dnl Copyright (C) 2002-2003, 2008-2012 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,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.