1 /* Test of <unistd.h> substitute in C++ mode.
2 Copyright (C) 2010-2020 Free Software Foundation, Inc.
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.
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.
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/>. */
17 /* Written by Bruno Haible <bruno@clisp.org>, 2010. */
19 #define GNULIB_NAMESPACE gnulib
24 #include "signature.h"
27 #if GNULIB_TEST_ACCESS
28 SIGNATURE_CHECK (GNULIB_NAMESPACE::access
, int, (const char *, int));
32 SIGNATURE_CHECK (GNULIB_NAMESPACE::chdir
, int, (const char *));
36 SIGNATURE_CHECK (GNULIB_NAMESPACE::chown
, int, (const char *, uid_t
, gid_t
));
40 SIGNATURE_CHECK (GNULIB_NAMESPACE::close
, int, (int));
44 SIGNATURE_CHECK (GNULIB_NAMESPACE::dup
, int, (int));
48 SIGNATURE_CHECK (GNULIB_NAMESPACE::dup2
, int, (int, int));
52 SIGNATURE_CHECK (GNULIB_NAMESPACE::dup3
, int, (int, int, int));
55 #if GNULIB_TEST_EUIDACCESS
56 SIGNATURE_CHECK (GNULIB_NAMESPACE::euidaccess
, int, (const char *, int));
59 #if GNULIB_TEST_FACCESSAT
60 SIGNATURE_CHECK (GNULIB_NAMESPACE::faccessat
, int,
61 (int, char const *, int, int));
64 #if GNULIB_TEST_FCHDIR
65 SIGNATURE_CHECK (GNULIB_NAMESPACE::fchdir
, int, (int));
68 #if GNULIB_TEST_FCHOWNAT
69 SIGNATURE_CHECK (GNULIB_NAMESPACE::fchownat
, int,
70 (int, char const *, uid_t
, gid_t
, int));
73 #if GNULIB_TEST_FDATASYNC
74 SIGNATURE_CHECK (GNULIB_NAMESPACE::fdatasync
, int, (int));
78 SIGNATURE_CHECK (GNULIB_NAMESPACE::fsync
, int, (int));
81 #if GNULIB_TEST_FTRUNCATE
82 SIGNATURE_CHECK (GNULIB_NAMESPACE::ftruncate
, int, (int, off_t
));
85 #if GNULIB_TEST_GETCWD
86 SIGNATURE_CHECK (GNULIB_NAMESPACE::getcwd
, char *, (char *, size_t));
89 #if GNULIB_TEST_GETDOMAINNAME
90 SIGNATURE_CHECK (GNULIB_NAMESPACE::getdomainname
, int, (char *, size_t));
93 #if GNULIB_TEST_GETDTABLESIZE
94 SIGNATURE_CHECK (GNULIB_NAMESPACE::getdtablesize
, int, (void));
97 #if GNULIB_TEST_GETENTROPY
98 SIGNATURE_CHECK (GNULIB_NAMESPACE::getentropy
, int, (void *, size_t));
101 #if GNULIB_TEST_GETGROUPS
102 SIGNATURE_CHECK (GNULIB_NAMESPACE::getgroups
, int, (int, gid_t
*));
105 #if GNULIB_TEST_GETHOSTNAME
106 SIGNATURE_CHECK (GNULIB_NAMESPACE::gethostname
, int, (char *, size_t));
109 #if GNULIB_TEST_GETLOGIN
110 SIGNATURE_CHECK (GNULIB_NAMESPACE::getlogin
, char *, (void));
113 #if GNULIB_TEST_GETLOGIN_R
114 SIGNATURE_CHECK (GNULIB_NAMESPACE::getlogin_r
, int, (char *, size_t));
117 #if GNULIB_TEST_GETPAGESIZE
118 SIGNATURE_CHECK (GNULIB_NAMESPACE::getpagesize
, int, (void));
121 #if GNULIB_TEST_GETPASS
122 SIGNATURE_CHECK (GNULIB_NAMESPACE::getpass
, char *, (const char *));
125 #if GNULIB_TEST_GETUSERSHELL
126 SIGNATURE_CHECK (GNULIB_NAMESPACE::getusershell
, char *, (void));
129 #if GNULIB_TEST_GETUSERSHELL
130 SIGNATURE_CHECK (GNULIB_NAMESPACE::setusershell
, void, (void));
133 #if GNULIB_TEST_GETUSERSHELL
134 SIGNATURE_CHECK (GNULIB_NAMESPACE::endusershell
, void, (void));
137 #if GNULIB_TEST_GROUP_MEMBER
138 SIGNATURE_CHECK (GNULIB_NAMESPACE::group_member
, int, (gid_t
));
141 #if GNULIB_TEST_ISATTY
142 SIGNATURE_CHECK (GNULIB_NAMESPACE::isatty
, int, (int));
145 #if GNULIB_TEST_LCHOWN
146 SIGNATURE_CHECK (GNULIB_NAMESPACE::lchown
, int, (char const *, uid_t
, gid_t
));
150 SIGNATURE_CHECK (GNULIB_NAMESPACE::link
, int, (const char *, const char *));
153 #if GNULIB_TEST_LINKAT
154 SIGNATURE_CHECK (GNULIB_NAMESPACE::linkat
, int,
155 (int, const char *, int, const char *, int));
158 #if GNULIB_TEST_LSEEK
159 SIGNATURE_CHECK (GNULIB_NAMESPACE::lseek
, off_t
, (int, off_t
, int));
163 SIGNATURE_CHECK (GNULIB_NAMESPACE::pipe
, int, (int[2]));
166 #if GNULIB_TEST_PIPE2
167 SIGNATURE_CHECK (GNULIB_NAMESPACE::pipe2
, int, (int[2], int));
170 #if GNULIB_TEST_PREAD
171 SIGNATURE_CHECK (GNULIB_NAMESPACE::pread
, ssize_t
,
172 (int, void *, size_t, off_t
));
175 #if GNULIB_TEST_PWRITE
176 SIGNATURE_CHECK (GNULIB_NAMESPACE::pwrite
, ssize_t
,
177 (int, const void *, size_t, off_t
));
181 SIGNATURE_CHECK (GNULIB_NAMESPACE::read
, ssize_t
, (int, void *, size_t));
184 #if GNULIB_TEST_READLINK
185 SIGNATURE_CHECK (GNULIB_NAMESPACE::readlink
, ssize_t
,
186 (const char *, char *, size_t));
189 #if GNULIB_TEST_READLINKAT
190 SIGNATURE_CHECK (GNULIB_NAMESPACE::readlinkat
, ssize_t
,
191 (int, char const *, char *, size_t));
194 #if GNULIB_TEST_RMDIR
195 SIGNATURE_CHECK (GNULIB_NAMESPACE::rmdir
, int, (char const *));
198 #if GNULIB_TEST_SETHOSTNAME
199 SIGNATURE_CHECK (GNULIB_NAMESPACE::sethostname
, int, (const char *, size_t));
202 #if GNULIB_TEST_SLEEP
203 SIGNATURE_CHECK (GNULIB_NAMESPACE::sleep
, unsigned int, (unsigned int));
206 #if GNULIB_TEST_SYMLINK
207 SIGNATURE_CHECK (GNULIB_NAMESPACE::symlink
, int, (char const *, char const *));
210 #if GNULIB_TEST_SYMLINKAT
211 SIGNATURE_CHECK (GNULIB_NAMESPACE::symlinkat
, int,
212 (char const *, int, char const *));
215 #if GNULIB_TEST_TRUNCATE
216 SIGNATURE_CHECK (GNULIB_NAMESPACE::truncate
, int, (const char *, off_t
));
219 #if GNULIB_TEST_TTYNAME_R
220 SIGNATURE_CHECK (GNULIB_NAMESPACE::ttyname_r
, int,
221 (int fd
, char *buf
, size_t buflen
));
224 #if GNULIB_TEST_UNLINK
225 SIGNATURE_CHECK (GNULIB_NAMESPACE::unlink
, int, (char const *));
228 #if GNULIB_TEST_UNLINKAT
229 SIGNATURE_CHECK (GNULIB_NAMESPACE::unlinkat
, int, (int, char const *, int));
232 #if GNULIB_TEST_USLEEP
233 SIGNATURE_CHECK (GNULIB_NAMESPACE::usleep
, int, (useconds_t
));
236 #if GNULIB_TEST_WRITE
237 SIGNATURE_CHECK (GNULIB_NAMESPACE::write
, ssize_t
,
238 (int, const void *, size_t));