annotate lib/unistd.in.h @ 265:68fbca173508 2.6

Added generated files for release
author lost
date Tue, 22 Dec 2009 05:31:23 +0000
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
265
68fbca173508 Added generated files for release
lost
parents:
diff changeset
1 /* Substitute for and wrapper around <unistd.h>.
68fbca173508 Added generated files for release
lost
parents:
diff changeset
2 Copyright (C) 2003-2009 Free Software Foundation, Inc.
68fbca173508 Added generated files for release
lost
parents:
diff changeset
3
68fbca173508 Added generated files for release
lost
parents:
diff changeset
4 This program is free software; you can redistribute it and/or modify
68fbca173508 Added generated files for release
lost
parents:
diff changeset
5 it under the terms of the GNU General Public License as published by
68fbca173508 Added generated files for release
lost
parents:
diff changeset
6 the Free Software Foundation; either version 2, or (at your option)
68fbca173508 Added generated files for release
lost
parents:
diff changeset
7 any later version.
68fbca173508 Added generated files for release
lost
parents:
diff changeset
8
68fbca173508 Added generated files for release
lost
parents:
diff changeset
9 This program is distributed in the hope that it will be useful,
68fbca173508 Added generated files for release
lost
parents:
diff changeset
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
68fbca173508 Added generated files for release
lost
parents:
diff changeset
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
68fbca173508 Added generated files for release
lost
parents:
diff changeset
12 GNU General Public License for more details.
68fbca173508 Added generated files for release
lost
parents:
diff changeset
13
68fbca173508 Added generated files for release
lost
parents:
diff changeset
14 You should have received a copy of the GNU General Public License
68fbca173508 Added generated files for release
lost
parents:
diff changeset
15 along with this program; if not, write to the Free Software Foundation,
68fbca173508 Added generated files for release
lost
parents:
diff changeset
16 Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
68fbca173508 Added generated files for release
lost
parents:
diff changeset
17
68fbca173508 Added generated files for release
lost
parents:
diff changeset
18 #ifndef _GL_UNISTD_H
68fbca173508 Added generated files for release
lost
parents:
diff changeset
19
68fbca173508 Added generated files for release
lost
parents:
diff changeset
20 #if __GNUC__ >= 3
68fbca173508 Added generated files for release
lost
parents:
diff changeset
21 @PRAGMA_SYSTEM_HEADER@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
22 #endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
23
68fbca173508 Added generated files for release
lost
parents:
diff changeset
24 /* The include_next requires a split double-inclusion guard. */
68fbca173508 Added generated files for release
lost
parents:
diff changeset
25 #if @HAVE_UNISTD_H@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
26 # @INCLUDE_NEXT@ @NEXT_UNISTD_H@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
27 #endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
28
68fbca173508 Added generated files for release
lost
parents:
diff changeset
29 #ifndef _GL_UNISTD_H
68fbca173508 Added generated files for release
lost
parents:
diff changeset
30 #define _GL_UNISTD_H
68fbca173508 Added generated files for release
lost
parents:
diff changeset
31
68fbca173508 Added generated files for release
lost
parents:
diff changeset
32 /* mingw doesn't define the SEEK_* or *_FILENO macros in <unistd.h>. */
68fbca173508 Added generated files for release
lost
parents:
diff changeset
33 #if !(defined SEEK_CUR && defined SEEK_END && defined SEEK_SET)
68fbca173508 Added generated files for release
lost
parents:
diff changeset
34 # include <stdio.h>
68fbca173508 Added generated files for release
lost
parents:
diff changeset
35 #endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
36
68fbca173508 Added generated files for release
lost
parents:
diff changeset
37 /* mingw fails to declare _exit in <unistd.h>. */
68fbca173508 Added generated files for release
lost
parents:
diff changeset
38 /* mingw, BeOS, Haiku declare environ in <stdlib.h>, not in <unistd.h>. */
68fbca173508 Added generated files for release
lost
parents:
diff changeset
39 #include <stdlib.h>
68fbca173508 Added generated files for release
lost
parents:
diff changeset
40
68fbca173508 Added generated files for release
lost
parents:
diff changeset
41 #if @GNULIB_WRITE@ && @REPLACE_WRITE@ && @GNULIB_UNISTD_H_SIGPIPE@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
42 /* Get ssize_t. */
68fbca173508 Added generated files for release
lost
parents:
diff changeset
43 # include <sys/types.h>
68fbca173508 Added generated files for release
lost
parents:
diff changeset
44 #endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
45
68fbca173508 Added generated files for release
lost
parents:
diff changeset
46 #if @GNULIB_GETHOSTNAME@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
47 /* Get all possible declarations of gethostname(). */
68fbca173508 Added generated files for release
lost
parents:
diff changeset
48 # if @UNISTD_H_HAVE_WINSOCK2_H@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
49 # include <winsock2.h>
68fbca173508 Added generated files for release
lost
parents:
diff changeset
50 # if !defined _GL_SYS_SOCKET_H
68fbca173508 Added generated files for release
lost
parents:
diff changeset
51 # undef socket
68fbca173508 Added generated files for release
lost
parents:
diff changeset
52 # define socket socket_used_without_including_sys_socket_h
68fbca173508 Added generated files for release
lost
parents:
diff changeset
53 # undef connect
68fbca173508 Added generated files for release
lost
parents:
diff changeset
54 # define connect connect_used_without_including_sys_socket_h
68fbca173508 Added generated files for release
lost
parents:
diff changeset
55 # undef accept
68fbca173508 Added generated files for release
lost
parents:
diff changeset
56 # define accept accept_used_without_including_sys_socket_h
68fbca173508 Added generated files for release
lost
parents:
diff changeset
57 # undef bind
68fbca173508 Added generated files for release
lost
parents:
diff changeset
58 # define bind bind_used_without_including_sys_socket_h
68fbca173508 Added generated files for release
lost
parents:
diff changeset
59 # undef getpeername
68fbca173508 Added generated files for release
lost
parents:
diff changeset
60 # define getpeername getpeername_used_without_including_sys_socket_h
68fbca173508 Added generated files for release
lost
parents:
diff changeset
61 # undef getsockname
68fbca173508 Added generated files for release
lost
parents:
diff changeset
62 # define getsockname getsockname_used_without_including_sys_socket_h
68fbca173508 Added generated files for release
lost
parents:
diff changeset
63 # undef getsockopt
68fbca173508 Added generated files for release
lost
parents:
diff changeset
64 # define getsockopt getsockopt_used_without_including_sys_socket_h
68fbca173508 Added generated files for release
lost
parents:
diff changeset
65 # undef listen
68fbca173508 Added generated files for release
lost
parents:
diff changeset
66 # define listen listen_used_without_including_sys_socket_h
68fbca173508 Added generated files for release
lost
parents:
diff changeset
67 # undef recv
68fbca173508 Added generated files for release
lost
parents:
diff changeset
68 # define recv recv_used_without_including_sys_socket_h
68fbca173508 Added generated files for release
lost
parents:
diff changeset
69 # undef send
68fbca173508 Added generated files for release
lost
parents:
diff changeset
70 # define send send_used_without_including_sys_socket_h
68fbca173508 Added generated files for release
lost
parents:
diff changeset
71 # undef recvfrom
68fbca173508 Added generated files for release
lost
parents:
diff changeset
72 # define recvfrom recvfrom_used_without_including_sys_socket_h
68fbca173508 Added generated files for release
lost
parents:
diff changeset
73 # undef sendto
68fbca173508 Added generated files for release
lost
parents:
diff changeset
74 # define sendto sendto_used_without_including_sys_socket_h
68fbca173508 Added generated files for release
lost
parents:
diff changeset
75 # undef setsockopt
68fbca173508 Added generated files for release
lost
parents:
diff changeset
76 # define setsockopt setsockopt_used_without_including_sys_socket_h
68fbca173508 Added generated files for release
lost
parents:
diff changeset
77 # undef shutdown
68fbca173508 Added generated files for release
lost
parents:
diff changeset
78 # define shutdown shutdown_used_without_including_sys_socket_h
68fbca173508 Added generated files for release
lost
parents:
diff changeset
79 # endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
80 # if !defined _GL_SYS_SELECT_H
68fbca173508 Added generated files for release
lost
parents:
diff changeset
81 # undef select
68fbca173508 Added generated files for release
lost
parents:
diff changeset
82 # define select select_used_without_including_sys_select_h
68fbca173508 Added generated files for release
lost
parents:
diff changeset
83 # endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
84 # endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
85 #endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
86
68fbca173508 Added generated files for release
lost
parents:
diff changeset
87 /* The definition of GL_LINK_WARNING is copied here. */
68fbca173508 Added generated files for release
lost
parents:
diff changeset
88
68fbca173508 Added generated files for release
lost
parents:
diff changeset
89
68fbca173508 Added generated files for release
lost
parents:
diff changeset
90 /* OS/2 EMX lacks these macros. */
68fbca173508 Added generated files for release
lost
parents:
diff changeset
91 #ifndef STDIN_FILENO
68fbca173508 Added generated files for release
lost
parents:
diff changeset
92 # define STDIN_FILENO 0
68fbca173508 Added generated files for release
lost
parents:
diff changeset
93 #endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
94 #ifndef STDOUT_FILENO
68fbca173508 Added generated files for release
lost
parents:
diff changeset
95 # define STDOUT_FILENO 1
68fbca173508 Added generated files for release
lost
parents:
diff changeset
96 #endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
97 #ifndef STDERR_FILENO
68fbca173508 Added generated files for release
lost
parents:
diff changeset
98 # define STDERR_FILENO 2
68fbca173508 Added generated files for release
lost
parents:
diff changeset
99 #endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
100
68fbca173508 Added generated files for release
lost
parents:
diff changeset
101 /* Declare overridden functions. */
68fbca173508 Added generated files for release
lost
parents:
diff changeset
102
68fbca173508 Added generated files for release
lost
parents:
diff changeset
103 #ifdef __cplusplus
68fbca173508 Added generated files for release
lost
parents:
diff changeset
104 extern "C" {
68fbca173508 Added generated files for release
lost
parents:
diff changeset
105 #endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
106
68fbca173508 Added generated files for release
lost
parents:
diff changeset
107
68fbca173508 Added generated files for release
lost
parents:
diff changeset
108 #if @GNULIB_CHOWN@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
109 # if @REPLACE_CHOWN@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
110 # ifndef REPLACE_CHOWN
68fbca173508 Added generated files for release
lost
parents:
diff changeset
111 # define REPLACE_CHOWN 1
68fbca173508 Added generated files for release
lost
parents:
diff changeset
112 # endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
113 # if REPLACE_CHOWN
68fbca173508 Added generated files for release
lost
parents:
diff changeset
114 /* Change the owner of FILE to UID (if UID is not -1) and the group of FILE
68fbca173508 Added generated files for release
lost
parents:
diff changeset
115 to GID (if GID is not -1). Follow symbolic links.
68fbca173508 Added generated files for release
lost
parents:
diff changeset
116 Return 0 if successful, otherwise -1 and errno set.
68fbca173508 Added generated files for release
lost
parents:
diff changeset
117 See the POSIX:2001 specification
68fbca173508 Added generated files for release
lost
parents:
diff changeset
118 <http://www.opengroup.org/susv3xsh/chown.html>. */
68fbca173508 Added generated files for release
lost
parents:
diff changeset
119 # define chown rpl_chown
68fbca173508 Added generated files for release
lost
parents:
diff changeset
120 extern int chown (const char *file, uid_t uid, gid_t gid);
68fbca173508 Added generated files for release
lost
parents:
diff changeset
121 # endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
122 # endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
123 #elif defined GNULIB_POSIXCHECK
68fbca173508 Added generated files for release
lost
parents:
diff changeset
124 # undef chown
68fbca173508 Added generated files for release
lost
parents:
diff changeset
125 # define chown(f,u,g) \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
126 (GL_LINK_WARNING ("chown fails to follow symlinks on some systems and " \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
127 "doesn't treat a uid or gid of -1 on some systems - " \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
128 "use gnulib module chown for portability"), \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
129 chown (f, u, g))
68fbca173508 Added generated files for release
lost
parents:
diff changeset
130 #endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
131
68fbca173508 Added generated files for release
lost
parents:
diff changeset
132
68fbca173508 Added generated files for release
lost
parents:
diff changeset
133 #if @GNULIB_CLOSE@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
134 # if @REPLACE_CLOSE@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
135 /* Automatically included by modules that need a replacement for close. */
68fbca173508 Added generated files for release
lost
parents:
diff changeset
136 # undef close
68fbca173508 Added generated files for release
lost
parents:
diff changeset
137 # define close rpl_close
68fbca173508 Added generated files for release
lost
parents:
diff changeset
138 extern int close (int);
68fbca173508 Added generated files for release
lost
parents:
diff changeset
139 # endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
140 #elif @UNISTD_H_HAVE_WINSOCK2_H@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
141 # undef close
68fbca173508 Added generated files for release
lost
parents:
diff changeset
142 # define close close_used_without_requesting_gnulib_module_close
68fbca173508 Added generated files for release
lost
parents:
diff changeset
143 #elif defined GNULIB_POSIXCHECK
68fbca173508 Added generated files for release
lost
parents:
diff changeset
144 # undef close
68fbca173508 Added generated files for release
lost
parents:
diff changeset
145 # define close(f) \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
146 (GL_LINK_WARNING ("close does not portably work on sockets - " \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
147 "use gnulib module close for portability"), \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
148 close (f))
68fbca173508 Added generated files for release
lost
parents:
diff changeset
149 #endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
150
68fbca173508 Added generated files for release
lost
parents:
diff changeset
151
68fbca173508 Added generated files for release
lost
parents:
diff changeset
152 #if @GNULIB_DUP2@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
153 # if !@HAVE_DUP2@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
154 /* Copy the file descriptor OLDFD into file descriptor NEWFD. Do nothing if
68fbca173508 Added generated files for release
lost
parents:
diff changeset
155 NEWFD = OLDFD, otherwise close NEWFD first if it is open.
68fbca173508 Added generated files for release
lost
parents:
diff changeset
156 Return 0 if successful, otherwise -1 and errno set.
68fbca173508 Added generated files for release
lost
parents:
diff changeset
157 See the POSIX:2001 specification
68fbca173508 Added generated files for release
lost
parents:
diff changeset
158 <http://www.opengroup.org/susv3xsh/dup2.html>. */
68fbca173508 Added generated files for release
lost
parents:
diff changeset
159 extern int dup2 (int oldfd, int newfd);
68fbca173508 Added generated files for release
lost
parents:
diff changeset
160 # endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
161 #elif defined GNULIB_POSIXCHECK
68fbca173508 Added generated files for release
lost
parents:
diff changeset
162 # undef dup2
68fbca173508 Added generated files for release
lost
parents:
diff changeset
163 # define dup2(o,n) \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
164 (GL_LINK_WARNING ("dup2 is unportable - " \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
165 "use gnulib module dup2 for portability"), \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
166 dup2 (o, n))
68fbca173508 Added generated files for release
lost
parents:
diff changeset
167 #endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
168
68fbca173508 Added generated files for release
lost
parents:
diff changeset
169
68fbca173508 Added generated files for release
lost
parents:
diff changeset
170 #if @GNULIB_ENVIRON@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
171 # if !@HAVE_DECL_ENVIRON@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
172 /* Set of environment variables and values. An array of strings of the form
68fbca173508 Added generated files for release
lost
parents:
diff changeset
173 "VARIABLE=VALUE", terminated with a NULL. */
68fbca173508 Added generated files for release
lost
parents:
diff changeset
174 # if defined __APPLE__ && defined __MACH__
68fbca173508 Added generated files for release
lost
parents:
diff changeset
175 # include <crt_externs.h>
68fbca173508 Added generated files for release
lost
parents:
diff changeset
176 # define environ (*_NSGetEnviron ())
68fbca173508 Added generated files for release
lost
parents:
diff changeset
177 # else
68fbca173508 Added generated files for release
lost
parents:
diff changeset
178 extern char **environ;
68fbca173508 Added generated files for release
lost
parents:
diff changeset
179 # endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
180 # endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
181 #elif defined GNULIB_POSIXCHECK
68fbca173508 Added generated files for release
lost
parents:
diff changeset
182 # undef environ
68fbca173508 Added generated files for release
lost
parents:
diff changeset
183 # define environ \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
184 (GL_LINK_WARNING ("environ is unportable - " \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
185 "use gnulib module environ for portability"), \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
186 environ)
68fbca173508 Added generated files for release
lost
parents:
diff changeset
187 #endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
188
68fbca173508 Added generated files for release
lost
parents:
diff changeset
189
68fbca173508 Added generated files for release
lost
parents:
diff changeset
190 #if @GNULIB_EUIDACCESS@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
191 # if !@HAVE_EUIDACCESS@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
192 /* Like access(), except that is uses the effective user id and group id of
68fbca173508 Added generated files for release
lost
parents:
diff changeset
193 the current process. */
68fbca173508 Added generated files for release
lost
parents:
diff changeset
194 extern int euidaccess (const char *filename, int mode);
68fbca173508 Added generated files for release
lost
parents:
diff changeset
195 # endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
196 #elif defined GNULIB_POSIXCHECK
68fbca173508 Added generated files for release
lost
parents:
diff changeset
197 # undef euidaccess
68fbca173508 Added generated files for release
lost
parents:
diff changeset
198 # define euidaccess(f,m) \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
199 (GL_LINK_WARNING ("euidaccess is unportable - " \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
200 "use gnulib module euidaccess for portability"), \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
201 euidaccess (f, m))
68fbca173508 Added generated files for release
lost
parents:
diff changeset
202 #endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
203
68fbca173508 Added generated files for release
lost
parents:
diff changeset
204
68fbca173508 Added generated files for release
lost
parents:
diff changeset
205 #if @GNULIB_FCHDIR@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
206 # if @REPLACE_FCHDIR@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
207
68fbca173508 Added generated files for release
lost
parents:
diff changeset
208 /* Change the process' current working directory to the directory on which
68fbca173508 Added generated files for release
lost
parents:
diff changeset
209 the given file descriptor is open.
68fbca173508 Added generated files for release
lost
parents:
diff changeset
210 Return 0 if successful, otherwise -1 and errno set.
68fbca173508 Added generated files for release
lost
parents:
diff changeset
211 See the POSIX:2001 specification
68fbca173508 Added generated files for release
lost
parents:
diff changeset
212 <http://www.opengroup.org/susv3xsh/fchdir.html>. */
68fbca173508 Added generated files for release
lost
parents:
diff changeset
213 extern int fchdir (int /*fd*/);
68fbca173508 Added generated files for release
lost
parents:
diff changeset
214
68fbca173508 Added generated files for release
lost
parents:
diff changeset
215 # define dup rpl_dup
68fbca173508 Added generated files for release
lost
parents:
diff changeset
216 extern int dup (int);
68fbca173508 Added generated files for release
lost
parents:
diff changeset
217 # define dup2 rpl_dup2
68fbca173508 Added generated files for release
lost
parents:
diff changeset
218 extern int dup2 (int, int);
68fbca173508 Added generated files for release
lost
parents:
diff changeset
219
68fbca173508 Added generated files for release
lost
parents:
diff changeset
220 # endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
221 #elif defined GNULIB_POSIXCHECK
68fbca173508 Added generated files for release
lost
parents:
diff changeset
222 # undef fchdir
68fbca173508 Added generated files for release
lost
parents:
diff changeset
223 # define fchdir(f) \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
224 (GL_LINK_WARNING ("fchdir is unportable - " \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
225 "use gnulib module fchdir for portability"), \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
226 fchdir (f))
68fbca173508 Added generated files for release
lost
parents:
diff changeset
227 #endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
228
68fbca173508 Added generated files for release
lost
parents:
diff changeset
229
68fbca173508 Added generated files for release
lost
parents:
diff changeset
230 #if @GNULIB_FSYNC@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
231 /* Synchronize changes to a file.
68fbca173508 Added generated files for release
lost
parents:
diff changeset
232 Return 0 if successful, otherwise -1 and errno set.
68fbca173508 Added generated files for release
lost
parents:
diff changeset
233 See POSIX:2001 specification
68fbca173508 Added generated files for release
lost
parents:
diff changeset
234 <http://www.opengroup.org/susv3xsh/fsync.html>. */
68fbca173508 Added generated files for release
lost
parents:
diff changeset
235 # if !@HAVE_FSYNC@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
236 extern int fsync (int fd);
68fbca173508 Added generated files for release
lost
parents:
diff changeset
237 # endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
238 #elif defined GNULIB_POSIXCHECK
68fbca173508 Added generated files for release
lost
parents:
diff changeset
239 # undef fsync
68fbca173508 Added generated files for release
lost
parents:
diff changeset
240 # define fsync(fd) \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
241 (GL_LINK_WARNING ("fsync is unportable - " \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
242 "use gnulib module fsync for portability"), \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
243 fsync (fd))
68fbca173508 Added generated files for release
lost
parents:
diff changeset
244 #endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
245
68fbca173508 Added generated files for release
lost
parents:
diff changeset
246
68fbca173508 Added generated files for release
lost
parents:
diff changeset
247 #if @GNULIB_FTRUNCATE@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
248 # if !@HAVE_FTRUNCATE@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
249 /* Change the size of the file to which FD is opened to become equal to LENGTH.
68fbca173508 Added generated files for release
lost
parents:
diff changeset
250 Return 0 if successful, otherwise -1 and errno set.
68fbca173508 Added generated files for release
lost
parents:
diff changeset
251 See the POSIX:2001 specification
68fbca173508 Added generated files for release
lost
parents:
diff changeset
252 <http://www.opengroup.org/susv3xsh/ftruncate.html>. */
68fbca173508 Added generated files for release
lost
parents:
diff changeset
253 extern int ftruncate (int fd, off_t length);
68fbca173508 Added generated files for release
lost
parents:
diff changeset
254 # endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
255 #elif defined GNULIB_POSIXCHECK
68fbca173508 Added generated files for release
lost
parents:
diff changeset
256 # undef ftruncate
68fbca173508 Added generated files for release
lost
parents:
diff changeset
257 # define ftruncate(f,l) \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
258 (GL_LINK_WARNING ("ftruncate is unportable - " \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
259 "use gnulib module ftruncate for portability"), \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
260 ftruncate (f, l))
68fbca173508 Added generated files for release
lost
parents:
diff changeset
261 #endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
262
68fbca173508 Added generated files for release
lost
parents:
diff changeset
263
68fbca173508 Added generated files for release
lost
parents:
diff changeset
264 #if @GNULIB_GETCWD@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
265 /* Include the headers that might declare getcwd so that they will not
68fbca173508 Added generated files for release
lost
parents:
diff changeset
266 cause confusion if included after this file. */
68fbca173508 Added generated files for release
lost
parents:
diff changeset
267 # include <stdlib.h>
68fbca173508 Added generated files for release
lost
parents:
diff changeset
268 # if @REPLACE_GETCWD@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
269 /* Get the name of the current working directory, and put it in SIZE bytes
68fbca173508 Added generated files for release
lost
parents:
diff changeset
270 of BUF.
68fbca173508 Added generated files for release
lost
parents:
diff changeset
271 Return BUF if successful, or NULL if the directory couldn't be determined
68fbca173508 Added generated files for release
lost
parents:
diff changeset
272 or SIZE was too small.
68fbca173508 Added generated files for release
lost
parents:
diff changeset
273 See the POSIX:2001 specification
68fbca173508 Added generated files for release
lost
parents:
diff changeset
274 <http://www.opengroup.org/susv3xsh/getcwd.html>.
68fbca173508 Added generated files for release
lost
parents:
diff changeset
275 Additionally, the gnulib module 'getcwd' guarantees the following GNU
68fbca173508 Added generated files for release
lost
parents:
diff changeset
276 extension: If BUF is NULL, an array is allocated with 'malloc'; the array
68fbca173508 Added generated files for release
lost
parents:
diff changeset
277 is SIZE bytes long, unless SIZE == 0, in which case it is as big as
68fbca173508 Added generated files for release
lost
parents:
diff changeset
278 necessary. */
68fbca173508 Added generated files for release
lost
parents:
diff changeset
279 # define getcwd rpl_getcwd
68fbca173508 Added generated files for release
lost
parents:
diff changeset
280 extern char * getcwd (char *buf, size_t size);
68fbca173508 Added generated files for release
lost
parents:
diff changeset
281 # endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
282 #elif defined GNULIB_POSIXCHECK
68fbca173508 Added generated files for release
lost
parents:
diff changeset
283 # undef getcwd
68fbca173508 Added generated files for release
lost
parents:
diff changeset
284 # define getcwd(b,s) \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
285 (GL_LINK_WARNING ("getcwd is unportable - " \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
286 "use gnulib module getcwd for portability"), \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
287 getcwd (b, s))
68fbca173508 Added generated files for release
lost
parents:
diff changeset
288 #endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
289
68fbca173508 Added generated files for release
lost
parents:
diff changeset
290
68fbca173508 Added generated files for release
lost
parents:
diff changeset
291 #if @GNULIB_GETDOMAINNAME@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
292 /* Return the NIS domain name of the machine.
68fbca173508 Added generated files for release
lost
parents:
diff changeset
293 WARNING! The NIS domain name is unrelated to the fully qualified host name
68fbca173508 Added generated files for release
lost
parents:
diff changeset
294 of the machine. It is also unrelated to email addresses.
68fbca173508 Added generated files for release
lost
parents:
diff changeset
295 WARNING! The NIS domain name is usually the empty string or "(none)" when
68fbca173508 Added generated files for release
lost
parents:
diff changeset
296 not using NIS.
68fbca173508 Added generated files for release
lost
parents:
diff changeset
297
68fbca173508 Added generated files for release
lost
parents:
diff changeset
298 Put up to LEN bytes of the NIS domain name into NAME.
68fbca173508 Added generated files for release
lost
parents:
diff changeset
299 Null terminate it if the name is shorter than LEN.
68fbca173508 Added generated files for release
lost
parents:
diff changeset
300 If the NIS domain name is longer than LEN, set errno = EINVAL and return -1.
68fbca173508 Added generated files for release
lost
parents:
diff changeset
301 Return 0 if successful, otherwise set errno and return -1. */
68fbca173508 Added generated files for release
lost
parents:
diff changeset
302 # if !@HAVE_GETDOMAINNAME@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
303 extern int getdomainname(char *name, size_t len);
68fbca173508 Added generated files for release
lost
parents:
diff changeset
304 # endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
305 #elif defined GNULIB_POSIXCHECK
68fbca173508 Added generated files for release
lost
parents:
diff changeset
306 # undef getdomainname
68fbca173508 Added generated files for release
lost
parents:
diff changeset
307 # define getdomainname(n,l) \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
308 (GL_LINK_WARNING ("getdomainname is unportable - " \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
309 "use gnulib module getdomainname for portability"), \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
310 getdomainname (n, l))
68fbca173508 Added generated files for release
lost
parents:
diff changeset
311 #endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
312
68fbca173508 Added generated files for release
lost
parents:
diff changeset
313
68fbca173508 Added generated files for release
lost
parents:
diff changeset
314 #if @GNULIB_GETDTABLESIZE@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
315 # if !@HAVE_GETDTABLESIZE@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
316 /* Return the maximum number of file descriptors in the current process. */
68fbca173508 Added generated files for release
lost
parents:
diff changeset
317 extern int getdtablesize (void);
68fbca173508 Added generated files for release
lost
parents:
diff changeset
318 # endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
319 #elif defined GNULIB_POSIXCHECK
68fbca173508 Added generated files for release
lost
parents:
diff changeset
320 # undef getdtablesize
68fbca173508 Added generated files for release
lost
parents:
diff changeset
321 # define getdtablesize() \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
322 (GL_LINK_WARNING ("getdtablesize is unportable - " \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
323 "use gnulib module getdtablesize for portability"), \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
324 getdtablesize ())
68fbca173508 Added generated files for release
lost
parents:
diff changeset
325 #endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
326
68fbca173508 Added generated files for release
lost
parents:
diff changeset
327
68fbca173508 Added generated files for release
lost
parents:
diff changeset
328 #if @GNULIB_GETHOSTNAME@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
329 /* Return the standard host name of the machine.
68fbca173508 Added generated files for release
lost
parents:
diff changeset
330 WARNING! The host name may or may not be fully qualified.
68fbca173508 Added generated files for release
lost
parents:
diff changeset
331
68fbca173508 Added generated files for release
lost
parents:
diff changeset
332 Put up to LEN bytes of the host name into NAME.
68fbca173508 Added generated files for release
lost
parents:
diff changeset
333 Null terminate it if the name is shorter than LEN.
68fbca173508 Added generated files for release
lost
parents:
diff changeset
334 If the host name is longer than LEN, set errno = EINVAL and return -1.
68fbca173508 Added generated files for release
lost
parents:
diff changeset
335 Return 0 if successful, otherwise set errno and return -1. */
68fbca173508 Added generated files for release
lost
parents:
diff changeset
336 # if @UNISTD_H_HAVE_WINSOCK2_H@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
337 # undef gethostname
68fbca173508 Added generated files for release
lost
parents:
diff changeset
338 # define gethostname rpl_gethostname
68fbca173508 Added generated files for release
lost
parents:
diff changeset
339 # endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
340 # if @UNISTD_H_HAVE_WINSOCK2_H@ || !@HAVE_GETHOSTNAME@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
341 extern int gethostname(char *name, size_t len);
68fbca173508 Added generated files for release
lost
parents:
diff changeset
342 # endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
343 #elif @UNISTD_H_HAVE_WINSOCK2_H@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
344 # undef gethostname
68fbca173508 Added generated files for release
lost
parents:
diff changeset
345 # define gethostname gethostname_used_without_requesting_gnulib_module_gethostname
68fbca173508 Added generated files for release
lost
parents:
diff changeset
346 #elif defined GNULIB_POSIXCHECK
68fbca173508 Added generated files for release
lost
parents:
diff changeset
347 # undef gethostname
68fbca173508 Added generated files for release
lost
parents:
diff changeset
348 # define gethostname(n,l) \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
349 (GL_LINK_WARNING ("gethostname is unportable - " \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
350 "use gnulib module gethostname for portability"), \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
351 gethostname (n, l))
68fbca173508 Added generated files for release
lost
parents:
diff changeset
352 #endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
353
68fbca173508 Added generated files for release
lost
parents:
diff changeset
354
68fbca173508 Added generated files for release
lost
parents:
diff changeset
355 #if @GNULIB_GETLOGIN_R@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
356 /* Copies the user's login name to NAME.
68fbca173508 Added generated files for release
lost
parents:
diff changeset
357 The array pointed to by NAME has room for SIZE bytes.
68fbca173508 Added generated files for release
lost
parents:
diff changeset
358
68fbca173508 Added generated files for release
lost
parents:
diff changeset
359 Returns 0 if successful. Upon error, an error number is returned, or -1 in
68fbca173508 Added generated files for release
lost
parents:
diff changeset
360 the case that the login name cannot be found but no specific error is
68fbca173508 Added generated files for release
lost
parents:
diff changeset
361 provided (this case is hopefully rare but is left open by the POSIX spec).
68fbca173508 Added generated files for release
lost
parents:
diff changeset
362
68fbca173508 Added generated files for release
lost
parents:
diff changeset
363 See <http://www.opengroup.org/susv3xsh/getlogin.html>.
68fbca173508 Added generated files for release
lost
parents:
diff changeset
364 */
68fbca173508 Added generated files for release
lost
parents:
diff changeset
365 # if !@HAVE_DECL_GETLOGIN_R@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
366 # include <stddef.h>
68fbca173508 Added generated files for release
lost
parents:
diff changeset
367 extern int getlogin_r (char *name, size_t size);
68fbca173508 Added generated files for release
lost
parents:
diff changeset
368 # endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
369 #elif defined GNULIB_POSIXCHECK
68fbca173508 Added generated files for release
lost
parents:
diff changeset
370 # undef getlogin_r
68fbca173508 Added generated files for release
lost
parents:
diff changeset
371 # define getlogin_r(n,s) \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
372 (GL_LINK_WARNING ("getlogin_r is unportable - " \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
373 "use gnulib module getlogin_r for portability"), \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
374 getlogin_r (n, s))
68fbca173508 Added generated files for release
lost
parents:
diff changeset
375 #endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
376
68fbca173508 Added generated files for release
lost
parents:
diff changeset
377
68fbca173508 Added generated files for release
lost
parents:
diff changeset
378 #if @GNULIB_GETPAGESIZE@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
379 # if @REPLACE_GETPAGESIZE@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
380 # define getpagesize rpl_getpagesize
68fbca173508 Added generated files for release
lost
parents:
diff changeset
381 extern int getpagesize (void);
68fbca173508 Added generated files for release
lost
parents:
diff changeset
382 # elif !@HAVE_GETPAGESIZE@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
383 /* This is for POSIX systems. */
68fbca173508 Added generated files for release
lost
parents:
diff changeset
384 # if !defined getpagesize && defined _SC_PAGESIZE
68fbca173508 Added generated files for release
lost
parents:
diff changeset
385 # if ! (defined __VMS && __VMS_VER < 70000000)
68fbca173508 Added generated files for release
lost
parents:
diff changeset
386 # define getpagesize() sysconf (_SC_PAGESIZE)
68fbca173508 Added generated files for release
lost
parents:
diff changeset
387 # endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
388 # endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
389 /* This is for older VMS. */
68fbca173508 Added generated files for release
lost
parents:
diff changeset
390 # if !defined getpagesize && defined __VMS
68fbca173508 Added generated files for release
lost
parents:
diff changeset
391 # ifdef __ALPHA
68fbca173508 Added generated files for release
lost
parents:
diff changeset
392 # define getpagesize() 8192
68fbca173508 Added generated files for release
lost
parents:
diff changeset
393 # else
68fbca173508 Added generated files for release
lost
parents:
diff changeset
394 # define getpagesize() 512
68fbca173508 Added generated files for release
lost
parents:
diff changeset
395 # endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
396 # endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
397 /* This is for BeOS. */
68fbca173508 Added generated files for release
lost
parents:
diff changeset
398 # if !defined getpagesize && @HAVE_OS_H@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
399 # include <OS.h>
68fbca173508 Added generated files for release
lost
parents:
diff changeset
400 # if defined B_PAGE_SIZE
68fbca173508 Added generated files for release
lost
parents:
diff changeset
401 # define getpagesize() B_PAGE_SIZE
68fbca173508 Added generated files for release
lost
parents:
diff changeset
402 # endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
403 # endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
404 /* This is for AmigaOS4.0. */
68fbca173508 Added generated files for release
lost
parents:
diff changeset
405 # if !defined getpagesize && defined __amigaos4__
68fbca173508 Added generated files for release
lost
parents:
diff changeset
406 # define getpagesize() 2048
68fbca173508 Added generated files for release
lost
parents:
diff changeset
407 # endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
408 /* This is for older Unix systems. */
68fbca173508 Added generated files for release
lost
parents:
diff changeset
409 # if !defined getpagesize && @HAVE_SYS_PARAM_H@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
410 # include <sys/param.h>
68fbca173508 Added generated files for release
lost
parents:
diff changeset
411 # ifdef EXEC_PAGESIZE
68fbca173508 Added generated files for release
lost
parents:
diff changeset
412 # define getpagesize() EXEC_PAGESIZE
68fbca173508 Added generated files for release
lost
parents:
diff changeset
413 # else
68fbca173508 Added generated files for release
lost
parents:
diff changeset
414 # ifdef NBPG
68fbca173508 Added generated files for release
lost
parents:
diff changeset
415 # ifndef CLSIZE
68fbca173508 Added generated files for release
lost
parents:
diff changeset
416 # define CLSIZE 1
68fbca173508 Added generated files for release
lost
parents:
diff changeset
417 # endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
418 # define getpagesize() (NBPG * CLSIZE)
68fbca173508 Added generated files for release
lost
parents:
diff changeset
419 # else
68fbca173508 Added generated files for release
lost
parents:
diff changeset
420 # ifdef NBPC
68fbca173508 Added generated files for release
lost
parents:
diff changeset
421 # define getpagesize() NBPC
68fbca173508 Added generated files for release
lost
parents:
diff changeset
422 # endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
423 # endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
424 # endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
425 # endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
426 # endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
427 #elif defined GNULIB_POSIXCHECK
68fbca173508 Added generated files for release
lost
parents:
diff changeset
428 # undef getpagesize
68fbca173508 Added generated files for release
lost
parents:
diff changeset
429 # define getpagesize() \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
430 (GL_LINK_WARNING ("getpagesize is unportable - " \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
431 "use gnulib module getpagesize for portability"), \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
432 getpagesize ())
68fbca173508 Added generated files for release
lost
parents:
diff changeset
433 #endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
434
68fbca173508 Added generated files for release
lost
parents:
diff changeset
435
68fbca173508 Added generated files for release
lost
parents:
diff changeset
436 #if @GNULIB_GETUSERSHELL@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
437 # if !@HAVE_GETUSERSHELL@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
438 /* Return the next valid login shell on the system, or NULL when the end of
68fbca173508 Added generated files for release
lost
parents:
diff changeset
439 the list has been reached. */
68fbca173508 Added generated files for release
lost
parents:
diff changeset
440 extern char *getusershell (void);
68fbca173508 Added generated files for release
lost
parents:
diff changeset
441 /* Rewind to pointer that is advanced at each getusershell() call. */
68fbca173508 Added generated files for release
lost
parents:
diff changeset
442 extern void setusershell (void);
68fbca173508 Added generated files for release
lost
parents:
diff changeset
443 /* Free the pointer that is advanced at each getusershell() call and
68fbca173508 Added generated files for release
lost
parents:
diff changeset
444 associated resources. */
68fbca173508 Added generated files for release
lost
parents:
diff changeset
445 extern void endusershell (void);
68fbca173508 Added generated files for release
lost
parents:
diff changeset
446 # endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
447 #elif defined GNULIB_POSIXCHECK
68fbca173508 Added generated files for release
lost
parents:
diff changeset
448 # undef getusershell
68fbca173508 Added generated files for release
lost
parents:
diff changeset
449 # define getusershell() \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
450 (GL_LINK_WARNING ("getusershell is unportable - " \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
451 "use gnulib module getusershell for portability"), \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
452 getusershell ())
68fbca173508 Added generated files for release
lost
parents:
diff changeset
453 # undef setusershell
68fbca173508 Added generated files for release
lost
parents:
diff changeset
454 # define setusershell() \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
455 (GL_LINK_WARNING ("setusershell is unportable - " \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
456 "use gnulib module getusershell for portability"), \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
457 setusershell ())
68fbca173508 Added generated files for release
lost
parents:
diff changeset
458 # undef endusershell
68fbca173508 Added generated files for release
lost
parents:
diff changeset
459 # define endusershell() \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
460 (GL_LINK_WARNING ("endusershell is unportable - " \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
461 "use gnulib module getusershell for portability"), \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
462 endusershell ())
68fbca173508 Added generated files for release
lost
parents:
diff changeset
463 #endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
464
68fbca173508 Added generated files for release
lost
parents:
diff changeset
465
68fbca173508 Added generated files for release
lost
parents:
diff changeset
466 #if @GNULIB_LCHOWN@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
467 # if @REPLACE_LCHOWN@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
468 /* Change the owner of FILE to UID (if UID is not -1) and the group of FILE
68fbca173508 Added generated files for release
lost
parents:
diff changeset
469 to GID (if GID is not -1). Do not follow symbolic links.
68fbca173508 Added generated files for release
lost
parents:
diff changeset
470 Return 0 if successful, otherwise -1 and errno set.
68fbca173508 Added generated files for release
lost
parents:
diff changeset
471 See the POSIX:2001 specification
68fbca173508 Added generated files for release
lost
parents:
diff changeset
472 <http://www.opengroup.org/susv3xsh/lchown.html>. */
68fbca173508 Added generated files for release
lost
parents:
diff changeset
473 # define lchown rpl_lchown
68fbca173508 Added generated files for release
lost
parents:
diff changeset
474 extern int lchown (char const *file, uid_t owner, gid_t group);
68fbca173508 Added generated files for release
lost
parents:
diff changeset
475 # endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
476 #elif defined GNULIB_POSIXCHECK
68fbca173508 Added generated files for release
lost
parents:
diff changeset
477 # undef lchown
68fbca173508 Added generated files for release
lost
parents:
diff changeset
478 # define lchown(f,u,g) \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
479 (GL_LINK_WARNING ("lchown is unportable to pre-POSIX.1-2001 " \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
480 "systems - use gnulib module lchown for portability"), \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
481 lchown (f, u, g))
68fbca173508 Added generated files for release
lost
parents:
diff changeset
482 #endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
483
68fbca173508 Added generated files for release
lost
parents:
diff changeset
484
68fbca173508 Added generated files for release
lost
parents:
diff changeset
485 #if @GNULIB_LINK@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
486 /* Create a new hard link for an existing file.
68fbca173508 Added generated files for release
lost
parents:
diff changeset
487 Return 0 if successful, otherwise -1 and errno set.
68fbca173508 Added generated files for release
lost
parents:
diff changeset
488 See POSIX:2001 specification
68fbca173508 Added generated files for release
lost
parents:
diff changeset
489 <http://www.opengroup.org/susv3xsh/link.html>. */
68fbca173508 Added generated files for release
lost
parents:
diff changeset
490 # if !@HAVE_LINK@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
491 extern int link (const char *path1, const char *path2);
68fbca173508 Added generated files for release
lost
parents:
diff changeset
492 # endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
493 #elif defined GNULIB_POSIXCHECK
68fbca173508 Added generated files for release
lost
parents:
diff changeset
494 # undef link
68fbca173508 Added generated files for release
lost
parents:
diff changeset
495 # define link(path1,path2) \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
496 (GL_LINK_WARNING ("link is unportable - " \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
497 "use gnulib module link for portability"), \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
498 link (path1, path2))
68fbca173508 Added generated files for release
lost
parents:
diff changeset
499 #endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
500
68fbca173508 Added generated files for release
lost
parents:
diff changeset
501
68fbca173508 Added generated files for release
lost
parents:
diff changeset
502 #if @GNULIB_LSEEK@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
503 # if @REPLACE_LSEEK@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
504 /* Set the offset of FD relative to SEEK_SET, SEEK_CUR, or SEEK_END.
68fbca173508 Added generated files for release
lost
parents:
diff changeset
505 Return the new offset if successful, otherwise -1 and errno set.
68fbca173508 Added generated files for release
lost
parents:
diff changeset
506 See the POSIX:2001 specification
68fbca173508 Added generated files for release
lost
parents:
diff changeset
507 <http://www.opengroup.org/susv3xsh/lseek.html>. */
68fbca173508 Added generated files for release
lost
parents:
diff changeset
508 # define lseek rpl_lseek
68fbca173508 Added generated files for release
lost
parents:
diff changeset
509 extern off_t lseek (int fd, off_t offset, int whence);
68fbca173508 Added generated files for release
lost
parents:
diff changeset
510 # endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
511 #elif defined GNULIB_POSIXCHECK
68fbca173508 Added generated files for release
lost
parents:
diff changeset
512 # undef lseek
68fbca173508 Added generated files for release
lost
parents:
diff changeset
513 # define lseek(f,o,w) \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
514 (GL_LINK_WARNING ("lseek does not fail with ESPIPE on pipes on some " \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
515 "systems - use gnulib module lseek for portability"), \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
516 lseek (f, o, w))
68fbca173508 Added generated files for release
lost
parents:
diff changeset
517 #endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
518
68fbca173508 Added generated files for release
lost
parents:
diff changeset
519
68fbca173508 Added generated files for release
lost
parents:
diff changeset
520 #if @GNULIB_READLINK@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
521 /* Read the contents of the symbolic link FILE and place the first BUFSIZE
68fbca173508 Added generated files for release
lost
parents:
diff changeset
522 bytes of it into BUF. Return the number of bytes placed into BUF if
68fbca173508 Added generated files for release
lost
parents:
diff changeset
523 successful, otherwise -1 and errno set.
68fbca173508 Added generated files for release
lost
parents:
diff changeset
524 See the POSIX:2001 specification
68fbca173508 Added generated files for release
lost
parents:
diff changeset
525 <http://www.opengroup.org/susv3xsh/readlink.html>. */
68fbca173508 Added generated files for release
lost
parents:
diff changeset
526 # if !@HAVE_READLINK@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
527 # include <stddef.h>
68fbca173508 Added generated files for release
lost
parents:
diff changeset
528 extern int readlink (const char *file, char *buf, size_t bufsize);
68fbca173508 Added generated files for release
lost
parents:
diff changeset
529 # endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
530 #elif defined GNULIB_POSIXCHECK
68fbca173508 Added generated files for release
lost
parents:
diff changeset
531 # undef readlink
68fbca173508 Added generated files for release
lost
parents:
diff changeset
532 # define readlink(f,b,s) \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
533 (GL_LINK_WARNING ("readlink is unportable - " \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
534 "use gnulib module readlink for portability"), \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
535 readlink (f, b, s))
68fbca173508 Added generated files for release
lost
parents:
diff changeset
536 #endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
537
68fbca173508 Added generated files for release
lost
parents:
diff changeset
538
68fbca173508 Added generated files for release
lost
parents:
diff changeset
539 #if @GNULIB_SLEEP@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
540 /* Pause the execution of the current thread for N seconds.
68fbca173508 Added generated files for release
lost
parents:
diff changeset
541 Returns the number of seconds left to sleep.
68fbca173508 Added generated files for release
lost
parents:
diff changeset
542 See the POSIX:2001 specification
68fbca173508 Added generated files for release
lost
parents:
diff changeset
543 <http://www.opengroup.org/susv3xsh/sleep.html>. */
68fbca173508 Added generated files for release
lost
parents:
diff changeset
544 # if !@HAVE_SLEEP@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
545 extern unsigned int sleep (unsigned int n);
68fbca173508 Added generated files for release
lost
parents:
diff changeset
546 # endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
547 #elif defined GNULIB_POSIXCHECK
68fbca173508 Added generated files for release
lost
parents:
diff changeset
548 # undef sleep
68fbca173508 Added generated files for release
lost
parents:
diff changeset
549 # define sleep(n) \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
550 (GL_LINK_WARNING ("sleep is unportable - " \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
551 "use gnulib module sleep for portability"), \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
552 sleep (n))
68fbca173508 Added generated files for release
lost
parents:
diff changeset
553 #endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
554
68fbca173508 Added generated files for release
lost
parents:
diff changeset
555
68fbca173508 Added generated files for release
lost
parents:
diff changeset
556 #if @GNULIB_WRITE@ && @REPLACE_WRITE@ && @GNULIB_UNISTD_H_SIGPIPE@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
557 /* Write up to COUNT bytes starting at BUF to file descriptor FD.
68fbca173508 Added generated files for release
lost
parents:
diff changeset
558 See the POSIX:2001 specification
68fbca173508 Added generated files for release
lost
parents:
diff changeset
559 <http://www.opengroup.org/susv3xsh/write.html>. */
68fbca173508 Added generated files for release
lost
parents:
diff changeset
560 # undef write
68fbca173508 Added generated files for release
lost
parents:
diff changeset
561 # define write rpl_write
68fbca173508 Added generated files for release
lost
parents:
diff changeset
562 extern ssize_t write (int fd, const void *buf, size_t count);
68fbca173508 Added generated files for release
lost
parents:
diff changeset
563 #endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
564
68fbca173508 Added generated files for release
lost
parents:
diff changeset
565
68fbca173508 Added generated files for release
lost
parents:
diff changeset
566 #ifdef FCHDIR_REPLACEMENT
68fbca173508 Added generated files for release
lost
parents:
diff changeset
567 /* gnulib internal function. */
68fbca173508 Added generated files for release
lost
parents:
diff changeset
568 extern void _gl_unregister_fd (int fd);
68fbca173508 Added generated files for release
lost
parents:
diff changeset
569 #endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
570
68fbca173508 Added generated files for release
lost
parents:
diff changeset
571
68fbca173508 Added generated files for release
lost
parents:
diff changeset
572 #ifdef __cplusplus
68fbca173508 Added generated files for release
lost
parents:
diff changeset
573 }
68fbca173508 Added generated files for release
lost
parents:
diff changeset
574 #endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
575
68fbca173508 Added generated files for release
lost
parents:
diff changeset
576
68fbca173508 Added generated files for release
lost
parents:
diff changeset
577 #endif /* _GL_UNISTD_H */
68fbca173508 Added generated files for release
lost
parents:
diff changeset
578 #endif /* _GL_UNISTD_H */