diff options
Diffstat (limited to 'gl/unistd.h')
-rw-r--r-- | gl/unistd.h | 321 |
1 files changed, 0 insertions, 321 deletions
diff --git a/gl/unistd.h b/gl/unistd.h deleted file mode 100644 index e72a5d9a..00000000 --- a/gl/unistd.h +++ /dev/null | |||
@@ -1,321 +0,0 @@ | |||
1 | /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ | ||
2 | /* Substitute for and wrapper around <unistd.h>. | ||
3 | Copyright (C) 2004-2007 Free Software Foundation, Inc. | ||
4 | |||
5 | This program is free software; you can redistribute it and/or modify | ||
6 | it under the terms of the GNU General Public License as published by | ||
7 | the Free Software Foundation; either version 3, or (at your option) | ||
8 | any later version. | ||
9 | |||
10 | This program is distributed in the hope that it will be useful, | ||
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | GNU General Public License for more details. | ||
14 | |||
15 | You should have received a copy of the GNU General Public License | ||
16 | along with this program; if not, write to the Free Software Foundation, | ||
17 | Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ | ||
18 | |||
19 | #ifndef _GL_UNISTD_H | ||
20 | |||
21 | /* The include_next requires a split double-inclusion guard. */ | ||
22 | #if 1 | ||
23 | # include_next <unistd.h> | ||
24 | #endif | ||
25 | |||
26 | #ifndef _GL_UNISTD_H | ||
27 | #define _GL_UNISTD_H | ||
28 | |||
29 | /* mingw doesn't define the SEEK_* macros in <unistd.h>. */ | ||
30 | #if !(defined SEEK_CUR && defined SEEK_END && defined SEEK_SET) | ||
31 | # include <stdio.h> | ||
32 | #endif | ||
33 | |||
34 | /* mingw fails to declare _exit in <unistd.h>. */ | ||
35 | #include <stdlib.h> | ||
36 | |||
37 | /* The definition of GL_LINK_WARNING is copied here. */ | ||
38 | |||
39 | |||
40 | /* Declare overridden functions. */ | ||
41 | |||
42 | #ifdef __cplusplus | ||
43 | extern "C" { | ||
44 | #endif | ||
45 | |||
46 | |||
47 | #if 0 | ||
48 | # if 0 | ||
49 | # ifndef REPLACE_CHOWN | ||
50 | # define REPLACE_CHOWN 1 | ||
51 | # endif | ||
52 | # if REPLACE_CHOWN | ||
53 | /* Change the owner of FILE to UID (if UID is not -1) and the group of FILE | ||
54 | to GID (if GID is not -1). Follow symbolic links. | ||
55 | Return 0 if successful, otherwise -1 and errno set. | ||
56 | See the POSIX:2001 specification | ||
57 | <http://www.opengroup.org/susv3xsh/chown.html>. */ | ||
58 | # define chown rpl_chown | ||
59 | extern int chown (const char *file, uid_t uid, gid_t gid); | ||
60 | # endif | ||
61 | # endif | ||
62 | #elif defined GNULIB_POSIXCHECK | ||
63 | # undef chown | ||
64 | # define chown(f,u,g) \ | ||
65 | (GL_LINK_WARNING ("chown fails to follow symlinks on some systems and " \ | ||
66 | "doesn't treat a uid or gid of -1 on some systems - " \ | ||
67 | "use gnulib module chown for portability"), \ | ||
68 | chown (f, u, g)) | ||
69 | #endif | ||
70 | |||
71 | |||
72 | #if 0 | ||
73 | # if !1 | ||
74 | /* Copy the file descriptor OLDFD into file descriptor NEWFD. Do nothing if | ||
75 | NEWFD = OLDFD, otherwise close NEWFD first if it is open. | ||
76 | Return 0 if successful, otherwise -1 and errno set. | ||
77 | See the POSIX:2001 specification | ||
78 | <http://www.opengroup.org/susv3xsh/dup2.html>. */ | ||
79 | extern int dup2 (int oldfd, int newfd); | ||
80 | # endif | ||
81 | #elif defined GNULIB_POSIXCHECK | ||
82 | # undef dup2 | ||
83 | # define dup2(o,n) \ | ||
84 | (GL_LINK_WARNING ("dup2 is unportable - " \ | ||
85 | "use gnulib module dup2 for portability"), \ | ||
86 | dup2 (o, n)) | ||
87 | #endif | ||
88 | |||
89 | |||
90 | #if 0 | ||
91 | # if 0 | ||
92 | |||
93 | /* Change the process' current working directory to the directory on which | ||
94 | the given file descriptor is open. | ||
95 | Return 0 if successful, otherwise -1 and errno set. | ||
96 | See the POSIX:2001 specification | ||
97 | <http://www.opengroup.org/susv3xsh/fchdir.html>. */ | ||
98 | extern int fchdir (int /*fd*/); | ||
99 | |||
100 | # define close rpl_close | ||
101 | extern int close (int); | ||
102 | # define dup rpl_dup | ||
103 | extern int dup (int); | ||
104 | # define dup2 rpl_dup2 | ||
105 | extern int dup2 (int, int); | ||
106 | |||
107 | # endif | ||
108 | #elif defined GNULIB_POSIXCHECK | ||
109 | # undef fchdir | ||
110 | # define fchdir(f) \ | ||
111 | (GL_LINK_WARNING ("fchdir is unportable - " \ | ||
112 | "use gnulib module fchdir for portability"), \ | ||
113 | fchdir (f)) | ||
114 | #endif | ||
115 | |||
116 | |||
117 | #if 0 | ||
118 | # if !1 | ||
119 | /* Change the size of the file to which FD is opened to become equal to LENGTH. | ||
120 | Return 0 if successful, otherwise -1 and errno set. | ||
121 | See the POSIX:2001 specification | ||
122 | <http://www.opengroup.org/susv3xsh/ftruncate.html>. */ | ||
123 | extern int ftruncate (int fd, off_t length); | ||
124 | # endif | ||
125 | #elif defined GNULIB_POSIXCHECK | ||
126 | # undef ftruncate | ||
127 | # define ftruncate(f,l) \ | ||
128 | (GL_LINK_WARNING ("ftruncate is unportable - " \ | ||
129 | "use gnulib module ftruncate for portability"), \ | ||
130 | ftruncate (f, l)) | ||
131 | #endif | ||
132 | |||
133 | |||
134 | #if 0 | ||
135 | /* Include the headers that might declare getcwd so that they will not | ||
136 | cause confusion if included after this file. */ | ||
137 | # include <stdlib.h> | ||
138 | # if 0 | ||
139 | /* Get the name of the current working directory, and put it in SIZE bytes | ||
140 | of BUF. | ||
141 | Return BUF if successful, or NULL if the directory couldn't be determined | ||
142 | or SIZE was too small. | ||
143 | See the POSIX:2001 specification | ||
144 | <http://www.opengroup.org/susv3xsh/getcwd.html>. | ||
145 | Additionally, the gnulib module 'getcwd' guarantees the following GNU | ||
146 | extension: If BUF is NULL, an array is allocated with 'malloc'; the array | ||
147 | is SIZE bytes long, unless SIZE == 0, in which case it is as big as | ||
148 | necessary. */ | ||
149 | # define getcwd rpl_getcwd | ||
150 | extern char * getcwd (char *buf, size_t size); | ||
151 | # endif | ||
152 | #elif defined GNULIB_POSIXCHECK | ||
153 | # undef getcwd | ||
154 | # define getcwd(b,s) \ | ||
155 | (GL_LINK_WARNING ("getcwd is unportable - " \ | ||
156 | "use gnulib module getcwd for portability"), \ | ||
157 | getcwd (b, s)) | ||
158 | #endif | ||
159 | |||
160 | |||
161 | #if 0 | ||
162 | /* Copies the user's login name to NAME. | ||
163 | The array pointed to by NAME has room for SIZE bytes. | ||
164 | |||
165 | Returns 0 if successful. Upon error, an error number is returned, or -1 in | ||
166 | the case that the login name cannot be found but no specific error is | ||
167 | provided (this case is hopefully rare but is left open by the POSIX spec). | ||
168 | |||
169 | See <http://www.opengroup.org/susv3xsh/getlogin.html>. | ||
170 | */ | ||
171 | # if !1 | ||
172 | # include <stddef.h> | ||
173 | extern int getlogin_r (char *name, size_t size); | ||
174 | # endif | ||
175 | #elif defined GNULIB_POSIXCHECK | ||
176 | # undef getlogin_r | ||
177 | # define getlogin_r(n,s) \ | ||
178 | (GL_LINK_WARNING ("getlogin_r is unportable - " \ | ||
179 | "use gnulib module getlogin_r for portability"), \ | ||
180 | getlogin_r (n, s)) | ||
181 | #endif | ||
182 | |||
183 | |||
184 | #if 0 | ||
185 | # if 0 | ||
186 | # define getpagesize rpl_getpagesize | ||
187 | extern int getpagesize (void); | ||
188 | # elif !1 | ||
189 | /* This is for POSIX systems. */ | ||
190 | # if !defined getpagesize && defined _SC_PAGESIZE | ||
191 | # if ! (defined __VMS && __VMS_VER < 70000000) | ||
192 | # define getpagesize() sysconf (_SC_PAGESIZE) | ||
193 | # endif | ||
194 | # endif | ||
195 | /* This is for older VMS. */ | ||
196 | # if !defined getpagesize && defined __VMS | ||
197 | # ifdef __ALPHA | ||
198 | # define getpagesize() 8192 | ||
199 | # else | ||
200 | # define getpagesize() 512 | ||
201 | # endif | ||
202 | # endif | ||
203 | /* This is for BeOS. */ | ||
204 | # if !defined getpagesize && 0 | ||
205 | # include <OS.h> | ||
206 | # if defined B_PAGE_SIZE | ||
207 | # define getpagesize() B_PAGE_SIZE | ||
208 | # endif | ||
209 | # endif | ||
210 | /* This is for AmigaOS4.0. */ | ||
211 | # if !defined getpagesize && defined __amigaos4__ | ||
212 | # define getpagesize() 2048 | ||
213 | # endif | ||
214 | /* This is for older Unix systems. */ | ||
215 | # if !defined getpagesize && 0 | ||
216 | # include <sys/param.h> | ||
217 | # ifdef EXEC_PAGESIZE | ||
218 | # define getpagesize() EXEC_PAGESIZE | ||
219 | # else | ||
220 | # ifdef NBPG | ||
221 | # ifndef CLSIZE | ||
222 | # define CLSIZE 1 | ||
223 | # endif | ||
224 | # define getpagesize() (NBPG * CLSIZE) | ||
225 | # else | ||
226 | # ifdef NBPC | ||
227 | # define getpagesize() NBPC | ||
228 | # endif | ||
229 | # endif | ||
230 | # endif | ||
231 | # endif | ||
232 | # endif | ||
233 | #elif defined GNULIB_POSIXCHECK | ||
234 | # undef getpagesize | ||
235 | # define getpagesize() \ | ||
236 | (GL_LINK_WARNING ("getpagesize is unportable - " \ | ||
237 | "use gnulib module getpagesize for portability"), \ | ||
238 | getpagesize ()) | ||
239 | #endif | ||
240 | |||
241 | |||
242 | #if 0 | ||
243 | # if 0 | ||
244 | /* Change the owner of FILE to UID (if UID is not -1) and the group of FILE | ||
245 | to GID (if GID is not -1). Do not follow symbolic links. | ||
246 | Return 0 if successful, otherwise -1 and errno set. | ||
247 | See the POSIX:2001 specification | ||
248 | <http://www.opengroup.org/susv3xsh/lchown.html>. */ | ||
249 | # define lchown rpl_lchown | ||
250 | extern int lchown (char const *file, uid_t owner, gid_t group); | ||
251 | # endif | ||
252 | #elif defined GNULIB_POSIXCHECK | ||
253 | # undef lchown | ||
254 | # define lchown(f,u,g) \ | ||
255 | (GL_LINK_WARNING ("lchown is unportable to pre-POSIX.1-2001 " \ | ||
256 | "systems - use gnulib module lchown for portability"), \ | ||
257 | lchown (f, u, g)) | ||
258 | #endif | ||
259 | |||
260 | |||
261 | #if 0 | ||
262 | # if 0 | ||
263 | /* Set the offset of FD relative to SEEK_SET, SEEK_CUR, or SEEK_END. | ||
264 | Return the new offset if successful, otherwise -1 and errno set. | ||
265 | See the POSIX:2001 specification | ||
266 | <http://www.opengroup.org/susv3xsh/lseek.html>. */ | ||
267 | # define lseek rpl_lseek | ||
268 | extern off_t lseek (int fd, off_t offset, int whence); | ||
269 | # endif | ||
270 | #elif defined GNULIB_POSIXCHECK | ||
271 | # undef lseek | ||
272 | # define lseek(f,o,w) \ | ||
273 | (GL_LINK_WARNING ("lseek does not fail with ESPIPE on pipes on some " \ | ||
274 | "systems - use gnulib module lseek for portability"), \ | ||
275 | lseek (f, o, w)) | ||
276 | #endif | ||
277 | |||
278 | |||
279 | #if 0 | ||
280 | /* Read the contents of the symbolic link FILE and place the first BUFSIZE | ||
281 | bytes of it into BUF. Return the number of bytes placed into BUF if | ||
282 | successful, otherwise -1 and errno set. | ||
283 | See the POSIX:2001 specification | ||
284 | <http://www.opengroup.org/susv3xsh/readlink.html>. */ | ||
285 | # if !1 | ||
286 | # include <stddef.h> | ||
287 | extern int readlink (const char *file, char *buf, size_t bufsize); | ||
288 | # endif | ||
289 | #elif defined GNULIB_POSIXCHECK | ||
290 | # undef readlink | ||
291 | # define readlink(f,b,s) \ | ||
292 | (GL_LINK_WARNING ("readlink is unportable - " \ | ||
293 | "use gnulib module readlink for portability"), \ | ||
294 | readlink (f, b, s)) | ||
295 | #endif | ||
296 | |||
297 | |||
298 | #if 0 | ||
299 | /* Pause the execution of the current thread for N seconds. | ||
300 | Returns the number of seconds left to sleep. | ||
301 | See the POSIX:2001 specification | ||
302 | <http://www.opengroup.org/susv3xsh/sleep.html>. */ | ||
303 | # if !1 | ||
304 | extern unsigned int sleep (unsigned int n); | ||
305 | # endif | ||
306 | #elif defined GNULIB_POSIXCHECK | ||
307 | # undef sleep | ||
308 | # define sleep(n) \ | ||
309 | (GL_LINK_WARNING ("sleep is unportable - " \ | ||
310 | "use gnulib module sleep for portability"), \ | ||
311 | sleep (n)) | ||
312 | #endif | ||
313 | |||
314 | |||
315 | #ifdef __cplusplus | ||
316 | } | ||
317 | #endif | ||
318 | |||
319 | |||
320 | #endif /* _GL_UNISTD_H */ | ||
321 | #endif /* _GL_UNISTD_H */ | ||