17 #ifndef _@GUARD_PREFIX@_UNISTD_H
20 @PRAGMA_SYSTEM_HEADER@
24 #if @HAVE_UNISTD_H@ && defined _GL_INCLUDING_UNISTD_H
31 #@INCLUDE_NEXT@ @NEXT_UNISTD_H@
38 # define _GL_INCLUDING_UNISTD_H
39 # @INCLUDE_NEXT@ @NEXT_UNISTD_H@
40 # undef _GL_INCLUDING_UNISTD_H
46 #if defined __FreeBSD__ && __FreeBSD__ < 14
49 #elif defined __APPLE__ && defined __MACH__ && defined SEEK_DATA
50 # ifdef __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__
51 # include <AvailabilityMacros.h>
53 # if (!defined MAC_OS_X_VERSION_MIN_REQUIRED \
54 || MAC_OS_X_VERSION_MIN_REQUIRED < 99990000)
55 # include <sys/fcntl.h>
62 #if @GNULIB_GETHOSTNAME@ && @UNISTD_H_HAVE_WINSOCK2_H@ \
63 && !defined _GL_INCLUDING_WINSOCK2_H
64 # define _GL_INCLUDING_WINSOCK2_H
65 # include <winsock2.h>
66 # undef _GL_INCLUDING_WINSOCK2_H
69 #if !defined _@GUARD_PREFIX@_UNISTD_H && !defined _GL_INCLUDING_WINSOCK2_H
70 #define _@GUARD_PREFIX@_UNISTD_H
74 #if !_GL_CONFIG_H_INCLUDED
75 #error "Please include config.h first."
89 #if (!(defined SEEK_CUR && defined SEEK_END && defined SEEK_SET) \
90 || ((@GNULIB_UNLINK@ || defined GNULIB_POSIXCHECK) \
91 && (defined _WIN32 && ! defined __CYGWIN__)) \
92 || ((@GNULIB_SYMLINKAT@ || defined GNULIB_POSIXCHECK) \
93 && defined __CYGWIN__)) \
94 && ! defined __GLIBC__
101 #if (@GNULIB_UNLINKAT@ || defined GNULIB_POSIXCHECK) \
102 && (defined __CYGWIN__ || defined __ANDROID__) \
103 && ! defined __GLIBC__
114 #if !defined __GLIBC__ && !defined __osf__
115 # define __need_system_stdlib_h
117 # undef __need_system_stdlib_h
124 #if defined _WIN32 && !defined __CYGWIN__
130 #if defined _WIN32 && !defined __CYGWIN__
131 # include <process.h>
137 #if ((@GNULIB_GETDOMAINNAME@ && (defined _AIX || defined __osf__)) \
138 || (@GNULIB_GETHOSTNAME@ && defined __TANDEM)) \
139 && !defined __GLIBC__
146 #if (@GNULIB_GETENTROPY@ || defined GNULIB_POSIXCHECK) \
147 && ((defined __APPLE__ && defined __MACH__) || defined __sun \
148 || defined __ANDROID__) \
149 && @UNISTD_H_HAVE_SYS_RANDOM_H@ \
150 && !defined __GLIBC__
151 # include <sys/random.h>
156 #if (@GNULIB_FCHOWNAT@ || defined GNULIB_POSIXCHECK) && defined __ANDROID__ \
157 && !defined __GLIBC__
158 # include <sys/stat.h>
164 #include <sys/types.h>
174 #if @GNULIB_GETOPT_POSIX@ && @GNULIB_UNISTD_H_GETOPT@ && !defined _GL_SYSTEM_GETOPT
175 # include <getopt-cdefs.h>
176 # include <getopt-pfx-core.h>
179 _GL_INLINE_HEADER_BEGIN
180 #ifndef _GL_UNISTD_INLINE
181 # define _GL_UNISTD_INLINE _GL_INLINE
186 #if @GNULIB_GETHOSTNAME@ && @UNISTD_H_HAVE_WINSOCK2_H@
187 # if !defined _@GUARD_PREFIX@_SYS_SOCKET_H
188 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
190 # define socket socket_used_without_including_sys_socket_h
192 # define connect connect_used_without_including_sys_socket_h
194 # define accept accept_used_without_including_sys_socket_h
196 # define bind bind_used_without_including_sys_socket_h
198 # define getpeername getpeername_used_without_including_sys_socket_h
200 # define getsockname getsockname_used_without_including_sys_socket_h
202 # define getsockopt getsockopt_used_without_including_sys_socket_h
204 # define listen listen_used_without_including_sys_socket_h
206 # define recv recv_used_without_including_sys_socket_h
208 # define send send_used_without_including_sys_socket_h
210 # define recvfrom recvfrom_used_without_including_sys_socket_h
212 # define sendto sendto_used_without_including_sys_socket_h
214 # define setsockopt setsockopt_used_without_including_sys_socket_h
216 # define shutdown shutdown_used_without_including_sys_socket_h
218 _GL_WARN_ON_USE (socket,
219 "socket() used without including <sys/socket.h>");
220 _GL_WARN_ON_USE (connect,
221 "connect() used without including <sys/socket.h>");
222 _GL_WARN_ON_USE (accept,
223 "accept() used without including <sys/socket.h>");
224 _GL_WARN_ON_USE (bind,
225 "bind() used without including <sys/socket.h>");
226 _GL_WARN_ON_USE (getpeername,
227 "getpeername() used without including <sys/socket.h>");
228 _GL_WARN_ON_USE (getsockname,
229 "getsockname() used without including <sys/socket.h>");
230 _GL_WARN_ON_USE (getsockopt,
231 "getsockopt() used without including <sys/socket.h>");
232 _GL_WARN_ON_USE (listen,
233 "listen() used without including <sys/socket.h>");
234 _GL_WARN_ON_USE (recv,
235 "recv() used without including <sys/socket.h>");
236 _GL_WARN_ON_USE (send,
237 "send() used without including <sys/socket.h>");
238 _GL_WARN_ON_USE (recvfrom,
239 "recvfrom() used without including <sys/socket.h>");
240 _GL_WARN_ON_USE (sendto,
241 "sendto() used without including <sys/socket.h>");
242 _GL_WARN_ON_USE (setsockopt,
243 "setsockopt() used without including <sys/socket.h>");
244 _GL_WARN_ON_USE (shutdown,
245 "shutdown() used without including <sys/socket.h>");
248 # if !defined _@GUARD_PREFIX@_SYS_SELECT_H
249 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
251 # define select select_used_without_including_sys_select_h
253 _GL_WARN_ON_USE (select,
254 "select() used without including <sys/select.h>");
262 # define STDIN_FILENO 0
264 #ifndef STDOUT_FILENO
265 # define STDOUT_FILENO 1
267 #ifndef STDERR_FILENO
268 # define STDERR_FILENO 2
284 # if @REPLACE_ACCESS@
285 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
287 # define access rpl_access
289 _GL_FUNCDECL_RPL (access,
int, (
const char *file,
int mode)
290 _GL_ARG_NONNULL ((1)));
291 _GL_CXXALIAS_RPL (access,
int, (
const char *file,
int mode));
292 # elif defined _WIN32 && !defined __CYGWIN__
293 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
295 # define access _access
297 _GL_CXXALIAS_MDA (access,
int, (
const char *file,
int mode));
299 _GL_CXXALIAS_SYS (access,
int, (
const char *file,
int mode));
301 _GL_CXXALIASWARN (access);
302 #elif defined GNULIB_POSIXCHECK
304 # if HAVE_RAW_DECL_ACCESS
306 _GL_WARN_ON_USE (access,
"access does not always support X_OK - "
307 "use gnulib module access for portability; "
308 "also, this function is a security risk - "
309 "use the gnulib module faccessat instead");
311 #elif @GNULIB_MDA_ACCESS@
315 # if defined _WIN32 && !defined __CYGWIN__
316 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
318 # define access _access
320 _GL_CXXALIAS_MDA (access,
int, (
const char *file,
int mode));
322 _GL_CXXALIAS_SYS (access,
int, (
const char *file,
int mode));
324 _GL_CXXALIASWARN (access);
329 # if defined _WIN32 && !defined __CYGWIN__
330 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
332 # define chdir _chdir
334 _GL_CXXALIAS_MDA (chdir,
int, (
const char *file));
336 _GL_CXXALIAS_SYS (chdir,
int, (
const char *file) _GL_ARG_NONNULL ((1)));
338 _GL_CXXALIASWARN (chdir);
339 #elif defined GNULIB_POSIXCHECK
341 # if HAVE_RAW_DECL_CHDIR
342 _GL_WARN_ON_USE (chown,
"chdir is not always in <unistd.h> - "
343 "use gnulib module chdir for portability");
345 #elif @GNULIB_MDA_CHDIR@
349 # if defined _WIN32 && !defined __CYGWIN__
350 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
352 # define chdir _chdir
354 _GL_CXXALIAS_MDA (chdir,
int, (
const char *file));
356 _GL_CXXALIAS_SYS (chdir,
int, (
const char *file) _GL_ARG_NONNULL ((1)));
358 _GL_CXXALIASWARN (chdir);
369 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
371 # define chown rpl_chown
373 _GL_FUNCDECL_RPL (chown,
int, (
const char *file, uid_t uid, gid_t gid)
374 _GL_ARG_NONNULL ((1)));
375 _GL_CXXALIAS_RPL (chown,
int, (
const char *file, uid_t uid, gid_t gid));
378 _GL_FUNCDECL_SYS (chown,
int, (
const char *file, uid_t uid, gid_t gid)
379 _GL_ARG_NONNULL ((1)));
381 _GL_CXXALIAS_SYS (chown,
int, (
const char *file, uid_t uid, gid_t gid));
383 _GL_CXXALIASWARN (chown);
384 #elif defined GNULIB_POSIXCHECK
386 # if HAVE_RAW_DECL_CHOWN
387 _GL_WARN_ON_USE (chown,
"chown fails to follow symlinks on some systems and "
388 "doesn't treat a uid or gid of -1 on some systems - "
389 "use gnulib module chown for portability");
397 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
399 # define close rpl_close
401 _GL_FUNCDECL_RPL (close,
int, (
int fd));
402 _GL_CXXALIAS_RPL (close,
int, (
int fd));
403 # elif defined _WIN32 && !defined __CYGWIN__
404 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
406 # define close _close
408 _GL_CXXALIAS_MDA (close,
int, (
int fd));
410 _GL_CXXALIAS_SYS (close,
int, (
int fd));
412 _GL_CXXALIASWARN (close);
413 #elif @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@
415 # define close close_used_without_requesting_gnulib_module_close
416 #elif defined GNULIB_POSIXCHECK
419 _GL_WARN_ON_USE (close,
"close does not portably work on sockets - "
420 "use gnulib module close for portability");
421 #elif @GNULIB_MDA_CLOSE@
425 # if defined _WIN32 && !defined __CYGWIN__
426 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
428 # define close _close
430 _GL_CXXALIAS_MDA (close,
int, (
int fd));
432 _GL_CXXALIAS_SYS (close,
int, (
int fd));
434 _GL_CXXALIASWARN (close);
438 #if @GNULIB_COPY_FILE_RANGE@
439 # if @REPLACE_COPY_FILE_RANGE@
440 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
441 # undef copy_file_range
442 # define copy_file_range rpl_copy_file_range
444 _GL_FUNCDECL_RPL (copy_file_range, ssize_t, (
int ifd, off_t *ipos,
445 int ofd, off_t *opos,
446 size_t len,
unsigned flags));
447 _GL_CXXALIAS_RPL (copy_file_range, ssize_t, (
int ifd, off_t *ipos,
448 int ofd, off_t *opos,
449 size_t len,
unsigned flags));
451 # if !@HAVE_COPY_FILE_RANGE@
452 _GL_FUNCDECL_SYS (copy_file_range, ssize_t, (
int ifd, off_t *ipos,
453 int ofd, off_t *opos,
454 size_t len,
unsigned flags));
456 _GL_CXXALIAS_SYS (copy_file_range, ssize_t, (
int ifd, off_t *ipos,
457 int ofd, off_t *opos,
458 size_t len,
unsigned flags));
460 _GL_CXXALIASWARN (copy_file_range);
461 #elif defined GNULIB_POSIXCHECK
462 # undef copy_file_range
463 # if HAVE_RAW_DECL_COPY_FILE_RANGE
464 _GL_WARN_ON_USE (copy_file_range,
465 "copy_file_range is unportable - "
466 "use gnulib module copy_file_range for portability");
473 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
476 _GL_FUNCDECL_RPL (dup,
int, (
int oldfd));
477 _GL_CXXALIAS_RPL (dup,
int, (
int oldfd));
478 # elif defined _WIN32 && !defined __CYGWIN__
479 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
483 _GL_CXXALIAS_MDA (dup,
int, (
int oldfd));
485 _GL_CXXALIAS_SYS (dup,
int, (
int oldfd));
487 _GL_CXXALIASWARN (dup);
488 #elif defined GNULIB_POSIXCHECK
490 # if HAVE_RAW_DECL_DUP
491 _GL_WARN_ON_USE (dup,
"dup is unportable - "
492 "use gnulib module dup for portability");
494 #elif @GNULIB_MDA_DUP@
498 # if defined _WIN32 && !defined __CYGWIN__
499 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
503 _GL_CXXALIAS_MDA (dup,
int, (
int oldfd));
505 _GL_CXXALIAS_SYS (dup,
int, (
int oldfd));
507 _GL_CXXALIASWARN (dup);
518 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
519 # define dup2 rpl_dup2
521 _GL_FUNCDECL_RPL (dup2,
int, (
int oldfd,
int newfd));
522 _GL_CXXALIAS_RPL (dup2,
int, (
int oldfd,
int newfd));
523 # elif defined _WIN32 && !defined __CYGWIN__
524 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
528 _GL_CXXALIAS_MDA (dup2,
int, (
int oldfd,
int newfd));
530 _GL_CXXALIAS_SYS (dup2,
int, (
int oldfd,
int newfd));
532 _GL_CXXALIASWARN (dup2);
533 #elif defined GNULIB_POSIXCHECK
535 # if HAVE_RAW_DECL_DUP2
536 _GL_WARN_ON_USE (dup2,
"dup2 is unportable - "
537 "use gnulib module dup2 for portability");
539 #elif @GNULIB_MDA_DUP2@
543 # if defined _WIN32 && !defined __CYGWIN__
544 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
548 _GL_CXXALIAS_MDA (dup2,
int, (
int oldfd,
int newfd));
550 _GL_CXXALIAS_SYS (dup2,
int, (
int oldfd,
int newfd));
552 _GL_CXXALIASWARN (dup2);
566 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
568 # define dup3 rpl_dup3
570 _GL_FUNCDECL_RPL (dup3,
int, (
int oldfd,
int newfd,
int flags));
571 _GL_CXXALIAS_RPL (dup3,
int, (
int oldfd,
int newfd,
int flags));
574 _GL_FUNCDECL_SYS (dup3,
int, (
int oldfd,
int newfd,
int flags));
576 _GL_CXXALIAS_SYS (dup3,
int, (
int oldfd,
int newfd,
int flags));
579 _GL_CXXALIASWARN (dup3);
581 #elif defined GNULIB_POSIXCHECK
583 # if HAVE_RAW_DECL_DUP3
584 _GL_WARN_ON_USE (dup3,
"dup3 is unportable - "
585 "use gnulib module dup3 for portability");
591 # if defined __CYGWIN__ && !defined __i386__
596 _GL_EXTERN_C __declspec(dllimport)
char **environ;
598 # if !@HAVE_DECL_ENVIRON@
601 # if defined __APPLE__ && defined __MACH__
602 # include <TargetConditionals.h>
603 # if !TARGET_OS_IPHONE && !TARGET_IPHONE_SIMULATOR
604 # define _GL_USE_CRT_EXTERNS
607 # ifdef _GL_USE_CRT_EXTERNS
608 # include <crt_externs.h>
609 # define environ (*_NSGetEnviron ())
614 extern char **environ;
620 #elif defined GNULIB_POSIXCHECK
621 # if HAVE_RAW_DECL_ENVIRON
622 _GL_UNISTD_INLINE
char ***
623 _GL_WARN_ON_USE_ATTRIBUTE (
"environ is unportable - "
624 "use gnulib module environ for portability")
630 # define environ (*rpl_environ ())
635 #if @GNULIB_EUIDACCESS@
638 # if !@HAVE_EUIDACCESS@
639 _GL_FUNCDECL_SYS (euidaccess,
int, (
const char *filename,
int mode)
640 _GL_ARG_NONNULL ((1)));
642 _GL_CXXALIAS_SYS (euidaccess,
int, (
const char *filename,
int mode));
643 _GL_CXXALIASWARN (euidaccess);
644 # if defined GNULIB_POSIXCHECK
646 _GL_WARN_ON_USE (euidaccess,
"the euidaccess function is a security risk - "
647 "use the gnulib module faccessat instead");
649 #elif defined GNULIB_POSIXCHECK
651 # if HAVE_RAW_DECL_EUIDACCESS
652 _GL_WARN_ON_USE (euidaccess,
"euidaccess is unportable - "
653 "use gnulib module euidaccess for portability");
660 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
662 # define execl rpl_execl
664 _GL_FUNCDECL_RPL (execl,
int, (
const char *program,
const char *arg, ...)
665 _GL_ARG_NONNULL ((1)));
666 _GL_CXXALIAS_RPL (execl,
int, (
const char *program,
const char *arg, ...));
668 _GL_CXXALIAS_SYS (execl,
int, (
const char *program,
const char *arg, ...));
670 _GL_CXXALIASWARN (execl);
671 #elif defined GNULIB_POSIXCHECK
673 # if HAVE_RAW_DECL_EXECL
674 _GL_WARN_ON_USE (execl,
"execl behaves very differently on mingw - "
675 "use gnulib module execl for portability");
677 #elif @GNULIB_MDA_EXECL@
681 # if defined _WIN32 && !defined __CYGWIN__
682 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
684 # define execl _execl
686 _GL_CXXALIAS_MDA (execl, intptr_t, (
const char *program,
const char *arg, ...));
688 _GL_CXXALIAS_SYS (execl,
int, (
const char *program,
const char *arg, ...));
690 _GL_CXXALIASWARN (execl);
694 # if @REPLACE_EXECLE@
695 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
697 # define execle rpl_execle
699 _GL_FUNCDECL_RPL (execle,
int, (
const char *program,
const char *arg, ...)
700 _GL_ARG_NONNULL ((1)));
701 _GL_CXXALIAS_RPL (execle,
int, (
const char *program,
const char *arg, ...));
703 _GL_CXXALIAS_SYS (execle,
int, (
const char *program,
const char *arg, ...));
705 _GL_CXXALIASWARN (execle);
706 #elif defined GNULIB_POSIXCHECK
708 # if HAVE_RAW_DECL_EXECLE
709 _GL_WARN_ON_USE (execle,
"execle behaves very differently on mingw - "
710 "use gnulib module execle for portability");
712 #elif @GNULIB_MDA_EXECLE@
716 # if defined _WIN32 && !defined __CYGWIN__
717 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
719 # define execle _execle
721 _GL_CXXALIAS_MDA (execle, intptr_t,
722 (
const char *program,
const char *arg, ...));
724 _GL_CXXALIAS_SYS (execle,
int, (
const char *program,
const char *arg, ...));
726 _GL_CXXALIASWARN (execle);
730 # if @REPLACE_EXECLP@
731 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
733 # define execlp rpl_execlp
735 _GL_FUNCDECL_RPL (execlp,
int, (
const char *program,
const char *arg, ...)
736 _GL_ARG_NONNULL ((1)));
737 _GL_CXXALIAS_RPL (execlp,
int, (
const char *program,
const char *arg, ...));
739 _GL_CXXALIAS_SYS (execlp,
int, (
const char *program,
const char *arg, ...));
741 _GL_CXXALIASWARN (execlp);
742 #elif defined GNULIB_POSIXCHECK
744 # if HAVE_RAW_DECL_EXECLP
745 _GL_WARN_ON_USE (execlp,
"execlp behaves very differently on mingw - "
746 "use gnulib module execlp for portability");
748 #elif @GNULIB_MDA_EXECLP@
752 # if defined _WIN32 && !defined __CYGWIN__
753 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
755 # define execlp _execlp
757 _GL_CXXALIAS_MDA (execlp, intptr_t,
758 (
const char *program,
const char *arg, ...));
760 _GL_CXXALIAS_SYS (execlp,
int, (
const char *program,
const char *arg, ...));
762 _GL_CXXALIASWARN (execlp);
768 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
770 # define execv rpl_execv
772 _GL_FUNCDECL_RPL (execv,
int, (
const char *program,
char *
const *argv)
773 _GL_ARG_NONNULL ((1, 2)));
774 _GL_CXXALIAS_RPL (execv,
int, (
const char *program,
char *
const *argv));
776 _GL_CXXALIAS_SYS (execv,
int, (
const char *program,
char *
const *argv));
778 _GL_CXXALIASWARN (execv);
779 #elif defined GNULIB_POSIXCHECK
781 # if HAVE_RAW_DECL_EXECV
782 _GL_WARN_ON_USE (execv,
"execv behaves very differently on mingw - "
783 "use gnulib module execv for portability");
785 #elif @GNULIB_MDA_EXECV@
789 # if defined _WIN32 && !defined __CYGWIN__
790 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
792 # define execv _execv
794 _GL_CXXALIAS_MDA_CAST (execv, intptr_t,
795 (
const char *program,
char *
const *argv));
797 _GL_CXXALIAS_SYS (execv,
int, (
const char *program,
char *
const *argv));
799 _GL_CXXALIASWARN (execv);
803 # if @REPLACE_EXECVE@
804 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
806 # define execve rpl_execve
808 _GL_FUNCDECL_RPL (execve,
int,
809 (
const char *program,
char *
const *argv,
char *
const *env)
810 _GL_ARG_NONNULL ((1, 2)));
811 _GL_CXXALIAS_RPL (execve,
int,
812 (
const char *program,
char *
const *argv,
char *
const *env));
814 _GL_CXXALIAS_SYS (execve,
int,
815 (
const char *program,
char *
const *argv,
char *
const *env));
817 _GL_CXXALIASWARN (execve);
818 #elif defined GNULIB_POSIXCHECK
820 # if HAVE_RAW_DECL_EXECVE
821 _GL_WARN_ON_USE (execve,
"execve behaves very differently on mingw - "
822 "use gnulib module execve for portability");
824 #elif @GNULIB_MDA_EXECVE@
828 # if defined _WIN32 && !defined __CYGWIN__
829 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
831 # define execve _execve
833 _GL_CXXALIAS_MDA_CAST (execve, intptr_t,
834 (
const char *program,
char *
const *argv,
837 _GL_CXXALIAS_SYS (execve,
int,
838 (
const char *program,
char *
const *argv,
char *
const *env));
840 _GL_CXXALIASWARN (execve);
844 # if @REPLACE_EXECVP@
845 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
847 # define execvp rpl_execvp
849 _GL_FUNCDECL_RPL (execvp,
int, (
const char *program,
char *
const *argv)
850 _GL_ARG_NONNULL ((1, 2)));
851 _GL_CXXALIAS_RPL (execvp,
int, (
const char *program,
char *
const *argv));
853 _GL_CXXALIAS_SYS (execvp,
int, (
const char *program,
char *
const *argv));
855 _GL_CXXALIASWARN (execvp);
856 #elif defined GNULIB_POSIXCHECK
858 # if HAVE_RAW_DECL_EXECVP
859 _GL_WARN_ON_USE (execvp,
"execvp behaves very differently on mingw - "
860 "use gnulib module execvp for portability");
862 #elif @GNULIB_MDA_EXECVP@
866 # if defined _WIN32 && !defined __CYGWIN__
867 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
869 # define execvp _execvp
871 _GL_CXXALIAS_MDA_CAST (execvp, intptr_t,
872 (
const char *program,
char *
const *argv));
874 _GL_CXXALIAS_SYS (execvp,
int, (
const char *program,
char *
const *argv));
876 _GL_CXXALIASWARN (execvp);
880 # if @REPLACE_EXECVPE@
881 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
883 # define execvpe rpl_execvpe
885 _GL_FUNCDECL_RPL (execvpe,
int,
886 (
const char *program,
char *
const *argv,
char *
const *env)
887 _GL_ARG_NONNULL ((1, 2)));
888 _GL_CXXALIAS_RPL (execvpe,
int,
889 (
const char *program,
char *
const *argv,
char *
const *env));
891 # if !@HAVE_DECL_EXECVPE@
892 _GL_FUNCDECL_SYS (execvpe,
int,
893 (
const char *program,
char *
const *argv,
char *
const *env)
894 _GL_ARG_NONNULL ((1, 2)));
896 _GL_CXXALIAS_SYS (execvpe,
int,
897 (
const char *program,
char *
const *argv,
char *
const *env));
900 _GL_CXXALIASWARN (execvpe);
902 #elif defined GNULIB_POSIXCHECK
904 # if HAVE_RAW_DECL_EXECVPE
905 _GL_WARN_ON_USE (execvpe,
"execvpe behaves very differently on mingw - "
906 "use gnulib module execvpe for portability");
908 #elif @GNULIB_MDA_EXECVPE@
913 # if defined _WIN32 && !defined __CYGWIN__
914 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
916 # define execvpe _execvpe
918 _GL_CXXALIAS_MDA_CAST (execvpe, intptr_t,
919 (
const char *program,
char *
const *argv,
921 # elif @HAVE_EXECVPE@
922 # if !@HAVE_DECL_EXECVPE@
923 _GL_FUNCDECL_SYS (execvpe,
int,
924 (
const char *program,
char *
const *argv,
char *
const *env)
925 _GL_ARG_NONNULL ((1, 2)));
927 _GL_CXXALIAS_SYS (execvpe,
int,
928 (
const char *program,
char *
const *argv,
char *
const *env));
930 # if (defined _WIN32 && !defined __CYGWIN__) || @HAVE_EXECVPE@
931 _GL_CXXALIASWARN (execvpe);
936 #if @GNULIB_FACCESSAT@
937 # if @REPLACE_FACCESSAT@
938 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
940 # define faccessat rpl_faccessat
942 _GL_FUNCDECL_RPL (faccessat,
int,
943 (
int fd,
char const *name,
int mode,
int flag)
944 _GL_ARG_NONNULL ((2)));
945 _GL_CXXALIAS_RPL (faccessat,
int,
946 (
int fd,
char const *name,
int mode,
int flag));
948 # if !@HAVE_FACCESSAT@
949 _GL_FUNCDECL_SYS (faccessat,
int,
950 (
int fd,
char const *file,
int mode,
int flag)
951 _GL_ARG_NONNULL ((2)));
953 _GL_CXXALIAS_SYS (faccessat,
int,
954 (
int fd,
char const *file,
int mode,
int flag));
957 _GL_CXXALIASWARN (faccessat);
959 #elif defined GNULIB_POSIXCHECK
961 # if HAVE_RAW_DECL_FACCESSAT
962 _GL_WARN_ON_USE (faccessat,
"faccessat is not portable - "
963 "use gnulib module faccessat for portability");
975 _GL_FUNCDECL_SYS (fchdir,
int, (
int ));
978 _GL_EXTERN_C
int _gl_register_fd (
int fd,
const char *filename)
979 _GL_ARG_NONNULL ((2));
980 _GL_EXTERN_C
void _gl_unregister_fd (
int fd);
981 _GL_EXTERN_C
int _gl_register_dup (
int oldfd,
int newfd);
982 _GL_EXTERN_C
const char *_gl_directory_name (
int fd);
985 # if !@HAVE_DECL_FCHDIR@
986 _GL_FUNCDECL_SYS (fchdir,
int, (
int ));
989 _GL_CXXALIAS_SYS (fchdir,
int, (
int ));
990 _GL_CXXALIASWARN (fchdir);
991 #elif defined GNULIB_POSIXCHECK
993 # if HAVE_RAW_DECL_FCHDIR
994 _GL_WARN_ON_USE (fchdir,
"fchdir is unportable - "
995 "use gnulib module fchdir for portability");
1000 #if @GNULIB_FCHOWNAT@
1001 # if @REPLACE_FCHOWNAT@
1002 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1004 # define fchownat rpl_fchownat
1006 _GL_FUNCDECL_RPL (fchownat,
int, (
int fd,
char const *file,
1007 uid_t owner, gid_t group,
int flag)
1008 _GL_ARG_NONNULL ((2)));
1009 _GL_CXXALIAS_RPL (fchownat,
int, (
int fd,
char const *file,
1010 uid_t owner, gid_t group,
int flag));
1012 # if !@HAVE_FCHOWNAT@
1013 _GL_FUNCDECL_SYS (fchownat,
int, (
int fd,
char const *file,
1014 uid_t owner, gid_t group,
int flag)
1015 _GL_ARG_NONNULL ((2)));
1017 _GL_CXXALIAS_SYS (fchownat,
int, (
int fd,
char const *file,
1018 uid_t owner, gid_t group,
int flag));
1020 _GL_CXXALIASWARN (fchownat);
1021 #elif defined GNULIB_POSIXCHECK
1023 # if HAVE_RAW_DECL_FCHOWNAT
1024 _GL_WARN_ON_USE (fchownat,
"fchownat is not portable - "
1025 "use gnulib module fchownat for portability");
1030 #if @GNULIB_FDATASYNC@
1035 # if @REPLACE_FDATASYNC@
1036 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1038 # define fdatasync rpl_fdatasync
1040 _GL_FUNCDECL_RPL (fdatasync,
int, (
int fd));
1041 _GL_CXXALIAS_RPL (fdatasync,
int, (
int fd));
1043 # if !@HAVE_FDATASYNC@|| !@HAVE_DECL_FDATASYNC@
1044 _GL_FUNCDECL_SYS (fdatasync,
int, (
int fd));
1046 _GL_CXXALIAS_SYS (fdatasync,
int, (
int fd));
1049 _GL_CXXALIASWARN (fdatasync);
1051 #elif defined GNULIB_POSIXCHECK
1053 # if HAVE_RAW_DECL_FDATASYNC
1054 _GL_WARN_ON_USE (fdatasync,
"fdatasync is unportable - "
1055 "use gnulib module fdatasync for portability");
1066 _GL_FUNCDECL_SYS (fsync,
int, (
int fd));
1068 _GL_CXXALIAS_SYS (fsync,
int, (
int fd));
1069 _GL_CXXALIASWARN (fsync);
1070 #elif defined GNULIB_POSIXCHECK
1072 # if HAVE_RAW_DECL_FSYNC
1073 _GL_WARN_ON_USE (fsync,
"fsync is unportable - "
1074 "use gnulib module fsync for portability");
1079 #if @GNULIB_FTRUNCATE@
1084 # if @REPLACE_FTRUNCATE@
1085 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1087 # define ftruncate rpl_ftruncate
1089 _GL_FUNCDECL_RPL (ftruncate,
int, (
int fd, off_t length));
1090 _GL_CXXALIAS_RPL (ftruncate,
int, (
int fd, off_t length));
1092 # if !@HAVE_FTRUNCATE@
1093 _GL_FUNCDECL_SYS (ftruncate,
int, (
int fd, off_t length));
1095 _GL_CXXALIAS_SYS (ftruncate,
int, (
int fd, off_t length));
1098 _GL_CXXALIASWARN (ftruncate);
1100 #elif defined GNULIB_POSIXCHECK
1102 # if HAVE_RAW_DECL_FTRUNCATE
1103 _GL_WARN_ON_USE (ftruncate,
"ftruncate is unportable - "
1104 "use gnulib module ftruncate for portability");
1120 # if @REPLACE_GETCWD@
1121 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1122 # define getcwd rpl_getcwd
1124 _GL_FUNCDECL_RPL (getcwd,
char *, (
char *buf,
size_t size));
1125 _GL_CXXALIAS_RPL (getcwd,
char *, (
char *buf,
size_t size));
1126 # elif defined _WIN32 && !defined __CYGWIN__
1127 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1129 # define getcwd _getcwd
1131 _GL_CXXALIAS_MDA (getcwd,
char *, (
char *buf,
size_t size));
1135 _GL_CXXALIAS_SYS_CAST (getcwd,
char *, (
char *buf,
size_t size));
1137 _GL_CXXALIASWARN (getcwd);
1138 #elif defined GNULIB_POSIXCHECK
1140 # if HAVE_RAW_DECL_GETCWD
1141 _GL_WARN_ON_USE (getcwd,
"getcwd is unportable - "
1142 "use gnulib module getcwd for portability");
1144 #elif @GNULIB_MDA_GETCWD@
1148 # if defined _WIN32 && !defined __CYGWIN__
1149 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1151 # define getcwd _getcwd
1155 _GL_CXXALIAS_MDA_CAST (getcwd,
char *, (
char *buf,
size_t size));
1157 _GL_CXXALIAS_SYS_CAST (getcwd,
char *, (
char *buf,
size_t size));
1159 _GL_CXXALIASWARN (getcwd);
1163 #if @GNULIB_GETDOMAINNAME@
1174 # if @REPLACE_GETDOMAINNAME@
1175 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1176 # undef getdomainname
1177 # define getdomainname rpl_getdomainname
1179 _GL_FUNCDECL_RPL (getdomainname,
int, (
char *name,
size_t len)
1180 _GL_ARG_NONNULL ((1)));
1181 _GL_CXXALIAS_RPL (getdomainname,
int, (
char *name,
size_t len));
1183 # if !@HAVE_DECL_GETDOMAINNAME@
1184 _GL_FUNCDECL_SYS (getdomainname,
int, (
char *name,
size_t len)
1185 _GL_ARG_NONNULL ((1)));
1187 _GL_CXXALIAS_SYS (getdomainname,
int, (
char *name,
size_t len));
1190 _GL_CXXALIASWARN (getdomainname);
1192 #elif defined GNULIB_POSIXCHECK
1193 # undef getdomainname
1194 # if HAVE_RAW_DECL_GETDOMAINNAME
1195 _GL_WARN_ON_USE (getdomainname,
"getdomainname is unportable - "
1196 "use gnulib module getdomainname for portability");
1201 #if @GNULIB_GETDTABLESIZE@
1204 # if @REPLACE_GETDTABLESIZE@
1205 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1206 # undef getdtablesize
1207 # define getdtablesize rpl_getdtablesize
1209 _GL_FUNCDECL_RPL (getdtablesize,
int, (
void));
1210 _GL_CXXALIAS_RPL (getdtablesize,
int, (
void));
1212 # if !@HAVE_GETDTABLESIZE@
1213 _GL_FUNCDECL_SYS (getdtablesize,
int, (
void));
1217 _GL_CXXALIAS_SYS_CAST (getdtablesize,
int, (
void));
1219 _GL_CXXALIASWARN (getdtablesize);
1220 #elif defined GNULIB_POSIXCHECK
1221 # undef getdtablesize
1222 # if HAVE_RAW_DECL_GETDTABLESIZE
1223 _GL_WARN_ON_USE (getdtablesize,
"getdtablesize is unportable - "
1224 "use gnulib module getdtablesize for portability");
1229 #if @GNULIB_GETENTROPY@
1231 # if @REPLACE_GETENTROPY@
1232 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1234 # define getentropy rpl_getentropy
1236 _GL_FUNCDECL_RPL (getentropy,
int, (
void *buffer,
size_t length));
1237 _GL_CXXALIAS_RPL (getentropy,
int, (
void *buffer,
size_t length));
1239 # if !@HAVE_GETENTROPY@
1240 _GL_FUNCDECL_SYS (getentropy,
int, (
void *buffer,
size_t length));
1242 _GL_CXXALIAS_SYS (getentropy,
int, (
void *buffer,
size_t length));
1245 _GL_CXXALIASWARN (getentropy);
1247 #elif defined GNULIB_POSIXCHECK
1249 # if HAVE_RAW_DECL_GETENTROPY
1250 _GL_WARN_ON_USE (getentropy,
"getentropy is unportable - "
1251 "use gnulib module getentropy for portability");
1256 #if @GNULIB_GETGROUPS@
1262 # if @REPLACE_GETGROUPS@
1263 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1265 # define getgroups rpl_getgroups
1267 _GL_FUNCDECL_RPL (getgroups,
int, (
int n, gid_t *groups));
1268 _GL_CXXALIAS_RPL (getgroups,
int, (
int n, gid_t *groups));
1270 # if !@HAVE_GETGROUPS@
1271 _GL_FUNCDECL_SYS (getgroups,
int, (
int n, gid_t *groups));
1273 _GL_CXXALIAS_SYS (getgroups,
int, (
int n, gid_t *groups));
1275 _GL_CXXALIASWARN (getgroups);
1276 #elif defined GNULIB_POSIXCHECK
1278 # if HAVE_RAW_DECL_GETGROUPS
1279 _GL_WARN_ON_USE (getgroups,
"getgroups is unportable - "
1280 "use gnulib module getgroups for portability");
1285 #if @GNULIB_GETHOSTNAME@
1293 # if @UNISTD_H_HAVE_WINSOCK2_H@
1294 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1296 # define gethostname rpl_gethostname
1298 _GL_FUNCDECL_RPL (gethostname,
int, (
char *name,
size_t len)
1299 _GL_ARG_NONNULL ((1)));
1300 _GL_CXXALIAS_RPL (gethostname,
int, (
char *name,
size_t len));
1302 # if !@HAVE_GETHOSTNAME@
1303 _GL_FUNCDECL_SYS (gethostname,
int, (
char *name,
size_t len)
1304 _GL_ARG_NONNULL ((1)));
1309 _GL_CXXALIAS_SYS_CAST (gethostname,
int, (
char *name,
size_t len));
1311 _GL_CXXALIASWARN (gethostname);
1312 #elif @UNISTD_H_HAVE_WINSOCK2_H@
1314 # define gethostname gethostname_used_without_requesting_gnulib_module_gethostname
1315 #elif defined GNULIB_POSIXCHECK
1317 # if HAVE_RAW_DECL_GETHOSTNAME
1318 _GL_WARN_ON_USE (gethostname,
"gethostname is unportable - "
1319 "use gnulib module gethostname for portability");
1324 #if @GNULIB_GETLOGIN@
1335 # if !@HAVE_DECL_GETLOGIN@
1336 _GL_FUNCDECL_SYS (getlogin,
char *, (
void));
1338 _GL_CXXALIAS_SYS (getlogin,
char *, (
void));
1339 _GL_CXXALIASWARN (getlogin);
1340 #elif defined GNULIB_POSIXCHECK
1342 # if HAVE_RAW_DECL_GETLOGIN
1343 _GL_WARN_ON_USE (getlogin,
"getlogin is unportable - "
1344 "use gnulib module getlogin for portability");
1349 #if @GNULIB_GETLOGIN_R@
1364 # if @REPLACE_GETLOGIN_R@
1365 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1366 # define getlogin_r rpl_getlogin_r
1368 _GL_FUNCDECL_RPL (getlogin_r,
int, (
char *name,
size_t size)
1369 _GL_ARG_NONNULL ((1)));
1370 _GL_CXXALIAS_RPL (getlogin_r,
int, (
char *name,
size_t size));
1372 # if !@HAVE_DECL_GETLOGIN_R@
1373 _GL_FUNCDECL_SYS (getlogin_r,
int, (
char *name,
size_t size)
1374 _GL_ARG_NONNULL ((1)));
1378 _GL_CXXALIAS_SYS_CAST (getlogin_r,
int, (
char *name,
size_t size));
1381 _GL_CXXALIASWARN (getlogin_r);
1383 #elif defined GNULIB_POSIXCHECK
1385 # if HAVE_RAW_DECL_GETLOGIN_R
1386 _GL_WARN_ON_USE (getlogin_r,
"getlogin_r is unportable - "
1387 "use gnulib module getlogin_r for portability");
1392 #if @GNULIB_GETPAGESIZE@
1393 # if @REPLACE_GETPAGESIZE@
1394 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1395 # define getpagesize rpl_getpagesize
1397 _GL_FUNCDECL_RPL (getpagesize,
int, (
void));
1398 _GL_CXXALIAS_RPL (getpagesize,
int, (
void));
1403 _GL_FUNCDECL_SYS (getpagesize,
int, (
void));
1405 # if !@HAVE_GETPAGESIZE@
1406 # if !defined getpagesize
1408 # if !defined _gl_getpagesize && defined _SC_PAGESIZE
1409 # if ! (defined __VMS && __VMS_VER < 70000000)
1410 # define _gl_getpagesize() sysconf (_SC_PAGESIZE)
1414 # if !defined _gl_getpagesize && defined __VMS
1416 # define _gl_getpagesize() 8192
1418 # define _gl_getpagesize() 512
1422 # if !defined _gl_getpagesize && @HAVE_OS_H@
1424 # if defined B_PAGE_SIZE
1425 # define _gl_getpagesize() B_PAGE_SIZE
1429 # if !defined _gl_getpagesize && defined __amigaos4__
1430 # define _gl_getpagesize() 2048
1433 # if !defined _gl_getpagesize && @HAVE_SYS_PARAM_H@
1434 # include <sys/param.h>
1435 # ifdef EXEC_PAGESIZE
1436 # define _gl_getpagesize() EXEC_PAGESIZE
1442 # define _gl_getpagesize() (NBPG * CLSIZE)
1445 # define _gl_getpagesize() NBPC
1450 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1451 # define getpagesize() _gl_getpagesize ()
1453 # if !GNULIB_defined_getpagesize_function
1454 _GL_UNISTD_INLINE
int
1457 return _gl_getpagesize ();
1459 # define GNULIB_defined_getpagesize_function 1
1465 _GL_CXXALIAS_SYS_CAST (getpagesize,
int, (
void));
1467 # if @HAVE_DECL_GETPAGESIZE@
1468 _GL_CXXALIASWARN (getpagesize);
1470 #elif defined GNULIB_POSIXCHECK
1472 # if HAVE_RAW_DECL_GETPAGESIZE
1473 _GL_WARN_ON_USE (getpagesize,
"getpagesize is unportable - "
1474 "use gnulib module getpagesize for portability");
1479 #if @GNULIB_GETPASS@
1484 # if (@GNULIB_GETPASS@ && @REPLACE_GETPASS@) \
1485 || (@GNULIB_GETPASS_GNU@ && @REPLACE_GETPASS_FOR_GETPASS_GNU@)
1486 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1488 # define getpass rpl_getpass
1490 _GL_FUNCDECL_RPL (getpass,
char *, (
const char *prompt)
1491 _GL_ARG_NONNULL ((1)));
1492 _GL_CXXALIAS_RPL (getpass,
char *, (
const char *prompt));
1494 # if !@HAVE_GETPASS@
1495 _GL_FUNCDECL_SYS (getpass,
char *, (
const char *prompt)
1496 _GL_ARG_NONNULL ((1)));
1498 _GL_CXXALIAS_SYS (getpass,
char *, (
const char *prompt));
1500 _GL_CXXALIASWARN (getpass);
1501 #elif defined GNULIB_POSIXCHECK
1503 # if HAVE_RAW_DECL_GETPASS
1504 _GL_WARN_ON_USE (getpass,
"getpass is unportable - "
1505 "use gnulib module getpass or getpass-gnu for portability");
1510 #if @GNULIB_MDA_GETPID@
1514 # if defined _WIN32 && !defined __CYGWIN__
1515 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1517 # define getpid _getpid
1519 _GL_CXXALIAS_MDA (getpid,
int, (
void));
1521 _GL_CXXALIAS_SYS (getpid, pid_t, (
void));
1523 _GL_CXXALIASWARN (getpid);
1527 #if @GNULIB_GETUSERSHELL@
1530 # if !@HAVE_DECL_GETUSERSHELL@
1531 _GL_FUNCDECL_SYS (getusershell,
char *, (
void));
1533 _GL_CXXALIAS_SYS (getusershell,
char *, (
void));
1534 _GL_CXXALIASWARN (getusershell);
1535 #elif defined GNULIB_POSIXCHECK
1536 # undef getusershell
1537 # if HAVE_RAW_DECL_GETUSERSHELL
1538 _GL_WARN_ON_USE (getusershell,
"getusershell is unportable - "
1539 "use gnulib module getusershell for portability");
1543 #if @GNULIB_GETUSERSHELL@
1545 # if !@HAVE_DECL_GETUSERSHELL@
1546 _GL_FUNCDECL_SYS (setusershell,
void, (
void));
1548 _GL_CXXALIAS_SYS (setusershell,
void, (
void));
1549 _GL_CXXALIASWARN (setusershell);
1550 #elif defined GNULIB_POSIXCHECK
1551 # undef setusershell
1552 # if HAVE_RAW_DECL_SETUSERSHELL
1553 _GL_WARN_ON_USE (setusershell,
"setusershell is unportable - "
1554 "use gnulib module getusershell for portability");
1558 #if @GNULIB_GETUSERSHELL@
1561 # if !@HAVE_DECL_GETUSERSHELL@
1562 _GL_FUNCDECL_SYS (endusershell,
void, (
void));
1564 _GL_CXXALIAS_SYS (endusershell,
void, (
void));
1565 _GL_CXXALIASWARN (endusershell);
1566 #elif defined GNULIB_POSIXCHECK
1567 # undef endusershell
1568 # if HAVE_RAW_DECL_ENDUSERSHELL
1569 _GL_WARN_ON_USE (endusershell,
"endusershell is unportable - "
1570 "use gnulib module getusershell for portability");
1575 #if @GNULIB_GROUP_MEMBER@
1577 # if !@HAVE_GROUP_MEMBER@
1578 _GL_FUNCDECL_SYS (group_member,
int, (gid_t gid));
1580 _GL_CXXALIAS_SYS (group_member,
int, (gid_t gid));
1581 _GL_CXXALIASWARN (group_member);
1582 #elif defined GNULIB_POSIXCHECK
1583 # undef group_member
1584 # if HAVE_RAW_DECL_GROUP_MEMBER
1585 _GL_WARN_ON_USE (group_member,
"group_member is unportable - "
1586 "use gnulib module group-member for portability");
1592 # if @REPLACE_ISATTY@
1593 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1595 # define isatty rpl_isatty
1597 # define GNULIB_defined_isatty 1
1598 _GL_FUNCDECL_RPL (isatty,
int, (
int fd));
1599 _GL_CXXALIAS_RPL (isatty,
int, (
int fd));
1600 # elif defined _WIN32 && !defined __CYGWIN__
1601 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1603 # define isatty _isatty
1605 _GL_CXXALIAS_MDA (isatty,
int, (
int fd));
1607 _GL_CXXALIAS_SYS (isatty,
int, (
int fd));
1609 _GL_CXXALIASWARN (isatty);
1610 #elif defined GNULIB_POSIXCHECK
1612 # if HAVE_RAW_DECL_ISATTY
1613 _GL_WARN_ON_USE (isatty,
"isatty has portability problems on native Windows - "
1614 "use gnulib module isatty for portability");
1616 #elif @GNULIB_MDA_ISATTY@
1620 # if defined _WIN32 && !defined __CYGWIN__
1621 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1623 # define isatty _isatty
1625 _GL_CXXALIAS_MDA (isatty,
int, (
int fd));
1627 _GL_CXXALIAS_SYS (isatty,
int, (
int fd));
1629 _GL_CXXALIASWARN (isatty);
1639 # if @REPLACE_LCHOWN@
1640 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1642 # define lchown rpl_lchown
1644 _GL_FUNCDECL_RPL (lchown,
int, (
char const *file, uid_t owner, gid_t group)
1645 _GL_ARG_NONNULL ((1)));
1646 _GL_CXXALIAS_RPL (lchown,
int, (
char const *file, uid_t owner, gid_t group));
1649 _GL_FUNCDECL_SYS (lchown,
int, (
char const *file, uid_t owner, gid_t group)
1650 _GL_ARG_NONNULL ((1)));
1652 _GL_CXXALIAS_SYS (lchown,
int, (
char const *file, uid_t owner, gid_t group));
1654 _GL_CXXALIASWARN (lchown);
1655 #elif defined GNULIB_POSIXCHECK
1657 # if HAVE_RAW_DECL_LCHOWN
1658 _GL_WARN_ON_USE (lchown,
"lchown is unportable to pre-POSIX.1-2001 systems - "
1659 "use gnulib module lchown for portability");
1670 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1671 # define link rpl_link
1673 _GL_FUNCDECL_RPL (link,
int, (
const char *path1,
const char *path2)
1674 _GL_ARG_NONNULL ((1, 2)));
1675 _GL_CXXALIAS_RPL (link,
int, (
const char *path1,
const char *path2));
1678 _GL_FUNCDECL_SYS (link,
int, (
const char *path1,
const char *path2)
1679 _GL_ARG_NONNULL ((1, 2)));
1681 _GL_CXXALIAS_SYS (link,
int, (
const char *path1,
const char *path2));
1683 _GL_CXXALIASWARN (link);
1684 #elif defined GNULIB_POSIXCHECK
1686 # if HAVE_RAW_DECL_LINK
1687 _GL_WARN_ON_USE (link,
"link is unportable - "
1688 "use gnulib module link for portability");
1697 # if @REPLACE_LINKAT@
1698 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1700 # define linkat rpl_linkat
1702 _GL_FUNCDECL_RPL (linkat,
int,
1703 (
int fd1,
const char *path1,
int fd2,
const char *path2,
1705 _GL_ARG_NONNULL ((2, 4)));
1706 _GL_CXXALIAS_RPL (linkat,
int,
1707 (
int fd1,
const char *path1,
int fd2,
const char *path2,
1711 _GL_FUNCDECL_SYS (linkat,
int,
1712 (
int fd1,
const char *path1,
int fd2,
const char *path2,
1714 _GL_ARG_NONNULL ((2, 4)));
1716 _GL_CXXALIAS_SYS (linkat,
int,
1717 (
int fd1,
const char *path1,
int fd2,
const char *path2,
1721 _GL_CXXALIASWARN (linkat);
1723 #elif defined GNULIB_POSIXCHECK
1725 # if HAVE_RAW_DECL_LINKAT
1726 _GL_WARN_ON_USE (linkat,
"linkat is unportable - "
1727 "use gnulib module linkat for portability");
1737 # if @REPLACE_LSEEK@
1738 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1739 # define lseek rpl_lseek
1741 _GL_FUNCDECL_RPL (lseek, off_t, (
int fd, off_t offset,
int whence));
1742 _GL_CXXALIAS_RPL (lseek, off_t, (
int fd, off_t offset,
int whence));
1743 # elif defined _WIN32 && !defined __CYGWIN__
1744 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1746 # define lseek _lseek
1748 _GL_CXXALIAS_MDA (lseek, off_t, (
int fd, off_t offset,
int whence));
1750 _GL_CXXALIAS_SYS (lseek, off_t, (
int fd, off_t offset,
int whence));
1752 _GL_CXXALIASWARN (lseek);
1753 #elif defined GNULIB_POSIXCHECK
1755 # if HAVE_RAW_DECL_LSEEK
1756 _GL_WARN_ON_USE (lseek,
"lseek does not fail with ESPIPE on pipes on some "
1757 "systems - use gnulib module lseek for portability");
1759 #elif @GNULIB_MDA_LSEEK@
1763 # if defined _WIN32 && !defined __CYGWIN__
1764 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1766 # define lseek _lseek
1768 _GL_CXXALIAS_MDA (lseek,
long, (
int fd,
long offset,
int whence));
1770 _GL_CXXALIAS_SYS (lseek, off_t, (
int fd, off_t offset,
int whence));
1772 _GL_CXXALIASWARN (lseek);
1781 _GL_FUNCDECL_SYS (pipe,
int, (
int fd[2]) _GL_ARG_NONNULL ((1)));
1783 _GL_CXXALIAS_SYS (pipe,
int, (
int fd[2]));
1784 _GL_CXXALIASWARN (pipe);
1785 #elif defined GNULIB_POSIXCHECK
1787 # if HAVE_RAW_DECL_PIPE
1788 _GL_WARN_ON_USE (pipe,
"pipe is unportable - "
1789 "use gnulib module pipe-posix for portability");
1803 # if @REPLACE_PIPE2@
1804 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1806 # define pipe2 rpl_pipe2
1808 _GL_FUNCDECL_RPL (pipe2,
int, (
int fd[2],
int flags) _GL_ARG_NONNULL ((1)));
1809 _GL_CXXALIAS_RPL (pipe2,
int, (
int fd[2],
int flags));
1811 _GL_FUNCDECL_SYS (pipe2,
int, (
int fd[2],
int flags) _GL_ARG_NONNULL ((1)));
1812 _GL_CXXALIAS_SYS (pipe2,
int, (
int fd[2],
int flags));
1815 _GL_CXXALIASWARN (pipe2);
1817 #elif defined GNULIB_POSIXCHECK
1819 # if HAVE_RAW_DECL_PIPE2
1820 _GL_WARN_ON_USE (pipe2,
"pipe2 is unportable - "
1821 "use gnulib module pipe2 for portability");
1832 # if @REPLACE_PREAD@
1833 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1835 # define pread rpl_pread
1837 _GL_FUNCDECL_RPL (pread, ssize_t,
1838 (
int fd,
void *buf,
size_t bufsize, off_t offset)
1839 _GL_ARG_NONNULL ((2)));
1840 _GL_CXXALIAS_RPL (pread, ssize_t,
1841 (
int fd,
void *buf,
size_t bufsize, off_t offset));
1844 _GL_FUNCDECL_SYS (pread, ssize_t,
1845 (
int fd,
void *buf,
size_t bufsize, off_t offset)
1846 _GL_ARG_NONNULL ((2)));
1848 _GL_CXXALIAS_SYS (pread, ssize_t,
1849 (
int fd,
void *buf,
size_t bufsize, off_t offset));
1852 _GL_CXXALIASWARN (pread);
1854 #elif defined GNULIB_POSIXCHECK
1856 # if HAVE_RAW_DECL_PREAD
1857 _GL_WARN_ON_USE (pread,
"pread is unportable - "
1858 "use gnulib module pread for portability");
1869 # if @REPLACE_PWRITE@
1870 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1872 # define pwrite rpl_pwrite
1874 _GL_FUNCDECL_RPL (pwrite, ssize_t,
1875 (
int fd,
const void *buf,
size_t bufsize, off_t offset)
1876 _GL_ARG_NONNULL ((2)));
1877 _GL_CXXALIAS_RPL (pwrite, ssize_t,
1878 (
int fd,
const void *buf,
size_t bufsize, off_t offset));
1881 _GL_FUNCDECL_SYS (pwrite, ssize_t,
1882 (
int fd,
const void *buf,
size_t bufsize, off_t offset)
1883 _GL_ARG_NONNULL ((2)));
1885 _GL_CXXALIAS_SYS (pwrite, ssize_t,
1886 (
int fd,
const void *buf,
size_t bufsize, off_t offset));
1889 _GL_CXXALIASWARN (pwrite);
1891 #elif defined GNULIB_POSIXCHECK
1893 # if HAVE_RAW_DECL_PWRITE
1894 _GL_WARN_ON_USE (pwrite,
"pwrite is unportable - "
1895 "use gnulib module pwrite for portability");
1905 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1907 # define read rpl_read
1909 _GL_FUNCDECL_RPL (read, ssize_t, (
int fd,
void *buf,
size_t count)
1910 _GL_ARG_NONNULL ((2)));
1911 _GL_CXXALIAS_RPL (read, ssize_t, (
int fd,
void *buf,
size_t count));
1912 # elif defined _WIN32 && !defined __CYGWIN__
1913 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1917 _GL_CXXALIAS_MDA (read, ssize_t, (
int fd,
void *buf,
size_t count));
1919 _GL_CXXALIAS_SYS (read, ssize_t, (
int fd,
void *buf,
size_t count));
1921 _GL_CXXALIASWARN (read);
1922 #elif @GNULIB_MDA_READ@
1926 # if defined _WIN32 && !defined __CYGWIN__
1927 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1932 _GL_CXXALIAS_MDA (read,
int, (
int fd,
void *buf,
unsigned int count));
1934 _GL_CXXALIAS_MDA (read, ssize_t, (
int fd,
void *buf,
unsigned int count));
1937 _GL_CXXALIAS_SYS (read, ssize_t, (
int fd,
void *buf,
size_t count));
1939 _GL_CXXALIASWARN (read);
1943 #if @GNULIB_READLINK@
1949 # if @REPLACE_READLINK@
1950 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1951 # define readlink rpl_readlink
1953 _GL_FUNCDECL_RPL (readlink, ssize_t,
1954 (
const char *restrict file,
1955 char *restrict buf,
size_t bufsize)
1956 _GL_ARG_NONNULL ((1, 2)));
1957 _GL_CXXALIAS_RPL (readlink, ssize_t,
1958 (
const char *restrict file,
1959 char *restrict buf,
size_t bufsize));
1961 # if !@HAVE_READLINK@
1962 _GL_FUNCDECL_SYS (readlink, ssize_t,
1963 (
const char *restrict file,
1964 char *restrict buf,
size_t bufsize)
1965 _GL_ARG_NONNULL ((1, 2)));
1967 _GL_CXXALIAS_SYS (readlink, ssize_t,
1968 (
const char *restrict file,
1969 char *restrict buf,
size_t bufsize));
1971 _GL_CXXALIASWARN (readlink);
1972 #elif defined GNULIB_POSIXCHECK
1974 # if HAVE_RAW_DECL_READLINK
1975 _GL_WARN_ON_USE (readlink,
"readlink is unportable - "
1976 "use gnulib module readlink for portability");
1981 #if @GNULIB_READLINKAT@
1982 # if @REPLACE_READLINKAT@
1983 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1984 # define readlinkat rpl_readlinkat
1986 _GL_FUNCDECL_RPL (readlinkat, ssize_t,
1987 (
int fd,
char const *restrict file,
1988 char *restrict buf,
size_t len)
1989 _GL_ARG_NONNULL ((2, 3)));
1990 _GL_CXXALIAS_RPL (readlinkat, ssize_t,
1991 (
int fd,
char const *restrict file,
1992 char *restrict buf,
size_t len));
1994 # if !@HAVE_READLINKAT@
1995 _GL_FUNCDECL_SYS (readlinkat, ssize_t,
1996 (
int fd,
char const *restrict file,
1997 char *restrict buf,
size_t len)
1998 _GL_ARG_NONNULL ((2, 3)));
2000 _GL_CXXALIAS_SYS (readlinkat, ssize_t,
2001 (
int fd,
char const *restrict file,
2002 char *restrict buf,
size_t len));
2005 _GL_CXXALIASWARN (readlinkat);
2007 #elif defined GNULIB_POSIXCHECK
2009 # if HAVE_RAW_DECL_READLINKAT
2010 _GL_WARN_ON_USE (readlinkat,
"readlinkat is not portable - "
2011 "use gnulib module readlinkat for portability");
2018 # if @REPLACE_RMDIR@
2019 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2020 # define rmdir rpl_rmdir
2022 _GL_FUNCDECL_RPL (rmdir,
int, (
char const *name) _GL_ARG_NONNULL ((1)));
2023 _GL_CXXALIAS_RPL (rmdir,
int, (
char const *name));
2024 # elif defined _WIN32 && !defined __CYGWIN__
2025 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2027 # define rmdir _rmdir
2029 _GL_CXXALIAS_MDA (rmdir,
int, (
char const *name));
2031 _GL_CXXALIAS_SYS (rmdir,
int, (
char const *name));
2033 _GL_CXXALIASWARN (rmdir);
2034 #elif defined GNULIB_POSIXCHECK
2036 # if HAVE_RAW_DECL_RMDIR
2037 _GL_WARN_ON_USE (rmdir,
"rmdir is unportable - "
2038 "use gnulib module rmdir for portability");
2040 #elif @GNULIB_MDA_RMDIR@
2044 # if defined _WIN32 && !defined __CYGWIN__
2045 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2047 # define rmdir _rmdir
2049 _GL_CXXALIAS_MDA (rmdir,
int, (
char const *name));
2051 _GL_CXXALIAS_SYS (rmdir,
int, (
char const *name));
2053 _GL_CXXALIASWARN (rmdir);
2057 #if @GNULIB_SETHOSTNAME@
2066 # if @REPLACE_SETHOSTNAME@
2067 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2069 # define sethostname rpl_sethostname
2071 _GL_FUNCDECL_RPL (sethostname,
int, (
const char *name,
size_t len)
2072 _GL_ARG_NONNULL ((1)));
2073 _GL_CXXALIAS_RPL (sethostname,
int, (
const char *name,
size_t len));
2075 # if !@HAVE_SETHOSTNAME@ || !@HAVE_DECL_SETHOSTNAME@
2076 _GL_FUNCDECL_SYS (sethostname,
int, (
const char *name,
size_t len)
2077 _GL_ARG_NONNULL ((1)));
2082 _GL_CXXALIAS_SYS_CAST (sethostname,
int, (
const char *name,
size_t len));
2085 _GL_CXXALIASWARN (sethostname);
2087 #elif defined GNULIB_POSIXCHECK
2089 # if HAVE_RAW_DECL_SETHOSTNAME
2090 _GL_WARN_ON_USE (sethostname,
"sethostname is unportable - "
2091 "use gnulib module sethostname for portability");
2101 # if @REPLACE_SLEEP@
2102 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2104 # define sleep rpl_sleep
2106 _GL_FUNCDECL_RPL (sleep,
unsigned int, (
unsigned int n));
2107 _GL_CXXALIAS_RPL (sleep,
unsigned int, (
unsigned int n));
2110 _GL_FUNCDECL_SYS (sleep,
unsigned int, (
unsigned int n));
2112 _GL_CXXALIAS_SYS (sleep,
unsigned int, (
unsigned int n));
2114 _GL_CXXALIASWARN (sleep);
2115 #elif defined GNULIB_POSIXCHECK
2117 # if HAVE_RAW_DECL_SLEEP
2118 _GL_WARN_ON_USE (sleep,
"sleep is unportable - "
2119 "use gnulib module sleep for portability");
2124 #if @GNULIB_MDA_SWAB@
2128 # if defined _WIN32 && !defined __CYGWIN__
2129 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2135 _GL_CXXALIAS_MDA_CAST (swab,
void, (
char *from,
char *to,
int n));
2138 _GL_CXXALIAS_SYS (swab,
void, (
const char *from,
char *to,
int n));
2139 # elif defined __sun && (defined __SunOS_5_10 || defined __XOPEN_OR_POSIX) && !defined _XPG4
2140 _GL_CXXALIAS_SYS (swab,
void, (
const char *from,
char *to, ssize_t n));
2142 _GL_CXXALIAS_SYS (swab,
void, (
const void *from,
void *to, ssize_t n));
2145 _GL_CXXALIASWARN (swab);
2149 #if @GNULIB_SYMLINK@
2150 # if @REPLACE_SYMLINK@
2151 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2153 # define symlink rpl_symlink
2155 _GL_FUNCDECL_RPL (symlink,
int, (
char const *contents,
char const *file)
2156 _GL_ARG_NONNULL ((1, 2)));
2157 _GL_CXXALIAS_RPL (symlink,
int, (
char const *contents,
char const *file));
2159 # if !@HAVE_SYMLINK@
2160 _GL_FUNCDECL_SYS (symlink,
int, (
char const *contents,
char const *file)
2161 _GL_ARG_NONNULL ((1, 2)));
2163 _GL_CXXALIAS_SYS (symlink,
int, (
char const *contents,
char const *file));
2165 _GL_CXXALIASWARN (symlink);
2166 #elif defined GNULIB_POSIXCHECK
2168 # if HAVE_RAW_DECL_SYMLINK
2169 _GL_WARN_ON_USE (symlink,
"symlink is not portable - "
2170 "use gnulib module symlink for portability");
2175 #if @GNULIB_SYMLINKAT@
2176 # if @REPLACE_SYMLINKAT@
2177 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2179 # define symlinkat rpl_symlinkat
2181 _GL_FUNCDECL_RPL (symlinkat,
int,
2182 (
char const *contents,
int fd,
char const *file)
2183 _GL_ARG_NONNULL ((1, 3)));
2184 _GL_CXXALIAS_RPL (symlinkat,
int,
2185 (
char const *contents,
int fd,
char const *file));
2187 # if !@HAVE_SYMLINKAT@
2188 _GL_FUNCDECL_SYS (symlinkat,
int,
2189 (
char const *contents,
int fd,
char const *file)
2190 _GL_ARG_NONNULL ((1, 3)));
2192 _GL_CXXALIAS_SYS (symlinkat,
int,
2193 (
char const *contents,
int fd,
char const *file));
2196 _GL_CXXALIASWARN (symlinkat);
2198 #elif defined GNULIB_POSIXCHECK
2200 # if HAVE_RAW_DECL_SYMLINKAT
2201 _GL_WARN_ON_USE (symlinkat,
"symlinkat is not portable - "
2202 "use gnulib module symlinkat for portability");
2207 #if @GNULIB_TRUNCATE@
2212 # if @REPLACE_TRUNCATE@
2213 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2215 # define truncate rpl_truncate
2217 _GL_FUNCDECL_RPL (truncate,
int, (
const char *filename, off_t length)
2218 _GL_ARG_NONNULL ((1)));
2219 _GL_CXXALIAS_RPL (truncate,
int, (
const char *filename, off_t length));
2221 # if !@HAVE_DECL_TRUNCATE@
2222 _GL_FUNCDECL_SYS (truncate,
int, (
const char *filename, off_t length)
2223 _GL_ARG_NONNULL ((1)));
2225 _GL_CXXALIAS_SYS (truncate,
int, (
const char *filename, off_t length));
2228 _GL_CXXALIASWARN (truncate);
2230 #elif defined GNULIB_POSIXCHECK
2232 # if HAVE_RAW_DECL_TRUNCATE
2233 _GL_WARN_ON_USE (truncate,
"truncate is unportable - "
2234 "use gnulib module truncate for portability");
2239 #if @GNULIB_TTYNAME_R@
2242 # if @REPLACE_TTYNAME_R@
2243 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2245 # define ttyname_r rpl_ttyname_r
2247 _GL_FUNCDECL_RPL (ttyname_r,
int,
2248 (
int fd,
char *buf,
size_t buflen) _GL_ARG_NONNULL ((2)));
2249 _GL_CXXALIAS_RPL (ttyname_r,
int,
2250 (
int fd,
char *buf,
size_t buflen));
2252 # if !@HAVE_DECL_TTYNAME_R@
2253 _GL_FUNCDECL_SYS (ttyname_r,
int,
2254 (
int fd,
char *buf,
size_t buflen) _GL_ARG_NONNULL ((2)));
2256 _GL_CXXALIAS_SYS (ttyname_r,
int,
2257 (
int fd,
char *buf,
size_t buflen));
2260 _GL_CXXALIASWARN (ttyname_r);
2262 #elif defined GNULIB_POSIXCHECK
2264 # if HAVE_RAW_DECL_TTYNAME_R
2265 _GL_WARN_ON_USE (ttyname_r,
"ttyname_r is not portable - "
2266 "use gnulib module ttyname_r for portability");
2272 # if @REPLACE_UNLINK@
2273 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2275 # define unlink rpl_unlink
2277 _GL_FUNCDECL_RPL (unlink,
int, (
char const *file) _GL_ARG_NONNULL ((1)));
2278 _GL_CXXALIAS_RPL (unlink,
int, (
char const *file));
2279 # elif defined _WIN32 && !defined __CYGWIN__
2280 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2282 # define unlink _unlink
2284 _GL_CXXALIAS_MDA (unlink,
int, (
char const *file));
2286 _GL_CXXALIAS_SYS (unlink,
int, (
char const *file));
2288 _GL_CXXALIASWARN (unlink);
2289 #elif defined GNULIB_POSIXCHECK
2291 # if HAVE_RAW_DECL_UNLINK
2292 _GL_WARN_ON_USE (unlink,
"unlink is not portable - "
2293 "use gnulib module unlink for portability");
2295 #elif @GNULIB_MDA_UNLINK@
2299 # if defined _WIN32 && !defined __CYGWIN__
2300 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2302 # define unlink _unlink
2304 _GL_CXXALIAS_MDA (unlink,
int, (
char const *file));
2306 _GL_CXXALIAS_SYS (unlink,
int, (
char const *file));
2308 _GL_CXXALIASWARN (unlink);
2312 #if @GNULIB_UNLINKAT@
2313 # if @REPLACE_UNLINKAT@
2314 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2316 # define unlinkat rpl_unlinkat
2318 _GL_FUNCDECL_RPL (unlinkat,
int, (
int fd,
char const *file,
int flag)
2319 _GL_ARG_NONNULL ((2)));
2320 _GL_CXXALIAS_RPL (unlinkat,
int, (
int fd,
char const *file,
int flag));
2322 # if !@HAVE_UNLINKAT@
2323 _GL_FUNCDECL_SYS (unlinkat,
int, (
int fd,
char const *file,
int flag)
2324 _GL_ARG_NONNULL ((2)));
2326 _GL_CXXALIAS_SYS (unlinkat,
int, (
int fd,
char const *file,
int flag));
2328 _GL_CXXALIASWARN (unlinkat);
2329 #elif defined GNULIB_POSIXCHECK
2331 # if HAVE_RAW_DECL_UNLINKAT
2332 _GL_WARN_ON_USE (unlinkat,
"unlinkat is not portable - "
2333 "use gnulib module unlinkat for portability");
2343 # if @REPLACE_USLEEP@
2344 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2346 # define usleep rpl_usleep
2348 _GL_FUNCDECL_RPL (usleep,
int, (useconds_t n));
2349 _GL_CXXALIAS_RPL (usleep,
int, (useconds_t n));
2352 _GL_FUNCDECL_SYS (usleep,
int, (useconds_t n));
2356 _GL_CXXALIAS_SYS_CAST (usleep,
int, (useconds_t n));
2358 _GL_CXXALIASWARN (usleep);
2359 #elif defined GNULIB_POSIXCHECK
2361 # if HAVE_RAW_DECL_USLEEP
2362 _GL_WARN_ON_USE (usleep,
"usleep is unportable - "
2363 "use gnulib module usleep for portability");
2372 # if @REPLACE_WRITE@
2373 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2375 # define write rpl_write
2377 _GL_FUNCDECL_RPL (write, ssize_t, (
int fd,
const void *buf,
size_t count)
2378 _GL_ARG_NONNULL ((2)));
2379 _GL_CXXALIAS_RPL (write, ssize_t, (
int fd,
const void *buf,
size_t count));
2380 # elif defined _WIN32 && !defined __CYGWIN__
2381 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2383 # define write _write
2385 _GL_CXXALIAS_MDA (write, ssize_t, (
int fd,
const void *buf,
size_t count));
2387 _GL_CXXALIAS_SYS (write, ssize_t, (
int fd,
const void *buf,
size_t count));
2389 _GL_CXXALIASWARN (write);
2390 #elif @GNULIB_MDA_WRITE@
2394 # if defined _WIN32 && !defined __CYGWIN__
2395 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2397 # define write _write
2400 _GL_CXXALIAS_MDA (write,
int, (
int fd,
const void *buf,
unsigned int count));
2402 _GL_CXXALIAS_MDA (write, ssize_t, (
int fd,
const void *buf,
unsigned int count));
2405 _GL_CXXALIAS_SYS (write, ssize_t, (
int fd,
const void *buf,
size_t count));
2407 _GL_CXXALIASWARN (write);
2410 _GL_INLINE_HEADER_END