Bump to m4 1.4.19
[platform/upstream/m4.git] / tests / test-unistd-c++.cc
1 /* Test of <unistd.h> substitute in C++ mode.
2    Copyright (C) 2010-2021 Free Software Foundation, Inc.
3
4    This program is free software: you can redistribute it and/or modify
5    it under the terms of the GNU General Public License as published by
6    the Free Software Foundation; either version 3 of the License, or
7    (at your option) any later version.
8
9    This program is distributed in the hope that it will be useful,
10    but WITHOUT ANY WARRANTY; without even the implied warranty of
11    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12    GNU General Public License for more details.
13
14    You should have received a copy of the GNU General Public License
15    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
16
17 /* Written by Bruno Haible <bruno@clisp.org>, 2010.  */
18
19 #define GNULIB_NAMESPACE gnulib
20 #include <config.h>
21
22 #include <unistd.h>
23
24 #include "signature.h"
25
26
27 #if GNULIB_TEST_ACCESS
28 SIGNATURE_CHECK (GNULIB_NAMESPACE::access, int, (const char *, int));
29 #endif
30
31 #if GNULIB_TEST_CHDIR
32 SIGNATURE_CHECK (GNULIB_NAMESPACE::chdir, int, (const char *));
33 #endif
34
35 #if GNULIB_TEST_CHOWN
36 SIGNATURE_CHECK (GNULIB_NAMESPACE::chown, int, (const char *, uid_t, gid_t));
37 #endif
38
39 #if GNULIB_TEST_CLOSE
40 SIGNATURE_CHECK (GNULIB_NAMESPACE::close, int, (int));
41 #endif
42
43 #if GNULIB_TEST_DUP
44 SIGNATURE_CHECK (GNULIB_NAMESPACE::dup, int, (int));
45 #endif
46
47 #if GNULIB_TEST_DUP2
48 SIGNATURE_CHECK (GNULIB_NAMESPACE::dup2, int, (int, int));
49 #endif
50
51 #if GNULIB_TEST_DUP3
52 SIGNATURE_CHECK (GNULIB_NAMESPACE::dup3, int, (int, int, int));
53 #endif
54
55 #if GNULIB_TEST_EXECL
56 SIGNATURE_CHECK (GNULIB_NAMESPACE::execl, int,
57                  (const char *, const char *, ...));
58 #endif
59
60 #if GNULIB_TEST_EXECLE
61 SIGNATURE_CHECK (GNULIB_NAMESPACE::execle, int,
62                  (const char *, const char *, ...));
63 #endif
64
65 #if GNULIB_TEST_EXECLP
66 SIGNATURE_CHECK (GNULIB_NAMESPACE::execlp, int,
67                  (const char *, const char *, ...));
68 #endif
69
70 #if GNULIB_TEST_EXECV
71 SIGNATURE_CHECK (GNULIB_NAMESPACE::execv, int,
72                  (const char *, char * const *));
73 #endif
74
75 #if GNULIB_TEST_EXECVE
76 SIGNATURE_CHECK (GNULIB_NAMESPACE::execve, int,
77                  (const char *, char * const *, char * const *));
78 #endif
79
80 #if GNULIB_TEST_EXECVP
81 SIGNATURE_CHECK (GNULIB_NAMESPACE::execvp, int,
82                  (const char *, char * const *));
83 #endif
84
85 #if GNULIB_TEST_EXECVPE
86 SIGNATURE_CHECK (GNULIB_NAMESPACE::execvpe, int,
87                  (const char *, char * const *, char * const *));
88 #endif
89
90 #if GNULIB_TEST_EUIDACCESS
91 SIGNATURE_CHECK (GNULIB_NAMESPACE::euidaccess, int, (const char *, int));
92 #endif
93
94 #if GNULIB_TEST_FACCESSAT
95 SIGNATURE_CHECK (GNULIB_NAMESPACE::faccessat, int,
96                  (int, char const *, int, int));
97 #endif
98
99 #if GNULIB_TEST_FCHDIR
100 SIGNATURE_CHECK (GNULIB_NAMESPACE::fchdir, int, (int));
101 #endif
102
103 #if GNULIB_TEST_FCHOWNAT
104 SIGNATURE_CHECK (GNULIB_NAMESPACE::fchownat, int,
105                  (int, char const *, uid_t, gid_t, int));
106 #endif
107
108 #if GNULIB_TEST_FDATASYNC
109 SIGNATURE_CHECK (GNULIB_NAMESPACE::fdatasync, int, (int));
110 #endif
111
112 #if GNULIB_TEST_FSYNC
113 SIGNATURE_CHECK (GNULIB_NAMESPACE::fsync, int, (int));
114 #endif
115
116 #if GNULIB_TEST_FTRUNCATE
117 SIGNATURE_CHECK (GNULIB_NAMESPACE::ftruncate, int, (int, off_t));
118 #endif
119
120 #if GNULIB_TEST_GETCWD
121 SIGNATURE_CHECK (GNULIB_NAMESPACE::getcwd, char *, (char *, size_t));
122 #endif
123
124 #if GNULIB_TEST_GETDOMAINNAME
125 SIGNATURE_CHECK (GNULIB_NAMESPACE::getdomainname, int, (char *, size_t));
126 #endif
127
128 #if GNULIB_TEST_GETDTABLESIZE
129 SIGNATURE_CHECK (GNULIB_NAMESPACE::getdtablesize, int, (void));
130 #endif
131
132 #if GNULIB_TEST_GETENTROPY
133 SIGNATURE_CHECK (GNULIB_NAMESPACE::getentropy, int, (void *, size_t));
134 #endif
135
136 #if GNULIB_TEST_GETGROUPS
137 SIGNATURE_CHECK (GNULIB_NAMESPACE::getgroups, int, (int, gid_t *));
138 #endif
139
140 #if GNULIB_TEST_GETHOSTNAME
141 SIGNATURE_CHECK (GNULIB_NAMESPACE::gethostname, int, (char *, size_t));
142 #endif
143
144 #if GNULIB_TEST_GETLOGIN
145 SIGNATURE_CHECK (GNULIB_NAMESPACE::getlogin, char *, (void));
146 #endif
147
148 #if GNULIB_TEST_GETLOGIN_R
149 SIGNATURE_CHECK (GNULIB_NAMESPACE::getlogin_r, int, (char *, size_t));
150 #endif
151
152 #if GNULIB_TEST_GETPAGESIZE
153 SIGNATURE_CHECK (GNULIB_NAMESPACE::getpagesize, int, (void));
154 #endif
155
156 #if GNULIB_TEST_GETPASS
157 SIGNATURE_CHECK (GNULIB_NAMESPACE::getpass, char *, (const char *));
158 #endif
159
160 #if GNULIB_TEST_GETUSERSHELL
161 SIGNATURE_CHECK (GNULIB_NAMESPACE::getusershell, char *, (void));
162 #endif
163
164 #if GNULIB_TEST_GETUSERSHELL
165 SIGNATURE_CHECK (GNULIB_NAMESPACE::setusershell, void, (void));
166 #endif
167
168 #if GNULIB_TEST_GETUSERSHELL
169 SIGNATURE_CHECK (GNULIB_NAMESPACE::endusershell, void, (void));
170 #endif
171
172 #if GNULIB_TEST_GROUP_MEMBER
173 SIGNATURE_CHECK (GNULIB_NAMESPACE::group_member, int, (gid_t));
174 #endif
175
176 #if GNULIB_TEST_ISATTY
177 SIGNATURE_CHECK (GNULIB_NAMESPACE::isatty, int, (int));
178 #endif
179
180 #if GNULIB_TEST_LCHOWN
181 SIGNATURE_CHECK (GNULIB_NAMESPACE::lchown, int, (char const *, uid_t, gid_t));
182 #endif
183
184 #if GNULIB_TEST_LINK
185 SIGNATURE_CHECK (GNULIB_NAMESPACE::link, int, (const char *, const char *));
186 #endif
187
188 #if GNULIB_TEST_LINKAT
189 SIGNATURE_CHECK (GNULIB_NAMESPACE::linkat, int,
190                  (int, const char *, int, const char *, int));
191 #endif
192
193 #if GNULIB_TEST_LSEEK
194 SIGNATURE_CHECK (GNULIB_NAMESPACE::lseek, off_t, (int, off_t, int));
195 #endif
196
197 #if GNULIB_TEST_PIPE
198 SIGNATURE_CHECK (GNULIB_NAMESPACE::pipe, int, (int[2]));
199 #endif
200
201 #if GNULIB_TEST_PIPE2
202 SIGNATURE_CHECK (GNULIB_NAMESPACE::pipe2, int, (int[2], int));
203 #endif
204
205 #if GNULIB_TEST_PREAD
206 SIGNATURE_CHECK (GNULIB_NAMESPACE::pread, ssize_t,
207                  (int, void *, size_t, off_t));
208 #endif
209
210 #if GNULIB_TEST_PWRITE
211 SIGNATURE_CHECK (GNULIB_NAMESPACE::pwrite, ssize_t,
212                  (int, const void *, size_t, off_t));
213 #endif
214
215 #if GNULIB_TEST_READ
216 SIGNATURE_CHECK (GNULIB_NAMESPACE::read, ssize_t, (int, void *, size_t));
217 #endif
218
219 #if GNULIB_TEST_READLINK
220 SIGNATURE_CHECK (GNULIB_NAMESPACE::readlink, ssize_t,
221                  (const char *, char *, size_t));
222 #endif
223
224 #if GNULIB_TEST_READLINKAT
225 SIGNATURE_CHECK (GNULIB_NAMESPACE::readlinkat, ssize_t,
226                  (int, char const *, char *, size_t));
227 #endif
228
229 #if GNULIB_TEST_RMDIR
230 SIGNATURE_CHECK (GNULIB_NAMESPACE::rmdir, int, (char const *));
231 #endif
232
233 #if GNULIB_TEST_SETHOSTNAME
234 SIGNATURE_CHECK (GNULIB_NAMESPACE::sethostname, int, (const char *, size_t));
235 #endif
236
237 #if GNULIB_TEST_SLEEP
238 SIGNATURE_CHECK (GNULIB_NAMESPACE::sleep, unsigned int, (unsigned int));
239 #endif
240
241 #if GNULIB_TEST_SYMLINK
242 SIGNATURE_CHECK (GNULIB_NAMESPACE::symlink, int, (char const *, char const *));
243 #endif
244
245 #if GNULIB_TEST_SYMLINKAT
246 SIGNATURE_CHECK (GNULIB_NAMESPACE::symlinkat, int,
247                  (char const *, int, char const *));
248 #endif
249
250 #if GNULIB_TEST_TRUNCATE
251 SIGNATURE_CHECK (GNULIB_NAMESPACE::truncate, int, (const char *, off_t));
252 #endif
253
254 #if GNULIB_TEST_TTYNAME_R
255 SIGNATURE_CHECK (GNULIB_NAMESPACE::ttyname_r, int,
256                  (int fd, char *buf, size_t buflen));
257 #endif
258
259 #if GNULIB_TEST_UNLINK
260 SIGNATURE_CHECK (GNULIB_NAMESPACE::unlink, int, (char const *));
261 #endif
262
263 #if GNULIB_TEST_UNLINKAT
264 SIGNATURE_CHECK (GNULIB_NAMESPACE::unlinkat, int, (int, char const *, int));
265 #endif
266
267 #if GNULIB_TEST_USLEEP
268 SIGNATURE_CHECK (GNULIB_NAMESPACE::usleep, int, (useconds_t));
269 #endif
270
271 #if GNULIB_TEST_WRITE
272 SIGNATURE_CHECK (GNULIB_NAMESPACE::write, ssize_t,
273                  (int, const void *, size_t));
274 #endif
275
276
277 int
278 main ()
279 {
280 }