19 #pragma GCC system_header
28 && !defined _GL_WINSOCK2_H_WITNESS && defined _WINSOCK2_H
32 # include_next <unistd.h>
34 # error unexpected; report this to bug-gnulib@gnu.org
36 # define _GL_WINSOCK2_H_WITNESS
39 #elif !defined _GL_UNISTD_H
43 # include_next <unistd.h>
48 && !defined _GL_INCLUDING_WINSOCK2_H
49 # define _GL_INCLUDING_WINSOCK2_H
50 # include <winsock2.h>
51 # undef _GL_INCLUDING_WINSOCK2_H
54 #if !defined _GL_UNISTD_H && !defined _GL_INCLUDING_WINSOCK2_H
63 #if (!(defined SEEK_CUR && defined SEEK_END && defined SEEK_SET) \
64 || ((0 || defined GNULIB_POSIXCHECK) \
65 && defined __CYGWIN__)) \
66 && ! defined __GLIBC__
72 #if (0 || defined GNULIB_POSIXCHECK) && defined __CYGWIN__ \
73 && ! defined __GLIBC__
91 || defined GNULIB_POSIXCHECK) \
92 && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__))
95 #elif (0 || 0 || 0 || 0 \
97 || defined GNULIB_POSIXCHECK) \
98 && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)
105 #if ((0 && (defined _AIX || defined __osf__)) \
106 || (0 && defined __TANDEM)) \
107 && !defined __GLIBC__
120 || 0 || 0 || defined GNULIB_POSIXCHECK)
127 #if 0 && !defined __GLIBC__ && !defined _GL_SYSTEM_GETOPT
132 #ifndef _GL_UNISTD_INLINE
133 # define _GL_UNISTD_INLINE _GL_INLINE
137 #ifndef _GL_CXXDEFS_H
138 #define _GL_CXXDEFS_H
201 #if defined __cplusplus
202 # define _GL_EXTERN_C extern "C"
204 # define _GL_EXTERN_C extern
214 #define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \
215 _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes)
216 #define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \
217 _GL_EXTERN_C rettype rpl_func parameters_and_attributes
226 #define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \
227 _GL_EXTERN_C rettype func parameters_and_attributes
235 #define _GL_CXXALIAS_RPL(func,rettype,parameters) \
236 _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters)
237 #if defined __cplusplus && defined GNULIB_NAMESPACE
238 # define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \
239 namespace GNULIB_NAMESPACE \
241 rettype (*const func) parameters = ::rpl_func; \
243 _GL_EXTERN_C int _gl_cxxalias_dummy
245 # define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \
246 _GL_EXTERN_C int _gl_cxxalias_dummy
254 #if defined __cplusplus && defined GNULIB_NAMESPACE
255 # define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \
256 namespace GNULIB_NAMESPACE \
258 rettype (*const func) parameters = \
259 reinterpret_cast<rettype(*)parameters>(::rpl_func); \
261 _GL_EXTERN_C int _gl_cxxalias_dummy
263 # define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \
264 _GL_EXTERN_C int _gl_cxxalias_dummy
274 #if defined __cplusplus && defined GNULIB_NAMESPACE
281 # define _GL_CXXALIAS_SYS(func,rettype,parameters) \
282 namespace GNULIB_NAMESPACE \
284 static rettype (*func) parameters = ::func; \
286 _GL_EXTERN_C int _gl_cxxalias_dummy
288 # define _GL_CXXALIAS_SYS(func,rettype,parameters) \
289 _GL_EXTERN_C int _gl_cxxalias_dummy
297 #if defined __cplusplus && defined GNULIB_NAMESPACE
298 # define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \
299 namespace GNULIB_NAMESPACE \
301 static rettype (*func) parameters = \
302 reinterpret_cast<rettype(*)parameters>(::func); \
304 _GL_EXTERN_C int _gl_cxxalias_dummy
306 # define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \
307 _GL_EXTERN_C int _gl_cxxalias_dummy
316 #if defined __cplusplus && defined GNULIB_NAMESPACE
322 # define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \
323 namespace GNULIB_NAMESPACE \
325 static rettype (*func) parameters = \
326 reinterpret_cast<rettype(*)parameters>( \
327 (rettype2(*)parameters2)(::func)); \
329 _GL_EXTERN_C int _gl_cxxalias_dummy
331 # define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \
332 _GL_EXTERN_C int _gl_cxxalias_dummy
339 #if defined __cplusplus && defined GNULIB_NAMESPACE
340 # define _GL_CXXALIASWARN(func) \
341 _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE)
342 # define _GL_CXXALIASWARN_1(func,namespace) \
343 _GL_CXXALIASWARN_2 (func, namespace)
347 # define _GL_CXXALIASWARN_2(func,namespace) \
348 _GL_WARN_ON_USE (func, \
349 "The symbol ::" #func " refers to the system function. " \
350 "Use " #namespace "::" #func " instead.")
351 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
352 # define _GL_CXXALIASWARN_2(func,namespace) \
353 extern __typeof__ (func) func
355 # define _GL_CXXALIASWARN_2(func,namespace) \
356 _GL_EXTERN_C int _gl_cxxalias_dummy
359 # define _GL_CXXALIASWARN(func) \
360 _GL_EXTERN_C int _gl_cxxalias_dummy
366 #if defined __cplusplus && defined GNULIB_NAMESPACE
367 # define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \
368 _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \
370 # define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \
371 _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace)
375 # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
376 _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \
377 "The symbol ::" #func " refers to the system function. " \
378 "Use " #namespace "::" #func " instead.")
379 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
380 # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
381 extern __typeof__ (func) func
383 # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
384 _GL_EXTERN_C int _gl_cxxalias_dummy
387 # define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \
388 _GL_EXTERN_C int _gl_cxxalias_dummy
397 #ifndef _GL_ARG_NONNULL
398 # if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3
399 # define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params))
401 # define _GL_ARG_NONNULL(params)
406 #ifndef _GL_WARN_ON_USE
408 # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__)
410 # define _GL_WARN_ON_USE(function, message) \
411 extern __typeof__ (function) function __attribute__ ((__warning__ (message)))
412 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
414 # define _GL_WARN_ON_USE(function, message) \
415 extern __typeof__ (function) function
417 # define _GL_WARN_ON_USE(function, message) \
418 _GL_WARN_EXTERN_C int _gl_warn_on_use
428 #ifndef _GL_WARN_ON_USE_CXX
429 # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__)
430 # define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
431 extern rettype function parameters_and_attributes \
432 __attribute__ ((__warning__ (msg)))
433 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
435 # define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
436 extern rettype function parameters_and_attributes
438 # define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
439 _GL_WARN_EXTERN_C int _gl_warn_on_use
445 #ifndef _GL_WARN_EXTERN_C
446 # if defined __cplusplus
447 # define _GL_WARN_EXTERN_C extern "C"
449 # define _GL_WARN_EXTERN_C extern
457 # if !defined _GL_SYS_SOCKET_H
458 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
460 # define socket socket_used_without_including_sys_socket_h
462 # define connect connect_used_without_including_sys_socket_h
464 # define accept accept_used_without_including_sys_socket_h
466 # define bind bind_used_without_including_sys_socket_h
468 # define getpeername getpeername_used_without_including_sys_socket_h
470 # define getsockname getsockname_used_without_including_sys_socket_h
472 # define getsockopt getsockopt_used_without_including_sys_socket_h
474 # define listen listen_used_without_including_sys_socket_h
476 # define recv recv_used_without_including_sys_socket_h
478 # define send send_used_without_including_sys_socket_h
480 # define recvfrom recvfrom_used_without_including_sys_socket_h
482 # define sendto sendto_used_without_including_sys_socket_h
484 # define setsockopt setsockopt_used_without_including_sys_socket_h
486 # define shutdown shutdown_used_without_including_sys_socket_h
489 "socket() used without including <sys/socket.h>");
491 "connect() used without including <sys/socket.h>");
493 "accept() used without including <sys/socket.h>");
495 "bind() used without including <sys/socket.h>");
497 "getpeername() used without including <sys/socket.h>");
499 "getsockname() used without including <sys/socket.h>");
501 "getsockopt() used without including <sys/socket.h>");
503 "listen() used without including <sys/socket.h>");
505 "recv() used without including <sys/socket.h>");
507 "send() used without including <sys/socket.h>");
509 "recvfrom() used without including <sys/socket.h>");
511 "sendto() used without including <sys/socket.h>");
513 "setsockopt() used without including <sys/socket.h>");
515 "shutdown() used without including <sys/socket.h>");
518 # if !defined _GL_SYS_SELECT_H
519 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
521 # define select select_used_without_including_sys_select_h
524 "select() used without including <sys/select.h>");
532 # define STDIN_FILENO 0
534 #ifndef STDOUT_FILENO
535 # define STDOUT_FILENO 1
537 #ifndef STDERR_FILENO
538 # define STDERR_FILENO 2
553 #if defined GNULIB_POSIXCHECK
556 "use the gnulib module faccessat instead");
563 #elif defined GNULIB_POSIXCHECK
565 # if HAVE_RAW_DECL_CHDIR
567 "use gnulib module chdir for portability");
579 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
581 # define chown rpl_chown
594 #elif defined GNULIB_POSIXCHECK
596 # if HAVE_RAW_DECL_CHOWN
597 _GL_WARN_ON_USE (chown,
"chown fails to follow symlinks on some systems and "
598 "doesn't treat a uid or gid of -1 on some systems - "
599 "use gnulib module chown for portability");
607 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
609 # define close rpl_close
619 # define close close_used_without_requesting_gnulib_module_close
620 #elif defined GNULIB_POSIXCHECK
624 "use gnulib module close for portability");
630 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
639 #elif defined GNULIB_POSIXCHECK
641 # if HAVE_RAW_DECL_DUP
643 "use gnulib module dup for portability");
655 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
656 # define dup2 rpl_dup2
667 #elif defined GNULIB_POSIXCHECK
669 # if HAVE_RAW_DECL_DUP2
671 "use gnulib module dup2 for portability");
686 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
687 # define dup3 rpl_dup3
696 #elif defined GNULIB_POSIXCHECK
698 # if HAVE_RAW_DECL_DUP3
700 "use gnulib module dup3 for portability");
709 # if defined __APPLE__ && defined __MACH__
710 # include <crt_externs.h>
711 # define environ (*_NSGetEnviron ())
716 extern char **environ;
722 #elif defined GNULIB_POSIXCHECK
723 # if HAVE_RAW_DECL_ENVIRON
730 "use gnulib module environ for portability");
732 # define environ (*rpl_environ ())
746 # if defined GNULIB_POSIXCHECK
748 _GL_WARN_ON_USE (euidaccess,
"the euidaccess function is a security risk - "
749 "use the gnulib module faccessat instead");
751 #elif defined GNULIB_POSIXCHECK
753 # if HAVE_RAW_DECL_EUIDACCESS
755 "use gnulib module euidaccess for portability");
763 (
int fd,
char const *file,
int mode,
int flag)
767 (
int fd,
char const *file,
int mode,
int flag));
769 #elif defined GNULIB_POSIXCHECK
771 # if HAVE_RAW_DECL_FACCESSAT
773 "use gnulib module faccessat for portability");
788 _GL_EXTERN_C int _gl_register_fd (
int fd,
const char *filename)
791 _GL_EXTERN_C int _gl_register_dup (
int oldfd,
int newfd);
801 #elif defined GNULIB_POSIXCHECK
803 # if HAVE_RAW_DECL_FCHDIR
805 "use gnulib module fchdir for portability");
812 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
814 # define fchownat rpl_fchownat
817 uid_t owner, gid_t group,
int flag)
820 uid_t owner, gid_t group,
int flag));
824 uid_t owner, gid_t group,
int flag)
828 uid_t owner, gid_t group,
int flag));
831 #elif defined GNULIB_POSIXCHECK
833 # if HAVE_RAW_DECL_FCHOWNAT
835 "use gnulib module openat for portability");
850 #elif defined GNULIB_POSIXCHECK
852 # if HAVE_RAW_DECL_FDATASYNC
854 "use gnulib module fdatasync for portability");
869 #elif defined GNULIB_POSIXCHECK
871 # if HAVE_RAW_DECL_FSYNC
873 "use gnulib module fsync for portability");
884 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
886 # define ftruncate rpl_ftruncate
897 #elif defined GNULIB_POSIXCHECK
899 # if HAVE_RAW_DECL_FTRUNCATE
901 "use gnulib module ftruncate for portability");
918 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
919 # define getcwd rpl_getcwd
929 #elif defined GNULIB_POSIXCHECK
931 # if HAVE_RAW_DECL_GETCWD
933 "use gnulib module getcwd for portability");
950 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
951 # undef getdomainname
952 # define getdomainname rpl_getdomainname
965 #elif defined GNULIB_POSIXCHECK
966 # undef getdomainname
967 # if HAVE_RAW_DECL_GETDOMAINNAME
969 "use gnulib module getdomainname for portability");
982 #elif defined GNULIB_POSIXCHECK
983 # undef getdtablesize
984 # if HAVE_RAW_DECL_GETDTABLESIZE
986 "use gnulib module getdtablesize for portability");
998 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1000 # define getgroups rpl_getgroups
1011 #elif defined GNULIB_POSIXCHECK
1013 # if HAVE_RAW_DECL_GETGROUPS
1015 "use gnulib module getgroups for portability");
1029 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1031 # define gethostname rpl_gethostname
1049 # define gethostname gethostname_used_without_requesting_gnulib_module_gethostname
1050 #elif defined GNULIB_POSIXCHECK
1052 # if HAVE_RAW_DECL_GETHOSTNAME
1054 "use gnulib module gethostname for portability");
1075 #elif defined GNULIB_POSIXCHECK
1077 # if HAVE_RAW_DECL_GETLOGIN
1079 "use gnulib module getlogin for portability");
1100 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1101 # define getlogin_r rpl_getlogin_r
1116 #elif defined GNULIB_POSIXCHECK
1118 # if HAVE_RAW_DECL_GETLOGIN_R
1120 "use gnulib module getlogin_r for portability");
1127 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1128 # define getpagesize rpl_getpagesize
1134 # if !defined getpagesize
1136 # if !defined _gl_getpagesize && defined _SC_PAGESIZE
1137 # if ! (defined __VMS && __VMS_VER < 70000000)
1138 # define _gl_getpagesize() sysconf (_SC_PAGESIZE)
1142 # if !defined _gl_getpagesize && defined __VMS
1144 # define _gl_getpagesize() 8192
1146 # define _gl_getpagesize() 512
1150 # if !defined _gl_getpagesize && 0
1152 # if defined B_PAGE_SIZE
1153 # define _gl_getpagesize() B_PAGE_SIZE
1157 # if !defined _gl_getpagesize && defined __amigaos4__
1158 # define _gl_getpagesize() 2048
1161 # if !defined _gl_getpagesize && 0
1162 # include <sys/param.h>
1163 # ifdef EXEC_PAGESIZE
1164 # define _gl_getpagesize() EXEC_PAGESIZE
1170 # define _gl_getpagesize() (NBPG * CLSIZE)
1173 # define _gl_getpagesize() NBPC
1178 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1179 # define getpagesize() _gl_getpagesize ()
1181 # if !GNULIB_defined_getpagesize_function
1185 return _gl_getpagesize ();
1187 # define GNULIB_defined_getpagesize_function 1
1198 #elif defined GNULIB_POSIXCHECK
1200 # if HAVE_RAW_DECL_GETPAGESIZE
1202 "use gnulib module getpagesize for portability");
1215 #elif defined GNULIB_POSIXCHECK
1216 # undef getusershell
1217 # if HAVE_RAW_DECL_GETUSERSHELL
1219 "use gnulib module getusershell for portability");
1230 #elif defined GNULIB_POSIXCHECK
1231 # undef setusershell
1232 # if HAVE_RAW_DECL_SETUSERSHELL
1234 "use gnulib module getusershell for portability");
1246 #elif defined GNULIB_POSIXCHECK
1247 # undef endusershell
1248 # if HAVE_RAW_DECL_ENDUSERSHELL
1250 "use gnulib module getusershell for portability");
1262 #elif defined GNULIB_POSIXCHECK
1263 # undef group_member
1264 # if HAVE_RAW_DECL_GROUP_MEMBER
1266 "use gnulib module group-member for portability");
1273 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1275 # define isatty rpl_isatty
1283 #elif defined GNULIB_POSIXCHECK
1285 # if HAVE_RAW_DECL_ISATTY
1286 _GL_WARN_ON_USE (isatty,
"isatty has portability problems on native Windows - "
1287 "use gnulib module isatty for portability");
1299 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1301 # define lchown rpl_lchown
1303 _GL_FUNCDECL_RPL (lchown,
int, (
char const *file, uid_t owner, gid_t group)
1305 _GL_CXXALIAS_RPL (lchown,
int, (
char const *file, uid_t owner, gid_t group));
1308 _GL_FUNCDECL_SYS (lchown,
int, (
char const *file, uid_t owner, gid_t group)
1311 _GL_CXXALIAS_SYS (lchown,
int, (
char const *file, uid_t owner, gid_t group));
1314 #elif defined GNULIB_POSIXCHECK
1316 # if HAVE_RAW_DECL_LCHOWN
1317 _GL_WARN_ON_USE (lchown,
"lchown is unportable to pre-POSIX.1-2001 systems - "
1318 "use gnulib module lchown for portability");
1329 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1330 # define link rpl_link
1343 #elif defined GNULIB_POSIXCHECK
1345 # if HAVE_RAW_DECL_LINK
1347 "use gnulib module link for portability");
1357 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1359 # define linkat rpl_linkat
1362 (
int fd1,
const char *path1,
int fd2,
const char *path2,
1366 (
int fd1,
const char *path1,
int fd2,
const char *path2,
1371 (
int fd1,
const char *path1,
int fd2,
const char *path2,
1376 (
int fd1,
const char *path1,
int fd2,
const char *path2,
1380 #elif defined GNULIB_POSIXCHECK
1382 # if HAVE_RAW_DECL_LINKAT
1384 "use gnulib module linkat for portability");
1395 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1396 # define lseek rpl_lseek
1404 #elif defined GNULIB_POSIXCHECK
1406 # if HAVE_RAW_DECL_LSEEK
1407 _GL_WARN_ON_USE (lseek,
"lseek does not fail with ESPIPE on pipes on some "
1408 "systems - use gnulib module lseek for portability");
1422 #elif defined GNULIB_POSIXCHECK
1424 # if HAVE_RAW_DECL_PIPE
1426 "use gnulib module pipe-posix for portability");
1441 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1442 # define pipe2 rpl_pipe2
1451 #elif defined GNULIB_POSIXCHECK
1453 # if HAVE_RAW_DECL_PIPE2
1455 "use gnulib module pipe2 for portability");
1467 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1469 # define pread rpl_pread
1472 (
int fd,
void *buf,
size_t bufsize, off_t offset)
1475 (
int fd,
void *buf,
size_t bufsize, off_t offset));
1479 (
int fd,
void *buf,
size_t bufsize, off_t offset)
1483 (
int fd,
void *buf,
size_t bufsize, off_t offset));
1486 #elif defined GNULIB_POSIXCHECK
1488 # if HAVE_RAW_DECL_PREAD
1490 "use gnulib module pread for portability");
1502 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1504 # define pwrite rpl_pwrite
1507 (
int fd,
const void *buf,
size_t bufsize, off_t offset)
1510 (
int fd,
const void *buf,
size_t bufsize, off_t offset));
1514 (
int fd,
const void *buf,
size_t bufsize, off_t offset)
1518 (
int fd,
const void *buf,
size_t bufsize, off_t offset));
1521 #elif defined GNULIB_POSIXCHECK
1523 # if HAVE_RAW_DECL_PWRITE
1525 "use gnulib module pwrite for portability");
1535 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1537 # define read rpl_read
1559 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1560 # define readlink rpl_readlink
1563 (
const char *file,
char *buf,
size_t bufsize)
1566 (
const char *file,
char *buf,
size_t bufsize));
1570 (
const char *file,
char *buf,
size_t bufsize)
1574 (
const char *file,
char *buf,
size_t bufsize));
1577 #elif defined GNULIB_POSIXCHECK
1579 # if HAVE_RAW_DECL_READLINK
1581 "use gnulib module readlink for portability");
1589 (
int fd,
char const *file,
char *buf,
size_t len)
1593 (
int fd,
char const *file,
char *buf,
size_t len));
1595 #elif defined GNULIB_POSIXCHECK
1597 # if HAVE_RAW_DECL_READLINKAT
1599 "use gnulib module readlinkat for portability");
1607 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1608 # define rmdir rpl_rmdir
1616 #elif defined GNULIB_POSIXCHECK
1618 # if HAVE_RAW_DECL_RMDIR
1620 "use gnulib module rmdir for portability");
1643 #elif defined GNULIB_POSIXCHECK
1645 # if HAVE_RAW_DECL_SETHOSTNAME
1647 "use gnulib module sethostname for portability");
1658 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1660 # define sleep rpl_sleep
1671 #elif defined GNULIB_POSIXCHECK
1673 # if HAVE_RAW_DECL_SLEEP
1675 "use gnulib module sleep for portability");
1682 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1684 # define symlink rpl_symlink
1697 #elif defined GNULIB_POSIXCHECK
1699 # if HAVE_RAW_DECL_SYMLINK
1701 "use gnulib module symlink for portability");
1709 (
char const *contents,
int fd,
char const *file)
1713 (
char const *contents,
int fd,
char const *file));
1715 #elif defined GNULIB_POSIXCHECK
1717 # if HAVE_RAW_DECL_SYMLINKAT
1719 "use gnulib module symlinkat for portability");
1728 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1730 # define ttyname_r rpl_ttyname_r
1735 (
int fd,
char *buf,
size_t buflen));
1742 (
int fd,
char *buf,
size_t buflen));
1745 #elif defined GNULIB_POSIXCHECK
1747 # if HAVE_RAW_DECL_TTYNAME_R
1749 "use gnulib module ttyname_r for portability");
1756 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1758 # define unlink rpl_unlink
1766 #elif defined GNULIB_POSIXCHECK
1768 # if HAVE_RAW_DECL_UNLINK
1770 "use gnulib module unlink for portability");
1777 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1779 # define unlinkat rpl_unlinkat
1792 #elif defined GNULIB_POSIXCHECK
1794 # if HAVE_RAW_DECL_UNLINKAT
1796 "use gnulib module openat for portability");
1807 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1809 # define usleep rpl_usleep
1820 #elif defined GNULIB_POSIXCHECK
1822 # if HAVE_RAW_DECL_USLEEP
1824 "use gnulib module usleep for portability");
1834 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1836 # define write rpl_write
1840 _GL_CXXALIAS_RPL (write, ssize_t, (
int fd,
const void *buf,
size_t count));
_GL_CXXALIAS_SYS(chdir, int,(const char *file) _GL_ARG_NONNULL((1)))
#define _GL_UNISTD_INLINE
#define _GL_WARN_ON_USE(function, message)
#define _GL_FUNCDECL_RPL(func, rettype, parameters_and_attributes)
#define _GL_CXXALIAS_RPL(func, rettype, parameters)
#define _GL_CXXALIAS_SYS_CAST(func, rettype, parameters)
#define _GL_ARG_NONNULL(params)
#define _GL_INLINE_HEADER_END
#define _GL_FUNCDECL_SYS(func, rettype, parameters_and_attributes)
#define _GL_INLINE_HEADER_BEGIN