summaryrefslogtreecommitdiffstats
path: root/gl/m4/unistd_h.m4
diff options
context:
space:
mode:
authorThomas Guyot-Sionnest <dermoth@aei.ca>2010-04-07 21:11:46 -0400
committerThomas Guyot-Sionnest <dermoth@aei.ca>2010-04-12 21:26:35 -0400
commit74da141e618ef99959d509cb2e7be35a348a39db (patch)
tree88ebc38b381a1021fc2d74864a71e230ae591c3d /gl/m4/unistd_h.m4
parentc63a4f726a0b6ad8cf6040f947754a81fd4683bb (diff)
downloadmonitoring-plugins-74da141e618ef99959d509cb2e7be35a348a39db.tar.gz
Sync with the latest Gnulib code (177f525)
Signed-off-by: Thomas Guyot-Sionnest <dermoth@aei.ca>
Diffstat (limited to 'gl/m4/unistd_h.m4')
-rw-r--r--gl/m4/unistd_h.m481
1 files changed, 76 insertions, 5 deletions
diff --git a/gl/m4/unistd_h.m4 b/gl/m4/unistd_h.m4
index ff9a4ea0..8c2eec64 100644
--- a/gl/m4/unistd_h.m4
+++ b/gl/m4/unistd_h.m4
@@ -1,5 +1,5 @@
1# unistd_h.m4 serial 17 1# unistd_h.m4 serial 45
2dnl Copyright (C) 2006-2009 Free Software Foundation, Inc. 2dnl Copyright (C) 2006-2010 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.
@@ -11,6 +11,7 @@ AC_DEFUN([gl_UNISTD_H],
11 dnl Use AC_REQUIRE here, so that the default behavior below is expanded 11 dnl Use AC_REQUIRE here, so that the default behavior below is expanded
12 dnl once only, before all statements that occur in other macros. 12 dnl once only, before all statements that occur in other macros.
13 AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) 13 AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
14 AC_REQUIRE([AC_C_INLINE])
14 15
15 gl_CHECK_NEXT_HEADERS([unistd.h]) 16 gl_CHECK_NEXT_HEADERS([unistd.h])
16 17
@@ -21,13 +22,33 @@ AC_DEFUN([gl_UNISTD_H],
21 HAVE_UNISTD_H=0 22 HAVE_UNISTD_H=0
22 fi 23 fi
23 AC_SUBST([HAVE_UNISTD_H]) 24 AC_SUBST([HAVE_UNISTD_H])
25
26 dnl Check for declarations of anything we want to poison if the
27 dnl corresponding gnulib module is not in use.
28 gl_WARN_ON_USE_PREPARE([[#include <unistd.h>
29/* Some systems declare various items in the wrong headers. */
30#ifndef __GLIBC__
31# include <fcntl.h>
32# include <stdio.h>
33# include <stdlib.h>
34# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
35# include <io.h>
36# endif
37#endif
38 ]], [chown dup2 dup3 environ euidaccess faccessat fchdir fchownat
39 fsync ftruncate getcwd getdomainname getdtablesize getgroups
40 gethostname getlogin getlogin_r getpagesize getusershell setusershell
41 endusershell lchown link linkat lseek pipe2 pread readlink readlinkat
42 rmdir sleep symlink symlinkat ttyname_r unlink unlinkat usleep])
24]) 43])
25 44
26AC_DEFUN([gl_UNISTD_MODULE_INDICATOR], 45AC_DEFUN([gl_UNISTD_MODULE_INDICATOR],
27[ 46[
28 dnl Use AC_REQUIRE here, so that the default settings are expanded once only. 47 dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
29 AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) 48 AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
30 GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1 49 gl_MODULE_INDICATOR_SET_VARIABLE([$1])
50 dnl Define it also as a C macro, for the benefit of the unit tests.
51 gl_MODULE_INDICATOR_FOR_TESTS([$1])
31]) 52])
32 53
33AC_DEFUN([gl_UNISTD_H_DEFAULTS], 54AC_DEFUN([gl_UNISTD_H_DEFAULTS],
@@ -35,49 +56,99 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS],
35 GNULIB_CHOWN=0; AC_SUBST([GNULIB_CHOWN]) 56 GNULIB_CHOWN=0; AC_SUBST([GNULIB_CHOWN])
36 GNULIB_CLOSE=0; AC_SUBST([GNULIB_CLOSE]) 57 GNULIB_CLOSE=0; AC_SUBST([GNULIB_CLOSE])
37 GNULIB_DUP2=0; AC_SUBST([GNULIB_DUP2]) 58 GNULIB_DUP2=0; AC_SUBST([GNULIB_DUP2])
59 GNULIB_DUP3=0; AC_SUBST([GNULIB_DUP3])
38 GNULIB_ENVIRON=0; AC_SUBST([GNULIB_ENVIRON]) 60 GNULIB_ENVIRON=0; AC_SUBST([GNULIB_ENVIRON])
39 GNULIB_EUIDACCESS=0; AC_SUBST([GNULIB_EUIDACCESS]) 61 GNULIB_EUIDACCESS=0; AC_SUBST([GNULIB_EUIDACCESS])
62 GNULIB_FACCESSAT=0; AC_SUBST([GNULIB_FACCESSAT])
40 GNULIB_FCHDIR=0; AC_SUBST([GNULIB_FCHDIR]) 63 GNULIB_FCHDIR=0; AC_SUBST([GNULIB_FCHDIR])
64 GNULIB_FCHOWNAT=0; AC_SUBST([GNULIB_FCHOWNAT])
41 GNULIB_FSYNC=0; AC_SUBST([GNULIB_FSYNC]) 65 GNULIB_FSYNC=0; AC_SUBST([GNULIB_FSYNC])
42 GNULIB_FTRUNCATE=0; AC_SUBST([GNULIB_FTRUNCATE]) 66 GNULIB_FTRUNCATE=0; AC_SUBST([GNULIB_FTRUNCATE])
43 GNULIB_GETCWD=0; AC_SUBST([GNULIB_GETCWD]) 67 GNULIB_GETCWD=0; AC_SUBST([GNULIB_GETCWD])
44 GNULIB_GETDOMAINNAME=0; AC_SUBST([GNULIB_GETDOMAINNAME]) 68 GNULIB_GETDOMAINNAME=0; AC_SUBST([GNULIB_GETDOMAINNAME])
45 GNULIB_GETDTABLESIZE=0; AC_SUBST([GNULIB_GETDTABLESIZE]) 69 GNULIB_GETDTABLESIZE=0; AC_SUBST([GNULIB_GETDTABLESIZE])
70 GNULIB_GETGROUPS=0; AC_SUBST([GNULIB_GETGROUPS])
46 GNULIB_GETHOSTNAME=0; AC_SUBST([GNULIB_GETHOSTNAME]) 71 GNULIB_GETHOSTNAME=0; AC_SUBST([GNULIB_GETHOSTNAME])
72 GNULIB_GETLOGIN=0; AC_SUBST([GNULIB_GETLOGIN])
47 GNULIB_GETLOGIN_R=0; AC_SUBST([GNULIB_GETLOGIN_R]) 73 GNULIB_GETLOGIN_R=0; AC_SUBST([GNULIB_GETLOGIN_R])
48 GNULIB_GETPAGESIZE=0; AC_SUBST([GNULIB_GETPAGESIZE]) 74 GNULIB_GETPAGESIZE=0; AC_SUBST([GNULIB_GETPAGESIZE])
49 GNULIB_GETUSERSHELL=0; AC_SUBST([GNULIB_GETUSERSHELL]) 75 GNULIB_GETUSERSHELL=0; AC_SUBST([GNULIB_GETUSERSHELL])
50 GNULIB_LCHOWN=0; AC_SUBST([GNULIB_LCHOWN]) 76 GNULIB_LCHOWN=0; AC_SUBST([GNULIB_LCHOWN])
51 GNULIB_LINK=0; AC_SUBST([GNULIB_LINK]) 77 GNULIB_LINK=0; AC_SUBST([GNULIB_LINK])
78 GNULIB_LINKAT=0; AC_SUBST([GNULIB_LINKAT])
52 GNULIB_LSEEK=0; AC_SUBST([GNULIB_LSEEK]) 79 GNULIB_LSEEK=0; AC_SUBST([GNULIB_LSEEK])
80 GNULIB_PIPE2=0; AC_SUBST([GNULIB_PIPE2])
81 GNULIB_PREAD=0; AC_SUBST([GNULIB_PREAD])
53 GNULIB_READLINK=0; AC_SUBST([GNULIB_READLINK]) 82 GNULIB_READLINK=0; AC_SUBST([GNULIB_READLINK])
83 GNULIB_READLINKAT=0; AC_SUBST([GNULIB_READLINKAT])
84 GNULIB_RMDIR=0; AC_SUBST([GNULIB_RMDIR])
54 GNULIB_SLEEP=0; AC_SUBST([GNULIB_SLEEP]) 85 GNULIB_SLEEP=0; AC_SUBST([GNULIB_SLEEP])
86 GNULIB_SYMLINK=0; AC_SUBST([GNULIB_SYMLINK])
87 GNULIB_SYMLINKAT=0; AC_SUBST([GNULIB_SYMLINKAT])
88 GNULIB_TTYNAME_R=0; AC_SUBST([GNULIB_TTYNAME_R])
89 GNULIB_UNISTD_H_GETOPT=0; AC_SUBST([GNULIB_UNISTD_H_GETOPT])
55 GNULIB_UNISTD_H_SIGPIPE=0; AC_SUBST([GNULIB_UNISTD_H_SIGPIPE]) 90 GNULIB_UNISTD_H_SIGPIPE=0; AC_SUBST([GNULIB_UNISTD_H_SIGPIPE])
91 GNULIB_UNLINK=0; AC_SUBST([GNULIB_UNLINK])
92 GNULIB_UNLINKAT=0; AC_SUBST([GNULIB_UNLINKAT])
93 GNULIB_USLEEP=0; AC_SUBST([GNULIB_USLEEP])
56 GNULIB_WRITE=0; AC_SUBST([GNULIB_WRITE]) 94 GNULIB_WRITE=0; AC_SUBST([GNULIB_WRITE])
57 dnl Assume proper GNU behavior unless another module says otherwise. 95 dnl Assume proper GNU behavior unless another module says otherwise.
96 HAVE_CHOWN=1; AC_SUBST([HAVE_CHOWN])
58 HAVE_DUP2=1; AC_SUBST([HAVE_DUP2]) 97 HAVE_DUP2=1; AC_SUBST([HAVE_DUP2])
98 HAVE_DUP3=1; AC_SUBST([HAVE_DUP3])
59 HAVE_EUIDACCESS=1; AC_SUBST([HAVE_EUIDACCESS]) 99 HAVE_EUIDACCESS=1; AC_SUBST([HAVE_EUIDACCESS])
100 HAVE_FACCESSAT=1; AC_SUBST([HAVE_FACCESSAT])
101 HAVE_FCHDIR=1; AC_SUBST([HAVE_FCHDIR])
102 HAVE_FCHOWNAT=1; AC_SUBST([HAVE_FCHOWNAT])
60 HAVE_FSYNC=1; AC_SUBST([HAVE_FSYNC]) 103 HAVE_FSYNC=1; AC_SUBST([HAVE_FSYNC])
61 HAVE_FTRUNCATE=1; AC_SUBST([HAVE_FTRUNCATE]) 104 HAVE_FTRUNCATE=1; AC_SUBST([HAVE_FTRUNCATE])
62 HAVE_GETDOMAINNAME=1; AC_SUBST([HAVE_GETDOMAINNAME]) 105 HAVE_GETDOMAINNAME=1; AC_SUBST([HAVE_GETDOMAINNAME])
63 HAVE_GETDTABLESIZE=1; AC_SUBST([HAVE_GETDTABLESIZE]) 106 HAVE_GETDTABLESIZE=1; AC_SUBST([HAVE_GETDTABLESIZE])
107 HAVE_GETGROUPS=1; AC_SUBST([HAVE_GETGROUPS])
64 HAVE_GETHOSTNAME=1; AC_SUBST([HAVE_GETHOSTNAME]) 108 HAVE_GETHOSTNAME=1; AC_SUBST([HAVE_GETHOSTNAME])
109 HAVE_GETLOGIN=1; AC_SUBST([HAVE_GETLOGIN])
65 HAVE_GETPAGESIZE=1; AC_SUBST([HAVE_GETPAGESIZE]) 110 HAVE_GETPAGESIZE=1; AC_SUBST([HAVE_GETPAGESIZE])
66 HAVE_GETUSERSHELL=1; AC_SUBST([HAVE_GETUSERSHELL]) 111 HAVE_LCHOWN=1; AC_SUBST([HAVE_LCHOWN])
67 HAVE_LINK=1; AC_SUBST([HAVE_LINK]) 112 HAVE_LINK=1; AC_SUBST([HAVE_LINK])
113 HAVE_LINKAT=1; AC_SUBST([HAVE_LINKAT])
114 HAVE_PIPE2=1; AC_SUBST([HAVE_PIPE2])
115 HAVE_PREAD=1; AC_SUBST([HAVE_PREAD])
68 HAVE_READLINK=1; AC_SUBST([HAVE_READLINK]) 116 HAVE_READLINK=1; AC_SUBST([HAVE_READLINK])
117 HAVE_READLINKAT=1; AC_SUBST([HAVE_READLINKAT])
69 HAVE_SLEEP=1; AC_SUBST([HAVE_SLEEP]) 118 HAVE_SLEEP=1; AC_SUBST([HAVE_SLEEP])
119 HAVE_SYMLINK=1; AC_SUBST([HAVE_SYMLINK])
120 HAVE_SYMLINKAT=1; AC_SUBST([HAVE_SYMLINKAT])
121 HAVE_TTYNAME_R=1; AC_SUBST([HAVE_TTYNAME_R])
122 HAVE_UNLINKAT=1; AC_SUBST([HAVE_UNLINKAT])
123 HAVE_USLEEP=1; AC_SUBST([HAVE_USLEEP])
70 HAVE_DECL_ENVIRON=1; AC_SUBST([HAVE_DECL_ENVIRON]) 124 HAVE_DECL_ENVIRON=1; AC_SUBST([HAVE_DECL_ENVIRON])
71 HAVE_DECL_GETLOGIN_R=1; AC_SUBST([HAVE_DECL_GETLOGIN_R]) 125 HAVE_DECL_GETLOGIN_R=1; AC_SUBST([HAVE_DECL_GETLOGIN_R])
126 HAVE_DECL_GETPAGESIZE=1; AC_SUBST([HAVE_DECL_GETPAGESIZE])
127 HAVE_DECL_GETUSERSHELL=1; AC_SUBST([HAVE_DECL_GETUSERSHELL])
72 HAVE_OS_H=0; AC_SUBST([HAVE_OS_H]) 128 HAVE_OS_H=0; AC_SUBST([HAVE_OS_H])
73 HAVE_SYS_PARAM_H=0; AC_SUBST([HAVE_SYS_PARAM_H]) 129 HAVE_SYS_PARAM_H=0; AC_SUBST([HAVE_SYS_PARAM_H])
74 REPLACE_CHOWN=0; AC_SUBST([REPLACE_CHOWN]) 130 REPLACE_CHOWN=0; AC_SUBST([REPLACE_CHOWN])
75 REPLACE_CLOSE=0; AC_SUBST([REPLACE_CLOSE]) 131 REPLACE_CLOSE=0; AC_SUBST([REPLACE_CLOSE])
76 REPLACE_FCHDIR=0; AC_SUBST([REPLACE_FCHDIR]) 132 REPLACE_DUP=0; AC_SUBST([REPLACE_DUP])
133 REPLACE_DUP2=0; AC_SUBST([REPLACE_DUP2])
134 REPLACE_FCHOWNAT=0; AC_SUBST([REPLACE_FCHOWNAT])
77 REPLACE_GETCWD=0; AC_SUBST([REPLACE_GETCWD]) 135 REPLACE_GETCWD=0; AC_SUBST([REPLACE_GETCWD])
136 REPLACE_GETGROUPS=0; AC_SUBST([REPLACE_GETGROUPS])
78 REPLACE_GETPAGESIZE=0; AC_SUBST([REPLACE_GETPAGESIZE]) 137 REPLACE_GETPAGESIZE=0; AC_SUBST([REPLACE_GETPAGESIZE])
79 REPLACE_LCHOWN=0; AC_SUBST([REPLACE_LCHOWN]) 138 REPLACE_LCHOWN=0; AC_SUBST([REPLACE_LCHOWN])
139 REPLACE_LINK=0; AC_SUBST([REPLACE_LINK])
140 REPLACE_LINKAT=0; AC_SUBST([REPLACE_LINKAT])
80 REPLACE_LSEEK=0; AC_SUBST([REPLACE_LSEEK]) 141 REPLACE_LSEEK=0; AC_SUBST([REPLACE_LSEEK])
142 REPLACE_PREAD=0; AC_SUBST([REPLACE_PREAD])
143 REPLACE_READLINK=0; AC_SUBST([REPLACE_READLINK])
144 REPLACE_RMDIR=0; AC_SUBST([REPLACE_RMDIR])
145 REPLACE_SLEEP=0; AC_SUBST([REPLACE_SLEEP])
146 REPLACE_SYMLINK=0; AC_SUBST([REPLACE_SYMLINK])
147 REPLACE_UNLINK=0; AC_SUBST([REPLACE_UNLINK])
148 REPLACE_UNLINKAT=0; AC_SUBST([REPLACE_UNLINKAT])
149 REPLACE_USLEEP=0; AC_SUBST([REPLACE_USLEEP])
81 REPLACE_WRITE=0; AC_SUBST([REPLACE_WRITE]) 150 REPLACE_WRITE=0; AC_SUBST([REPLACE_WRITE])
82 UNISTD_H_HAVE_WINSOCK2_H=0; AC_SUBST([UNISTD_H_HAVE_WINSOCK2_H]) 151 UNISTD_H_HAVE_WINSOCK2_H=0; AC_SUBST([UNISTD_H_HAVE_WINSOCK2_H])
152 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
153 AC_SUBST([UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS])
83]) 154])