Tests of module 'unistd' in C++ mode.
[gnulib.git] / tests / test-unistd-c++.cc
1 /* Test of <unistd.h> substitute in C++ mode.
2    Copyright (C) 2010 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 <http://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_CHOWN
28 SIGNATURE_CHECK (GNULIB_NAMESPACE::chown, int, (const char *, uid_t, gid_t));
29 #endif
30
31 #if GNULIB_CLOSE
32 SIGNATURE_CHECK (GNULIB_NAMESPACE::close, int, (int));
33 #endif
34
35 SIGNATURE_CHECK (GNULIB_NAMESPACE::dup, int, (int));
36
37 #if GNULIB_DUP2
38 SIGNATURE_CHECK (GNULIB_NAMESPACE::dup2, int, (int, int));
39 #endif
40
41 #if GNULIB_DUP3
42 SIGNATURE_CHECK (GNULIB_NAMESPACE::dup3, int, (int, int, int));
43 #endif
44
45 #if GNULIB_EUIDACCESS
46 SIGNATURE_CHECK (GNULIB_NAMESPACE::euidaccess, int, (const char *, int));
47 #endif
48
49 #if GNULIB_FACCESSAT
50 SIGNATURE_CHECK (GNULIB_NAMESPACE::faccessat, int,
51                  (int, char const *, int, int));
52 #endif
53
54 #if GNULIB_FCHDIR
55 SIGNATURE_CHECK (GNULIB_NAMESPACE::fchdir, int, (int));
56 #endif
57
58 #if GNULIB_FCHOWNAT
59 SIGNATURE_CHECK (GNULIB_NAMESPACE::fchownat, int,
60                  (int, char const *, uid_t, gid_t, int));
61 #endif
62
63 #if GNULIB_FSYNC
64 SIGNATURE_CHECK (GNULIB_NAMESPACE::fsync, int, (int));
65 #endif
66
67 #if GNULIB_FTRUNCATE
68 SIGNATURE_CHECK (GNULIB_NAMESPACE::ftruncate, int, (int, off_t));
69 #endif
70
71 #if GNULIB_GETCWD
72 SIGNATURE_CHECK (GNULIB_NAMESPACE::getcwd, char *, (char *, size_t));
73 #endif
74
75 #if GNULIB_GETDOMAINNAME
76 SIGNATURE_CHECK (GNULIB_NAMESPACE::getdomainname, int, (char *, size_t));
77 #endif
78
79 #if GNULIB_GETDTABLESIZE
80 SIGNATURE_CHECK (GNULIB_NAMESPACE::getdtablesize, int, (void));
81 #endif
82
83 #if GNULIB_GETGROUPS
84 SIGNATURE_CHECK (GNULIB_NAMESPACE::getgroups, int, (int, gid_t *));
85 #endif
86
87 #if GNULIB_GETHOSTNAME
88 SIGNATURE_CHECK (GNULIB_NAMESPACE::gethostname, int, (char *, size_t));
89 #endif
90
91 #if GNULIB_GETLOGIN
92 SIGNATURE_CHECK (GNULIB_NAMESPACE::getlogin, char *, (void));
93 #endif
94
95 #if GNULIB_GETLOGIN_R
96 SIGNATURE_CHECK (GNULIB_NAMESPACE::getlogin_r, int, (char *, size_t));
97 #endif
98
99 #if GNULIB_GETPAGESIZE
100 SIGNATURE_CHECK (GNULIB_NAMESPACE::getpagesize, int, (void));
101 #endif
102
103 #if GNULIB_GETUSERSHELL
104 SIGNATURE_CHECK (GNULIB_NAMESPACE::getusershell, char *, (void));
105 #endif
106
107 #if GNULIB_GETUSERSHELL
108 SIGNATURE_CHECK (GNULIB_NAMESPACE::setusershell, void, (void));
109 #endif
110
111 #if GNULIB_GETUSERSHELL
112 SIGNATURE_CHECK (GNULIB_NAMESPACE::endusershell, void, (void));
113 #endif
114
115 #if GNULIB_LCHOWN
116 SIGNATURE_CHECK (GNULIB_NAMESPACE::lchown, int, (char const *, uid_t, gid_t));
117 #endif
118
119 #if GNULIB_LINK
120 SIGNATURE_CHECK (GNULIB_NAMESPACE::link, int, (const char *, const char *));
121 #endif
122
123 #if GNULIB_LINKAT
124 SIGNATURE_CHECK (GNULIB_NAMESPACE::linkat, int,
125                  (int, const char *, int, const char *, int));
126 #endif
127
128 #if GNULIB_LSEEK
129 SIGNATURE_CHECK (GNULIB_NAMESPACE::lseek, off_t, (int, off_t, int));
130 #endif
131
132 #if GNULIB_PIPE2
133 SIGNATURE_CHECK (GNULIB_NAMESPACE::pipe2, int, (int[2], int));
134 #endif
135
136 #if GNULIB_PREAD
137 SIGNATURE_CHECK (GNULIB_NAMESPACE::pread, ssize_t,
138                  (int, void *, size_t, off_t));
139 #endif
140
141 #if GNULIB_READLINK
142 SIGNATURE_CHECK (GNULIB_NAMESPACE::readlink, ssize_t,
143                  (const char *, char *, size_t));
144 #endif
145
146 #if GNULIB_READLINKAT
147 SIGNATURE_CHECK (GNULIB_NAMESPACE::readlinkat, ssize_t,
148                  (int, char const *, char *, size_t));
149 #endif
150
151 #if GNULIB_RMDIR
152 SIGNATURE_CHECK (GNULIB_NAMESPACE::rmdir, int, (char const *));
153 #endif
154
155 #if GNULIB_SLEEP
156 SIGNATURE_CHECK (GNULIB_NAMESPACE::sleep, unsigned int, (unsigned int));
157 #endif
158
159 #if GNULIB_SYMLINK
160 SIGNATURE_CHECK (GNULIB_NAMESPACE::symlink, int, (char const *, char const *));
161 #endif
162
163 #if GNULIB_SYMLINKAT
164 SIGNATURE_CHECK (GNULIB_NAMESPACE::symlinkat, int,
165                  (char const *, int, char const *));
166 #endif
167
168 #if GNULIB_UNLINK
169 SIGNATURE_CHECK (GNULIB_NAMESPACE::unlink, int, (char const *));
170 #endif
171
172 #if GNULIB_UNLINKAT
173 SIGNATURE_CHECK (GNULIB_NAMESPACE::unlinkat, int, (int, char const *, int));
174 #endif
175
176 #if GNULIB_USLEEP
177 SIGNATURE_CHECK (GNULIB_NAMESPACE::usleep, int, (useconds_t));
178 #endif
179
180 #if GNULIB_WRITE
181 SIGNATURE_CHECK (GNULIB_NAMESPACE::write, ssize_t,
182                  (int, const void *, size_t));
183 #endif
184
185
186 int
187 main ()
188 {
189 }