| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
#ifndef _@GUARD_PREFIX@_UNISTD_H |
| 18 |
|
| 19 |
#if __GNUC__ >= 3 |
| 20 |
@PRAGMA_SYSTEM_HEADER@ |
| 21 |
#endif |
| 22 |
@PRAGMA_COLUMNS@ |
| 23 |
|
| 24 |
#if @HAVE_UNISTD_H@ && defined _GL_INCLUDING_UNISTD_H |
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
#@INCLUDE_NEXT@ @NEXT_UNISTD_H@ |
| 32 |
|
| 33 |
#else |
| 34 |
|
| 35 |
|
| 36 |
|
| 37 |
#if @HAVE_UNISTD_H@ |
| 38 |
# define _GL_INCLUDING_UNISTD_H |
| 39 |
# @INCLUDE_NEXT@ @NEXT_UNISTD_H@ |
| 40 |
# undef _GL_INCLUDING_UNISTD_H |
| 41 |
#endif |
| 42 |
|
| 43 |
|
| 44 |
#if @GNULIB_GETHOSTNAME@ && @UNISTD_H_HAVE_WINSOCK2_H@ \ |
| 45 |
&& !defined _GL_INCLUDING_WINSOCK2_H |
| 46 |
# define _GL_INCLUDING_WINSOCK2_H |
| 47 |
# include <winsock2.h> |
| 48 |
# undef _GL_INCLUDING_WINSOCK2_H |
| 49 |
#endif |
| 50 |
|
| 51 |
#if !defined _@GUARD_PREFIX@_UNISTD_H && !defined _GL_INCLUDING_WINSOCK2_H |
| 52 |
#define _@GUARD_PREFIX@_UNISTD_H |
| 53 |
|
| 54 |
|
| 55 |
|
| 56 |
#ifndef __GLIBC__ |
| 57 |
# include <stddef.h> |
| 58 |
#endif |
| 59 |
|
| 60 |
|
| 61 |
|
| 62 |
|
| 63 |
|
| 64 |
|
| 65 |
#if (!(defined SEEK_CUR && defined SEEK_END && defined SEEK_SET) \ |
| 66 |
|| ((@GNULIB_UNLINK@ || defined GNULIB_POSIXCHECK) \ |
| 67 |
&& (defined _WIN32 && ! defined __CYGWIN__)) \ |
| 68 |
|| ((@GNULIB_SYMLINKAT@ || defined GNULIB_POSIXCHECK) \ |
| 69 |
&& defined __CYGWIN__)) \ |
| 70 |
&& ! defined __GLIBC__ |
| 71 |
# include <stdio.h> |
| 72 |
#endif |
| 73 |
|
| 74 |
|
| 75 |
|
| 76 |
|
| 77 |
#if (@GNULIB_UNLINKAT@ || defined GNULIB_POSIXCHECK) \ |
| 78 |
&& (defined __CYGWIN__ || defined __ANDROID__) \ |
| 79 |
&& ! defined __GLIBC__ |
| 80 |
# include <fcntl.h> |
| 81 |
#endif |
| 82 |
|
| 83 |
|
| 84 |
|
| 85 |
|
| 86 |
|
| 87 |
|
| 88 |
|
| 89 |
|
| 90 |
#if !defined __GLIBC__ && !defined __osf__ |
| 91 |
# define __need_system_stdlib_h |
| 92 |
# include <stdlib.h> |
| 93 |
# undef __need_system_stdlib_h |
| 94 |
#endif |
| 95 |
|
| 96 |
|
| 97 |
|
| 98 |
|
| 99 |
|
| 100 |
#if ((@GNULIB_CHDIR@ || @GNULIB_GETCWD@ || @GNULIB_RMDIR@ \ |
| 101 |
|| defined GNULIB_POSIXCHECK) \ |
| 102 |
&& (defined _WIN32 && ! defined __CYGWIN__)) |
| 103 |
# include <io.h> |
| 104 |
# include <direct.h> |
| 105 |
#elif (@GNULIB_CLOSE@ || @GNULIB_DUP@ || @GNULIB_DUP2@ || @GNULIB_ISATTY@ \ |
| 106 |
|| @GNULIB_LSEEK@ || @GNULIB_READ@ || @GNULIB_UNLINK@ || @GNULIB_WRITE@ \ |
| 107 |
|| defined GNULIB_POSIXCHECK) \ |
| 108 |
&& (defined _WIN32 && ! defined __CYGWIN__) |
| 109 |
# include <io.h> |
| 110 |
#endif |
| 111 |
|
| 112 |
|
| 113 |
|
| 114 |
|
| 115 |
#if ((@GNULIB_GETDOMAINNAME@ && (defined _AIX || defined __osf__)) \ |
| 116 |
|| (@GNULIB_GETHOSTNAME@ && defined __TANDEM)) \ |
| 117 |
&& !defined __GLIBC__ |
| 118 |
# include <netdb.h> |
| 119 |
#endif |
| 120 |
|
| 121 |
|
| 122 |
|
| 123 |
#if (@GNULIB_FCHOWNAT@ || defined GNULIB_POSIXCHECK) && defined __ANDROID__ \ |
| 124 |
&& !defined __GLIBC__ |
| 125 |
# include <sys/stat.h> |
| 126 |
#endif |
| 127 |
|
| 128 |
|
| 129 |
|
| 130 |
|
| 131 |
#ifndef __GLIBC__ |
| 132 |
|
| 133 |
# include <sys/types.h> |
| 134 |
#endif |
| 135 |
|
| 136 |
|
| 137 |
|
| 138 |
|
| 139 |
|
| 140 |
|
| 141 |
|
| 142 |
|
| 143 |
|
| 144 |
#if @GNULIB_GETOPT_POSIX@ && @GNULIB_UNISTD_H_GETOPT@ && !defined _GL_SYSTEM_GETOPT |
| 145 |
# include <getopt-cdefs.h> |
| 146 |
# include <getopt-pfx-core.h> |
| 147 |
#endif |
| 148 |
|
| 149 |
#ifndef _GL_INLINE_HEADER_BEGIN |
| 150 |
#error "Please include config.h first." |
| 151 |
#endif |
| 152 |
_GL_INLINE_HEADER_BEGIN |
| 153 |
#ifndef _GL_UNISTD_INLINE |
| 154 |
# define _GL_UNISTD_INLINE _GL_INLINE |
| 155 |
#endif |
| 156 |
|
| 157 |
|
| 158 |
|
| 159 |
#if @GNULIB_GETHOSTNAME@ && @UNISTD_H_HAVE_WINSOCK2_H@ |
| 160 |
# if !defined _@GUARD_PREFIX@_SYS_SOCKET_H |
| 161 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 162 |
# undef socket |
| 163 |
# define socket socket_used_without_including_sys_socket_h |
| 164 |
# undef connect |
| 165 |
# define connect connect_used_without_including_sys_socket_h |
| 166 |
# undef accept |
| 167 |
# define accept accept_used_without_including_sys_socket_h |
| 168 |
# undef bind |
| 169 |
# define bind bind_used_without_including_sys_socket_h |
| 170 |
# undef getpeername |
| 171 |
# define getpeername getpeername_used_without_including_sys_socket_h |
| 172 |
# undef getsockname |
| 173 |
# define getsockname getsockname_used_without_including_sys_socket_h |
| 174 |
# undef getsockopt |
| 175 |
# define getsockopt getsockopt_used_without_including_sys_socket_h |
| 176 |
# undef listen |
| 177 |
# define listen listen_used_without_including_sys_socket_h |
| 178 |
# undef recv |
| 179 |
# define recv recv_used_without_including_sys_socket_h |
| 180 |
# undef send |
| 181 |
# define send send_used_without_including_sys_socket_h |
| 182 |
# undef recvfrom |
| 183 |
# define recvfrom recvfrom_used_without_including_sys_socket_h |
| 184 |
# undef sendto |
| 185 |
# define sendto sendto_used_without_including_sys_socket_h |
| 186 |
# undef setsockopt |
| 187 |
# define setsockopt setsockopt_used_without_including_sys_socket_h |
| 188 |
# undef shutdown |
| 189 |
# define shutdown shutdown_used_without_including_sys_socket_h |
| 190 |
# else |
| 191 |
_GL_WARN_ON_USE (socket, |
| 192 |
"socket() used without including <sys/socket.h>"); |
| 193 |
_GL_WARN_ON_USE (connect, |
| 194 |
"connect() used without including <sys/socket.h>"); |
| 195 |
_GL_WARN_ON_USE (accept, |
| 196 |
"accept() used without including <sys/socket.h>"); |
| 197 |
_GL_WARN_ON_USE (bind, |
| 198 |
"bind() used without including <sys/socket.h>"); |
| 199 |
_GL_WARN_ON_USE (getpeername, |
| 200 |
"getpeername() used without including <sys/socket.h>"); |
| 201 |
_GL_WARN_ON_USE (getsockname, |
| 202 |
"getsockname() used without including <sys/socket.h>"); |
| 203 |
_GL_WARN_ON_USE (getsockopt, |
| 204 |
"getsockopt() used without including <sys/socket.h>"); |
| 205 |
_GL_WARN_ON_USE (listen, |
| 206 |
"listen() used without including <sys/socket.h>"); |
| 207 |
_GL_WARN_ON_USE (recv, |
| 208 |
"recv() used without including <sys/socket.h>"); |
| 209 |
_GL_WARN_ON_USE (send, |
| 210 |
"send() used without including <sys/socket.h>"); |
| 211 |
_GL_WARN_ON_USE (recvfrom, |
| 212 |
"recvfrom() used without including <sys/socket.h>"); |
| 213 |
_GL_WARN_ON_USE (sendto, |
| 214 |
"sendto() used without including <sys/socket.h>"); |
| 215 |
_GL_WARN_ON_USE (setsockopt, |
| 216 |
"setsockopt() used without including <sys/socket.h>"); |
| 217 |
_GL_WARN_ON_USE (shutdown, |
| 218 |
"shutdown() used without including <sys/socket.h>"); |
| 219 |
# endif |
| 220 |
# endif |
| 221 |
# if !defined _@GUARD_PREFIX@_SYS_SELECT_H |
| 222 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 223 |
# undef select |
| 224 |
# define select select_used_without_including_sys_select_h |
| 225 |
# else |
| 226 |
_GL_WARN_ON_USE (select, |
| 227 |
"select() used without including <sys/select.h>"); |
| 228 |
# endif |
| 229 |
# endif |
| 230 |
#endif |
| 231 |
|
| 232 |
|
| 233 |
|
| 234 |
#ifndef STDIN_FILENO |
| 235 |
# define STDIN_FILENO 0 |
| 236 |
#endif |
| 237 |
#ifndef STDOUT_FILENO |
| 238 |
# define STDOUT_FILENO 1 |
| 239 |
#endif |
| 240 |
#ifndef STDERR_FILENO |
| 241 |
# define STDERR_FILENO 2 |
| 242 |
#endif |
| 243 |
|
| 244 |
|
| 245 |
#ifndef F_OK |
| 246 |
# define F_OK 0 |
| 247 |
# define X_OK 1 |
| 248 |
# define W_OK 2 |
| 249 |
# define R_OK 4 |
| 250 |
#endif |
| 251 |
|
| 252 |
|
| 253 |
|
| 254 |
|
| 255 |
|
| 256 |
#if @GNULIB_ACCESS@ |
| 257 |
# if @REPLACE_ACCESS@ |
| 258 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 259 |
# undef access |
| 260 |
# define access rpl_access |
| 261 |
# endif |
| 262 |
_GL_FUNCDECL_RPL (access, int, (const char *file, int mode) |
| 263 |
_GL_ARG_NONNULL ((1))); |
| 264 |
_GL_CXXALIAS_RPL (access, int, (const char *file, int mode)); |
| 265 |
# else |
| 266 |
_GL_CXXALIAS_SYS (access, int, (const char *file, int mode)); |
| 267 |
# endif |
| 268 |
_GL_CXXALIASWARN (access); |
| 269 |
#elif defined GNULIB_POSIXCHECK |
| 270 |
# undef access |
| 271 |
# if HAVE_RAW_DECL_ACCESS |
| 272 |
|
| 273 |
_GL_WARN_ON_USE (access, "access does not always support X_OK - " |
| 274 |
"use gnulib module access for portability; " |
| 275 |
"also, this function is a security risk - " |
| 276 |
"use the gnulib module faccessat instead"); |
| 277 |
# endif |
| 278 |
#endif |
| 279 |
|
| 280 |
|
| 281 |
#if @GNULIB_CHDIR@ |
| 282 |
_GL_CXXALIAS_SYS (chdir, int, (const char *file) _GL_ARG_NONNULL ((1))); |
| 283 |
_GL_CXXALIASWARN (chdir); |
| 284 |
#elif defined GNULIB_POSIXCHECK |
| 285 |
# undef chdir |
| 286 |
# if HAVE_RAW_DECL_CHDIR |
| 287 |
_GL_WARN_ON_USE (chown, "chdir is not always in <unistd.h> - " |
| 288 |
"use gnulib module chdir for portability"); |
| 289 |
# endif |
| 290 |
#endif |
| 291 |
|
| 292 |
|
| 293 |
#if @GNULIB_CHOWN@ |
| 294 |
|
| 295 |
|
| 296 |
|
| 297 |
|
| 298 |
|
| 299 |
# if @REPLACE_CHOWN@ |
| 300 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 301 |
# undef chown |
| 302 |
# define chown rpl_chown |
| 303 |
# endif |
| 304 |
_GL_FUNCDECL_RPL (chown, int, (const char *file, uid_t uid, gid_t gid) |
| 305 |
_GL_ARG_NONNULL ((1))); |
| 306 |
_GL_CXXALIAS_RPL (chown, int, (const char *file, uid_t uid, gid_t gid)); |
| 307 |
# else |
| 308 |
# if !@HAVE_CHOWN@ |
| 309 |
_GL_FUNCDECL_SYS (chown, int, (const char *file, uid_t uid, gid_t gid) |
| 310 |
_GL_ARG_NONNULL ((1))); |
| 311 |
# endif |
| 312 |
_GL_CXXALIAS_SYS (chown, int, (const char *file, uid_t uid, gid_t gid)); |
| 313 |
# endif |
| 314 |
_GL_CXXALIASWARN (chown); |
| 315 |
#elif defined GNULIB_POSIXCHECK |
| 316 |
# undef chown |
| 317 |
# if HAVE_RAW_DECL_CHOWN |
| 318 |
_GL_WARN_ON_USE (chown, "chown fails to follow symlinks on some systems and " |
| 319 |
"doesn't treat a uid or gid of -1 on some systems - " |
| 320 |
"use gnulib module chown for portability"); |
| 321 |
# endif |
| 322 |
#endif |
| 323 |
|
| 324 |
|
| 325 |
#if @GNULIB_CLOSE@ |
| 326 |
# if @REPLACE_CLOSE@ |
| 327 |
|
| 328 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 329 |
# undef close |
| 330 |
# define close rpl_close |
| 331 |
# endif |
| 332 |
_GL_FUNCDECL_RPL (close, int, (int fd)); |
| 333 |
_GL_CXXALIAS_RPL (close, int, (int fd)); |
| 334 |
# else |
| 335 |
_GL_CXXALIAS_SYS (close, int, (int fd)); |
| 336 |
# endif |
| 337 |
_GL_CXXALIASWARN (close); |
| 338 |
#elif @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ |
| 339 |
# undef close |
| 340 |
# define close close_used_without_requesting_gnulib_module_close |
| 341 |
#elif defined GNULIB_POSIXCHECK |
| 342 |
# undef close |
| 343 |
|
| 344 |
_GL_WARN_ON_USE (close, "close does not portably work on sockets - " |
| 345 |
"use gnulib module close for portability"); |
| 346 |
#endif |
| 347 |
|
| 348 |
|
| 349 |
#if @GNULIB_COPY_FILE_RANGE@ |
| 350 |
# if !@HAVE_COPY_FILE_RANGE@ |
| 351 |
_GL_FUNCDECL_SYS (copy_file_range, ssize_t, (int ifd, off_t *ipos, |
| 352 |
int ofd, off_t *opos, |
| 353 |
size_t len, unsigned flags)); |
| 354 |
_GL_CXXALIAS_SYS (copy_file_range, ssize_t, (int ifd, off_t *ipos, |
| 355 |
int ofd, off_t *opos, |
| 356 |
size_t len, unsigned flags)); |
| 357 |
# endif |
| 358 |
_GL_CXXALIASWARN (copy_file_range); |
| 359 |
#elif defined GNULIB_POSIXCHECK |
| 360 |
|
| 361 |
_GL_WARN_ON_USE (copy_file_range, |
| 362 |
"copy_file_range is unportable - " |
| 363 |
"use gnulib module copy_file_range for portability"); |
| 364 |
#endif |
| 365 |
|
| 366 |
|
| 367 |
#if @GNULIB_DUP@ |
| 368 |
# if @REPLACE_DUP@ |
| 369 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 370 |
# define dup rpl_dup |
| 371 |
# endif |
| 372 |
_GL_FUNCDECL_RPL (dup, int, (int oldfd)); |
| 373 |
_GL_CXXALIAS_RPL (dup, int, (int oldfd)); |
| 374 |
# else |
| 375 |
_GL_CXXALIAS_SYS (dup, int, (int oldfd)); |
| 376 |
# endif |
| 377 |
_GL_CXXALIASWARN (dup); |
| 378 |
#elif defined GNULIB_POSIXCHECK |
| 379 |
# undef dup |
| 380 |
# if HAVE_RAW_DECL_DUP |
| 381 |
_GL_WARN_ON_USE (dup, "dup is unportable - " |
| 382 |
"use gnulib module dup for portability"); |
| 383 |
# endif |
| 384 |
#endif |
| 385 |
|
| 386 |
|
| 387 |
#if @GNULIB_DUP2@ |
| 388 |
|
| 389 |
|
| 390 |
|
| 391 |
|
| 392 |
|
| 393 |
# if @REPLACE_DUP2@ |
| 394 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 395 |
# define dup2 rpl_dup2 |
| 396 |
# endif |
| 397 |
_GL_FUNCDECL_RPL (dup2, int, (int oldfd, int newfd)); |
| 398 |
_GL_CXXALIAS_RPL (dup2, int, (int oldfd, int newfd)); |
| 399 |
# else |
| 400 |
# if !@HAVE_DUP2@ |
| 401 |
_GL_FUNCDECL_SYS (dup2, int, (int oldfd, int newfd)); |
| 402 |
# endif |
| 403 |
_GL_CXXALIAS_SYS (dup2, int, (int oldfd, int newfd)); |
| 404 |
# endif |
| 405 |
_GL_CXXALIASWARN (dup2); |
| 406 |
#elif defined GNULIB_POSIXCHECK |
| 407 |
# undef dup2 |
| 408 |
# if HAVE_RAW_DECL_DUP2 |
| 409 |
_GL_WARN_ON_USE (dup2, "dup2 is unportable - " |
| 410 |
"use gnulib module dup2 for portability"); |
| 411 |
# endif |
| 412 |
#endif |
| 413 |
|
| 414 |
|
| 415 |
#if @GNULIB_DUP3@ |
| 416 |
|
| 417 |
|
| 418 |
|
| 419 |
|
| 420 |
|
| 421 |
|
| 422 |
|
| 423 |
|
| 424 |
# if @HAVE_DUP3@ |
| 425 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 426 |
# define dup3 rpl_dup3 |
| 427 |
# endif |
| 428 |
_GL_FUNCDECL_RPL (dup3, int, (int oldfd, int newfd, int flags)); |
| 429 |
_GL_CXXALIAS_RPL (dup3, int, (int oldfd, int newfd, int flags)); |
| 430 |
# else |
| 431 |
_GL_FUNCDECL_SYS (dup3, int, (int oldfd, int newfd, int flags)); |
| 432 |
_GL_CXXALIAS_SYS (dup3, int, (int oldfd, int newfd, int flags)); |
| 433 |
# endif |
| 434 |
_GL_CXXALIASWARN (dup3); |
| 435 |
#elif defined GNULIB_POSIXCHECK |
| 436 |
# undef dup3 |
| 437 |
# if HAVE_RAW_DECL_DUP3 |
| 438 |
_GL_WARN_ON_USE (dup3, "dup3 is unportable - " |
| 439 |
"use gnulib module dup3 for portability"); |
| 440 |
# endif |
| 441 |
#endif |
| 442 |
|
| 443 |
|
| 444 |
#if @GNULIB_ENVIRON@ |
| 445 |
# if defined __CYGWIN__ && !defined __i386__ |
| 446 |
|
| 447 |
|
| 448 |
|
| 449 |
|
| 450 |
_GL_EXTERN_C __declspec(dllimport) char **environ; |
| 451 |
# endif |
| 452 |
# if !@HAVE_DECL_ENVIRON@ |
| 453 |
|
| 454 |
|
| 455 |
# if defined __APPLE__ && defined __MACH__ |
| 456 |
# include <TargetConditionals.h> |
| 457 |
# if !TARGET_OS_IPHONE && !TARGET_IPHONE_SIMULATOR |
| 458 |
# define _GL_USE_CRT_EXTERNS |
| 459 |
# endif |
| 460 |
# endif |
| 461 |
# ifdef _GL_USE_CRT_EXTERNS |
| 462 |
# include <crt_externs.h> |
| 463 |
# define environ (*_NSGetEnviron ()) |
| 464 |
# else |
| 465 |
# ifdef __cplusplus |
| 466 |
extern "C" { |
| 467 |
# endif |
| 468 |
extern char **environ; |
| 469 |
# ifdef __cplusplus |
| 470 |
} |
| 471 |
# endif |
| 472 |
# endif |
| 473 |
# endif |
| 474 |
#elif defined GNULIB_POSIXCHECK |
| 475 |
# if HAVE_RAW_DECL_ENVIRON |
| 476 |
_GL_UNISTD_INLINE char *** |
| 477 |
_GL_WARN_ON_USE_ATTRIBUTE ("environ is unportable - " |
| 478 |
"use gnulib module environ for portability") |
| 479 |
rpl_environ (void) |
| 480 |
{ |
| 481 |
return &environ; |
| 482 |
} |
| 483 |
# undef environ |
| 484 |
# define environ (*rpl_environ ()) |
| 485 |
# endif |
| 486 |
#endif |
| 487 |
|
| 488 |
|
| 489 |
#if @GNULIB_EUIDACCESS@ |
| 490 |
|
| 491 |
|
| 492 |
# if !@HAVE_EUIDACCESS@ |
| 493 |
_GL_FUNCDECL_SYS (euidaccess, int, (const char *filename, int mode) |
| 494 |
_GL_ARG_NONNULL ((1))); |
| 495 |
# endif |
| 496 |
_GL_CXXALIAS_SYS (euidaccess, int, (const char *filename, int mode)); |
| 497 |
_GL_CXXALIASWARN (euidaccess); |
| 498 |
# if defined GNULIB_POSIXCHECK |
| 499 |
|
| 500 |
_GL_WARN_ON_USE (euidaccess, "the euidaccess function is a security risk - " |
| 501 |
"use the gnulib module faccessat instead"); |
| 502 |
# endif |
| 503 |
#elif defined GNULIB_POSIXCHECK |
| 504 |
# undef euidaccess |
| 505 |
# if HAVE_RAW_DECL_EUIDACCESS |
| 506 |
_GL_WARN_ON_USE (euidaccess, "euidaccess is unportable - " |
| 507 |
"use gnulib module euidaccess for portability"); |
| 508 |
# endif |
| 509 |
#endif |
| 510 |
|
| 511 |
|
| 512 |
#if @GNULIB_FACCESSAT@ |
| 513 |
# if @REPLACE_FACCESSAT@ |
| 514 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 515 |
# undef faccessat |
| 516 |
# define faccessat rpl_faccessat |
| 517 |
# endif |
| 518 |
_GL_FUNCDECL_RPL (faccessat, int, |
| 519 |
(int fd, char const *name, int mode, int flag) |
| 520 |
_GL_ARG_NONNULL ((2))); |
| 521 |
_GL_CXXALIAS_RPL (faccessat, int, |
| 522 |
(int fd, char const *name, int mode, int flag)); |
| 523 |
# else |
| 524 |
# if !@HAVE_FACCESSAT@ |
| 525 |
_GL_FUNCDECL_SYS (faccessat, int, |
| 526 |
(int fd, char const *file, int mode, int flag) |
| 527 |
_GL_ARG_NONNULL ((2))); |
| 528 |
# endif |
| 529 |
_GL_CXXALIAS_SYS (faccessat, int, |
| 530 |
(int fd, char const *file, int mode, int flag)); |
| 531 |
# endif |
| 532 |
_GL_CXXALIASWARN (faccessat); |
| 533 |
#elif defined GNULIB_POSIXCHECK |
| 534 |
# undef faccessat |
| 535 |
# if HAVE_RAW_DECL_FACCESSAT |
| 536 |
_GL_WARN_ON_USE (faccessat, "faccessat is not portable - " |
| 537 |
"use gnulib module faccessat for portability"); |
| 538 |
# endif |
| 539 |
#endif |
| 540 |
|
| 541 |
|
| 542 |
#if @GNULIB_FCHDIR@ |
| 543 |
|
| 544 |
|
| 545 |
|
| 546 |
|
| 547 |
|
| 548 |
# if ! @HAVE_FCHDIR@ |
| 549 |
_GL_FUNCDECL_SYS (fchdir, int, (int )); |
| 550 |
|
| 551 |
|
| 552 |
_GL_EXTERN_C int _gl_register_fd (int fd, const char *filename) |
| 553 |
_GL_ARG_NONNULL ((2)); |
| 554 |
_GL_EXTERN_C void _gl_unregister_fd (int fd); |
| 555 |
_GL_EXTERN_C int _gl_register_dup (int oldfd, int newfd); |
| 556 |
_GL_EXTERN_C const char *_gl_directory_name (int fd); |
| 557 |
|
| 558 |
# else |
| 559 |
# if !@HAVE_DECL_FCHDIR@ |
| 560 |
_GL_FUNCDECL_SYS (fchdir, int, (int )); |
| 561 |
# endif |
| 562 |
# endif |
| 563 |
_GL_CXXALIAS_SYS (fchdir, int, (int )); |
| 564 |
_GL_CXXALIASWARN (fchdir); |
| 565 |
#elif defined GNULIB_POSIXCHECK |
| 566 |
# undef fchdir |
| 567 |
# if HAVE_RAW_DECL_FCHDIR |
| 568 |
_GL_WARN_ON_USE (fchdir, "fchdir is unportable - " |
| 569 |
"use gnulib module fchdir for portability"); |
| 570 |
# endif |
| 571 |
#endif |
| 572 |
|
| 573 |
|
| 574 |
#if @GNULIB_FCHOWNAT@ |
| 575 |
# if @REPLACE_FCHOWNAT@ |
| 576 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 577 |
# undef fchownat |
| 578 |
# define fchownat rpl_fchownat |
| 579 |
# endif |
| 580 |
_GL_FUNCDECL_RPL (fchownat, int, (int fd, char const *file, |
| 581 |
uid_t owner, gid_t group, int flag) |
| 582 |
_GL_ARG_NONNULL ((2))); |
| 583 |
_GL_CXXALIAS_RPL (fchownat, int, (int fd, char const *file, |
| 584 |
uid_t owner, gid_t group, int flag)); |
| 585 |
# else |
| 586 |
# if !@HAVE_FCHOWNAT@ |
| 587 |
_GL_FUNCDECL_SYS (fchownat, int, (int fd, char const *file, |
| 588 |
uid_t owner, gid_t group, int flag) |
| 589 |
_GL_ARG_NONNULL ((2))); |
| 590 |
# endif |
| 591 |
_GL_CXXALIAS_SYS (fchownat, int, (int fd, char const *file, |
| 592 |
uid_t owner, gid_t group, int flag)); |
| 593 |
# endif |
| 594 |
_GL_CXXALIASWARN (fchownat); |
| 595 |
#elif defined GNULIB_POSIXCHECK |
| 596 |
# undef fchownat |
| 597 |
# if HAVE_RAW_DECL_FCHOWNAT |
| 598 |
_GL_WARN_ON_USE (fchownat, "fchownat is not portable - " |
| 599 |
"use gnulib module openat for portability"); |
| 600 |
# endif |
| 601 |
#endif |
| 602 |
|
| 603 |
|
| 604 |
#if @GNULIB_FDATASYNC@ |
| 605 |
|
| 606 |
|
| 607 |
|
| 608 |
|
| 609 |
# if !@HAVE_FDATASYNC@ || !@HAVE_DECL_FDATASYNC@ |
| 610 |
_GL_FUNCDECL_SYS (fdatasync, int, (int fd)); |
| 611 |
# endif |
| 612 |
_GL_CXXALIAS_SYS (fdatasync, int, (int fd)); |
| 613 |
_GL_CXXALIASWARN (fdatasync); |
| 614 |
#elif defined GNULIB_POSIXCHECK |
| 615 |
# undef fdatasync |
| 616 |
# if HAVE_RAW_DECL_FDATASYNC |
| 617 |
_GL_WARN_ON_USE (fdatasync, "fdatasync is unportable - " |
| 618 |
"use gnulib module fdatasync for portability"); |
| 619 |
# endif |
| 620 |
#endif |
| 621 |
|
| 622 |
|
| 623 |
#if @GNULIB_FSYNC@ |
| 624 |
|
| 625 |
|
| 626 |
|
| 627 |
|
| 628 |
# if !@HAVE_FSYNC@ |
| 629 |
_GL_FUNCDECL_SYS (fsync, int, (int fd)); |
| 630 |
# endif |
| 631 |
_GL_CXXALIAS_SYS (fsync, int, (int fd)); |
| 632 |
_GL_CXXALIASWARN (fsync); |
| 633 |
#elif defined GNULIB_POSIXCHECK |
| 634 |
# undef fsync |
| 635 |
# if HAVE_RAW_DECL_FSYNC |
| 636 |
_GL_WARN_ON_USE (fsync, "fsync is unportable - " |
| 637 |
"use gnulib module fsync for portability"); |
| 638 |
# endif |
| 639 |
#endif |
| 640 |
|
| 641 |
|
| 642 |
#if @GNULIB_FTRUNCATE@ |
| 643 |
|
| 644 |
|
| 645 |
|
| 646 |
|
| 647 |
# if @REPLACE_FTRUNCATE@ |
| 648 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 649 |
# undef ftruncate |
| 650 |
# define ftruncate rpl_ftruncate |
| 651 |
# endif |
| 652 |
_GL_FUNCDECL_RPL (ftruncate, int, (int fd, off_t length)); |
| 653 |
_GL_CXXALIAS_RPL (ftruncate, int, (int fd, off_t length)); |
| 654 |
# else |
| 655 |
# if !@HAVE_FTRUNCATE@ |
| 656 |
_GL_FUNCDECL_SYS (ftruncate, int, (int fd, off_t length)); |
| 657 |
# endif |
| 658 |
_GL_CXXALIAS_SYS (ftruncate, int, (int fd, off_t length)); |
| 659 |
# endif |
| 660 |
_GL_CXXALIASWARN (ftruncate); |
| 661 |
#elif defined GNULIB_POSIXCHECK |
| 662 |
# undef ftruncate |
| 663 |
# if HAVE_RAW_DECL_FTRUNCATE |
| 664 |
_GL_WARN_ON_USE (ftruncate, "ftruncate is unportable - " |
| 665 |
"use gnulib module ftruncate for portability"); |
| 666 |
# endif |
| 667 |
#endif |
| 668 |
|
| 669 |
|
| 670 |
#if @GNULIB_GETCWD@ |
| 671 |
|
| 672 |
|
| 673 |
|
| 674 |
|
| 675 |
|
| 676 |
|
| 677 |
|
| 678 |
|
| 679 |
|
| 680 |
|
| 681 |
# if @REPLACE_GETCWD@ |
| 682 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 683 |
# define getcwd rpl_getcwd |
| 684 |
# endif |
| 685 |
_GL_FUNCDECL_RPL (getcwd, char *, (char *buf, size_t size)); |
| 686 |
_GL_CXXALIAS_RPL (getcwd, char *, (char *buf, size_t size)); |
| 687 |
# else |
| 688 |
|
| 689 |
|
| 690 |
_GL_CXXALIAS_SYS_CAST (getcwd, char *, (char *buf, size_t size)); |
| 691 |
# endif |
| 692 |
_GL_CXXALIASWARN (getcwd); |
| 693 |
#elif defined GNULIB_POSIXCHECK |
| 694 |
# undef getcwd |
| 695 |
# if HAVE_RAW_DECL_GETCWD |
| 696 |
_GL_WARN_ON_USE (getcwd, "getcwd is unportable - " |
| 697 |
"use gnulib module getcwd for portability"); |
| 698 |
# endif |
| 699 |
#endif |
| 700 |
|
| 701 |
|
| 702 |
#if @GNULIB_GETDOMAINNAME@ |
| 703 |
|
| 704 |
|
| 705 |
|
| 706 |
|
| 707 |
|
| 708 |
|
| 709 |
|
| 710 |
|
| 711 |
|
| 712 |
|
| 713 |
# if @REPLACE_GETDOMAINNAME@ |
| 714 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 715 |
# undef getdomainname |
| 716 |
# define getdomainname rpl_getdomainname |
| 717 |
# endif |
| 718 |
_GL_FUNCDECL_RPL (getdomainname, int, (char *name, size_t len) |
| 719 |
_GL_ARG_NONNULL ((1))); |
| 720 |
_GL_CXXALIAS_RPL (getdomainname, int, (char *name, size_t len)); |
| 721 |
# else |
| 722 |
# if !@HAVE_DECL_GETDOMAINNAME@ |
| 723 |
_GL_FUNCDECL_SYS (getdomainname, int, (char *name, size_t len) |
| 724 |
_GL_ARG_NONNULL ((1))); |
| 725 |
# endif |
| 726 |
_GL_CXXALIAS_SYS (getdomainname, int, (char *name, size_t len)); |
| 727 |
# endif |
| 728 |
_GL_CXXALIASWARN (getdomainname); |
| 729 |
#elif defined GNULIB_POSIXCHECK |
| 730 |
# undef getdomainname |
| 731 |
# if HAVE_RAW_DECL_GETDOMAINNAME |
| 732 |
_GL_WARN_ON_USE (getdomainname, "getdomainname is unportable - " |
| 733 |
"use gnulib module getdomainname for portability"); |
| 734 |
# endif |
| 735 |
#endif |
| 736 |
|
| 737 |
|
| 738 |
#if @GNULIB_GETDTABLESIZE@ |
| 739 |
|
| 740 |
|
| 741 |
# if @REPLACE_GETDTABLESIZE@ |
| 742 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 743 |
# undef getdtablesize |
| 744 |
# define getdtablesize rpl_getdtablesize |
| 745 |
# endif |
| 746 |
_GL_FUNCDECL_RPL (getdtablesize, int, (void)); |
| 747 |
_GL_CXXALIAS_RPL (getdtablesize, int, (void)); |
| 748 |
# else |
| 749 |
# if !@HAVE_GETDTABLESIZE@ |
| 750 |
_GL_FUNCDECL_SYS (getdtablesize, int, (void)); |
| 751 |
# endif |
| 752 |
|
| 753 |
|
| 754 |
_GL_CXXALIAS_SYS_CAST (getdtablesize, int, (void)); |
| 755 |
# endif |
| 756 |
_GL_CXXALIASWARN (getdtablesize); |
| 757 |
#elif defined GNULIB_POSIXCHECK |
| 758 |
# undef getdtablesize |
| 759 |
# if HAVE_RAW_DECL_GETDTABLESIZE |
| 760 |
_GL_WARN_ON_USE (getdtablesize, "getdtablesize is unportable - " |
| 761 |
"use gnulib module getdtablesize for portability"); |
| 762 |
# endif |
| 763 |
#endif |
| 764 |
|
| 765 |
|
| 766 |
#if @GNULIB_GETGROUPS@ |
| 767 |
|
| 768 |
|
| 769 |
|
| 770 |
|
| 771 |
|
| 772 |
# if @REPLACE_GETGROUPS@ |
| 773 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 774 |
# undef getgroups |
| 775 |
# define getgroups rpl_getgroups |
| 776 |
# endif |
| 777 |
_GL_FUNCDECL_RPL (getgroups, int, (int n, gid_t *groups)); |
| 778 |
_GL_CXXALIAS_RPL (getgroups, int, (int n, gid_t *groups)); |
| 779 |
# else |
| 780 |
# if !@HAVE_GETGROUPS@ |
| 781 |
_GL_FUNCDECL_SYS (getgroups, int, (int n, gid_t *groups)); |
| 782 |
# endif |
| 783 |
_GL_CXXALIAS_SYS (getgroups, int, (int n, gid_t *groups)); |
| 784 |
# endif |
| 785 |
_GL_CXXALIASWARN (getgroups); |
| 786 |
#elif defined GNULIB_POSIXCHECK |
| 787 |
# undef getgroups |
| 788 |
# if HAVE_RAW_DECL_GETGROUPS |
| 789 |
_GL_WARN_ON_USE (getgroups, "getgroups is unportable - " |
| 790 |
"use gnulib module getgroups for portability"); |
| 791 |
# endif |
| 792 |
#endif |
| 793 |
|
| 794 |
|
| 795 |
#if @GNULIB_GETHOSTNAME@ |
| 796 |
|
| 797 |
|
| 798 |
|
| 799 |
|
| 800 |
|
| 801 |
|
| 802 |
|
| 803 |
# if @UNISTD_H_HAVE_WINSOCK2_H@ |
| 804 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 805 |
# undef gethostname |
| 806 |
# define gethostname rpl_gethostname |
| 807 |
# endif |
| 808 |
_GL_FUNCDECL_RPL (gethostname, int, (char *name, size_t len) |
| 809 |
_GL_ARG_NONNULL ((1))); |
| 810 |
_GL_CXXALIAS_RPL (gethostname, int, (char *name, size_t len)); |
| 811 |
# else |
| 812 |
# if !@HAVE_GETHOSTNAME@ |
| 813 |
_GL_FUNCDECL_SYS (gethostname, int, (char *name, size_t len) |
| 814 |
_GL_ARG_NONNULL ((1))); |
| 815 |
# endif |
| 816 |
|
| 817 |
|
| 818 |
|
| 819 |
_GL_CXXALIAS_SYS_CAST (gethostname, int, (char *name, size_t len)); |
| 820 |
# endif |
| 821 |
_GL_CXXALIASWARN (gethostname); |
| 822 |
#elif @UNISTD_H_HAVE_WINSOCK2_H@ |
| 823 |
# undef gethostname |
| 824 |
# define gethostname gethostname_used_without_requesting_gnulib_module_gethostname |
| 825 |
#elif defined GNULIB_POSIXCHECK |
| 826 |
# undef gethostname |
| 827 |
# if HAVE_RAW_DECL_GETHOSTNAME |
| 828 |
_GL_WARN_ON_USE (gethostname, "gethostname is unportable - " |
| 829 |
"use gnulib module gethostname for portability"); |
| 830 |
# endif |
| 831 |
#endif |
| 832 |
|
| 833 |
|
| 834 |
#if @GNULIB_GETLOGIN@ |
| 835 |
|
| 836 |
|
| 837 |
|
| 838 |
|
| 839 |
|
| 840 |
|
| 841 |
|
| 842 |
|
| 843 |
|
| 844 |
|
| 845 |
# if !@HAVE_DECL_GETLOGIN@ |
| 846 |
_GL_FUNCDECL_SYS (getlogin, char *, (void)); |
| 847 |
# endif |
| 848 |
_GL_CXXALIAS_SYS (getlogin, char *, (void)); |
| 849 |
_GL_CXXALIASWARN (getlogin); |
| 850 |
#elif defined GNULIB_POSIXCHECK |
| 851 |
# undef getlogin |
| 852 |
# if HAVE_RAW_DECL_GETLOGIN |
| 853 |
_GL_WARN_ON_USE (getlogin, "getlogin is unportable - " |
| 854 |
"use gnulib module getlogin for portability"); |
| 855 |
# endif |
| 856 |
#endif |
| 857 |
|
| 858 |
|
| 859 |
#if @GNULIB_GETLOGIN_R@ |
| 860 |
|
| 861 |
|
| 862 |
|
| 863 |
|
| 864 |
|
| 865 |
|
| 866 |
|
| 867 |
|
| 868 |
|
| 869 |
|
| 870 |
|
| 871 |
|
| 872 |
|
| 873 |
|
| 874 |
# if @REPLACE_GETLOGIN_R@ |
| 875 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 876 |
# define getlogin_r rpl_getlogin_r |
| 877 |
# endif |
| 878 |
_GL_FUNCDECL_RPL (getlogin_r, int, (char *name, size_t size) |
| 879 |
_GL_ARG_NONNULL ((1))); |
| 880 |
_GL_CXXALIAS_RPL (getlogin_r, int, (char *name, size_t size)); |
| 881 |
# else |
| 882 |
# if !@HAVE_DECL_GETLOGIN_R@ |
| 883 |
_GL_FUNCDECL_SYS (getlogin_r, int, (char *name, size_t size) |
| 884 |
_GL_ARG_NONNULL ((1))); |
| 885 |
# endif |
| 886 |
|
| 887 |
|
| 888 |
_GL_CXXALIAS_SYS_CAST (getlogin_r, int, (char *name, size_t size)); |
| 889 |
# endif |
| 890 |
_GL_CXXALIASWARN (getlogin_r); |
| 891 |
#elif defined GNULIB_POSIXCHECK |
| 892 |
# undef getlogin_r |
| 893 |
# if HAVE_RAW_DECL_GETLOGIN_R |
| 894 |
_GL_WARN_ON_USE (getlogin_r, "getlogin_r is unportable - " |
| 895 |
"use gnulib module getlogin_r for portability"); |
| 896 |
# endif |
| 897 |
#endif |
| 898 |
|
| 899 |
|
| 900 |
#if @GNULIB_GETPAGESIZE@ |
| 901 |
# if @REPLACE_GETPAGESIZE@ |
| 902 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 903 |
# define getpagesize rpl_getpagesize |
| 904 |
# endif |
| 905 |
_GL_FUNCDECL_RPL (getpagesize, int, (void)); |
| 906 |
_GL_CXXALIAS_RPL (getpagesize, int, (void)); |
| 907 |
# else |
| 908 |
|
| 909 |
|
| 910 |
# if defined __hpux |
| 911 |
_GL_FUNCDECL_SYS (getpagesize, int, (void)); |
| 912 |
# endif |
| 913 |
# if !@HAVE_GETPAGESIZE@ |
| 914 |
# if !defined getpagesize |
| 915 |
|
| 916 |
# if !defined _gl_getpagesize && defined _SC_PAGESIZE |
| 917 |
# if ! (defined __VMS && __VMS_VER < 70000000) |
| 918 |
# define _gl_getpagesize() sysconf (_SC_PAGESIZE) |
| 919 |
# endif |
| 920 |
# endif |
| 921 |
|
| 922 |
# if !defined _gl_getpagesize && defined __VMS |
| 923 |
# ifdef __ALPHA |
| 924 |
# define _gl_getpagesize() 8192 |
| 925 |
# else |
| 926 |
# define _gl_getpagesize() 512 |
| 927 |
# endif |
| 928 |
# endif |
| 929 |
|
| 930 |
# if !defined _gl_getpagesize && @HAVE_OS_H@ |
| 931 |
# include <OS.h> |
| 932 |
# if defined B_PAGE_SIZE |
| 933 |
# define _gl_getpagesize() B_PAGE_SIZE |
| 934 |
# endif |
| 935 |
# endif |
| 936 |
|
| 937 |
# if !defined _gl_getpagesize && defined __amigaos4__ |
| 938 |
# define _gl_getpagesize() 2048 |
| 939 |
# endif |
| 940 |
|
| 941 |
# if !defined _gl_getpagesize && @HAVE_SYS_PARAM_H@ |
| 942 |
# include <sys/param.h> |
| 943 |
# ifdef EXEC_PAGESIZE |
| 944 |
# define _gl_getpagesize() EXEC_PAGESIZE |
| 945 |
# else |
| 946 |
# ifdef NBPG |
| 947 |
# ifndef CLSIZE |
| 948 |
# define CLSIZE 1 |
| 949 |
# endif |
| 950 |
# define _gl_getpagesize() (NBPG * CLSIZE) |
| 951 |
# else |
| 952 |
# ifdef NBPC |
| 953 |
# define _gl_getpagesize() NBPC |
| 954 |
# endif |
| 955 |
# endif |
| 956 |
# endif |
| 957 |
# endif |
| 958 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 959 |
# define getpagesize() _gl_getpagesize () |
| 960 |
# else |
| 961 |
# if !GNULIB_defined_getpagesize_function |
| 962 |
_GL_UNISTD_INLINE int |
| 963 |
getpagesize () |
| 964 |
{ |
| 965 |
return _gl_getpagesize (); |
| 966 |
} |
| 967 |
# define GNULIB_defined_getpagesize_function 1 |
| 968 |
# endif |
| 969 |
# endif |
| 970 |
# endif |
| 971 |
# endif |
| 972 |
|
| 973 |
_GL_CXXALIAS_SYS_CAST (getpagesize, int, (void)); |
| 974 |
# endif |
| 975 |
# if @HAVE_DECL_GETPAGESIZE@ |
| 976 |
_GL_CXXALIASWARN (getpagesize); |
| 977 |
# endif |
| 978 |
#elif defined GNULIB_POSIXCHECK |
| 979 |
# undef getpagesize |
| 980 |
# if HAVE_RAW_DECL_GETPAGESIZE |
| 981 |
_GL_WARN_ON_USE (getpagesize, "getpagesize is unportable - " |
| 982 |
"use gnulib module getpagesize for portability"); |
| 983 |
# endif |
| 984 |
#endif |
| 985 |
|
| 986 |
|
| 987 |
#if @GNULIB_GETPASS@ |
| 988 |
|
| 989 |
|
| 990 |
|
| 991 |
|
| 992 |
# if @REPLACE_GETPASS@ |
| 993 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 994 |
# undef getpass |
| 995 |
# define getpass rpl_getpass |
| 996 |
# endif |
| 997 |
_GL_FUNCDECL_RPL (getpass, char *, (const char *prompt) |
| 998 |
_GL_ARG_NONNULL ((1))); |
| 999 |
_GL_CXXALIAS_RPL (getpass, char *, (const char *prompt)); |
| 1000 |
# else |
| 1001 |
# if !@HAVE_GETPASS@ |
| 1002 |
_GL_FUNCDECL_SYS (getpass, char *, (const char *prompt) |
| 1003 |
_GL_ARG_NONNULL ((1))); |
| 1004 |
# endif |
| 1005 |
_GL_CXXALIAS_SYS (getpass, char *, (const char *prompt)); |
| 1006 |
# endif |
| 1007 |
_GL_CXXALIASWARN (getpass); |
| 1008 |
#elif defined GNULIB_POSIXCHECK |
| 1009 |
# undef getpass |
| 1010 |
# if HAVE_RAW_DECL_GETPASS |
| 1011 |
_GL_WARN_ON_USE (getpass, "getpass is unportable - " |
| 1012 |
"use gnulib module getpass or getpass-gnu for portability"); |
| 1013 |
# endif |
| 1014 |
#endif |
| 1015 |
|
| 1016 |
|
| 1017 |
#if @GNULIB_GETUSERSHELL@ |
| 1018 |
|
| 1019 |
|
| 1020 |
# if !@HAVE_DECL_GETUSERSHELL@ |
| 1021 |
_GL_FUNCDECL_SYS (getusershell, char *, (void)); |
| 1022 |
# endif |
| 1023 |
_GL_CXXALIAS_SYS (getusershell, char *, (void)); |
| 1024 |
_GL_CXXALIASWARN (getusershell); |
| 1025 |
#elif defined GNULIB_POSIXCHECK |
| 1026 |
# undef getusershell |
| 1027 |
# if HAVE_RAW_DECL_GETUSERSHELL |
| 1028 |
_GL_WARN_ON_USE (getusershell, "getusershell is unportable - " |
| 1029 |
"use gnulib module getusershell for portability"); |
| 1030 |
# endif |
| 1031 |
#endif |
| 1032 |
|
| 1033 |
#if @GNULIB_GETUSERSHELL@ |
| 1034 |
|
| 1035 |
# if !@HAVE_DECL_GETUSERSHELL@ |
| 1036 |
_GL_FUNCDECL_SYS (setusershell, void, (void)); |
| 1037 |
# endif |
| 1038 |
_GL_CXXALIAS_SYS (setusershell, void, (void)); |
| 1039 |
_GL_CXXALIASWARN (setusershell); |
| 1040 |
#elif defined GNULIB_POSIXCHECK |
| 1041 |
# undef setusershell |
| 1042 |
# if HAVE_RAW_DECL_SETUSERSHELL |
| 1043 |
_GL_WARN_ON_USE (setusershell, "setusershell is unportable - " |
| 1044 |
"use gnulib module getusershell for portability"); |
| 1045 |
# endif |
| 1046 |
#endif |
| 1047 |
|
| 1048 |
#if @GNULIB_GETUSERSHELL@ |
| 1049 |
|
| 1050 |
|
| 1051 |
# if !@HAVE_DECL_GETUSERSHELL@ |
| 1052 |
_GL_FUNCDECL_SYS (endusershell, void, (void)); |
| 1053 |
# endif |
| 1054 |
_GL_CXXALIAS_SYS (endusershell, void, (void)); |
| 1055 |
_GL_CXXALIASWARN (endusershell); |
| 1056 |
#elif defined GNULIB_POSIXCHECK |
| 1057 |
# undef endusershell |
| 1058 |
# if HAVE_RAW_DECL_ENDUSERSHELL |
| 1059 |
_GL_WARN_ON_USE (endusershell, "endusershell is unportable - " |
| 1060 |
"use gnulib module getusershell for portability"); |
| 1061 |
# endif |
| 1062 |
#endif |
| 1063 |
|
| 1064 |
|
| 1065 |
#if @GNULIB_GROUP_MEMBER@ |
| 1066 |
|
| 1067 |
# if !@HAVE_GROUP_MEMBER@ |
| 1068 |
_GL_FUNCDECL_SYS (group_member, int, (gid_t gid)); |
| 1069 |
# endif |
| 1070 |
_GL_CXXALIAS_SYS (group_member, int, (gid_t gid)); |
| 1071 |
_GL_CXXALIASWARN (group_member); |
| 1072 |
#elif defined GNULIB_POSIXCHECK |
| 1073 |
# undef group_member |
| 1074 |
# if HAVE_RAW_DECL_GROUP_MEMBER |
| 1075 |
_GL_WARN_ON_USE (group_member, "group_member is unportable - " |
| 1076 |
"use gnulib module group-member for portability"); |
| 1077 |
# endif |
| 1078 |
#endif |
| 1079 |
|
| 1080 |
|
| 1081 |
#if @GNULIB_ISATTY@ |
| 1082 |
# if @REPLACE_ISATTY@ |
| 1083 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 1084 |
# undef isatty |
| 1085 |
# define isatty rpl_isatty |
| 1086 |
# endif |
| 1087 |
_GL_FUNCDECL_RPL (isatty, int, (int fd)); |
| 1088 |
_GL_CXXALIAS_RPL (isatty, int, (int fd)); |
| 1089 |
# else |
| 1090 |
_GL_CXXALIAS_SYS (isatty, int, (int fd)); |
| 1091 |
# endif |
| 1092 |
_GL_CXXALIASWARN (isatty); |
| 1093 |
#elif defined GNULIB_POSIXCHECK |
| 1094 |
# undef isatty |
| 1095 |
# if HAVE_RAW_DECL_ISATTY |
| 1096 |
_GL_WARN_ON_USE (isatty, "isatty has portability problems on native Windows - " |
| 1097 |
"use gnulib module isatty for portability"); |
| 1098 |
# endif |
| 1099 |
#endif |
| 1100 |
|
| 1101 |
|
| 1102 |
#if @GNULIB_LCHOWN@ |
| 1103 |
|
| 1104 |
|
| 1105 |
|
| 1106 |
|
| 1107 |
|
| 1108 |
# if @REPLACE_LCHOWN@ |
| 1109 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 1110 |
# undef lchown |
| 1111 |
# define lchown rpl_lchown |
| 1112 |
# endif |
| 1113 |
_GL_FUNCDECL_RPL (lchown, int, (char const *file, uid_t owner, gid_t group) |
| 1114 |
_GL_ARG_NONNULL ((1))); |
| 1115 |
_GL_CXXALIAS_RPL (lchown, int, (char const *file, uid_t owner, gid_t group)); |
| 1116 |
# else |
| 1117 |
# if !@HAVE_LCHOWN@ |
| 1118 |
_GL_FUNCDECL_SYS (lchown, int, (char const *file, uid_t owner, gid_t group) |
| 1119 |
_GL_ARG_NONNULL ((1))); |
| 1120 |
# endif |
| 1121 |
_GL_CXXALIAS_SYS (lchown, int, (char const *file, uid_t owner, gid_t group)); |
| 1122 |
# endif |
| 1123 |
_GL_CXXALIASWARN (lchown); |
| 1124 |
#elif defined GNULIB_POSIXCHECK |
| 1125 |
# undef lchown |
| 1126 |
# if HAVE_RAW_DECL_LCHOWN |
| 1127 |
_GL_WARN_ON_USE (lchown, "lchown is unportable to pre-POSIX.1-2001 systems - " |
| 1128 |
"use gnulib module lchown for portability"); |
| 1129 |
# endif |
| 1130 |
#endif |
| 1131 |
|
| 1132 |
|
| 1133 |
#if @GNULIB_LINK@ |
| 1134 |
|
| 1135 |
|
| 1136 |
|
| 1137 |
|
| 1138 |
# if @REPLACE_LINK@ |
| 1139 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 1140 |
# define link rpl_link |
| 1141 |
# endif |
| 1142 |
_GL_FUNCDECL_RPL (link, int, (const char *path1, const char *path2) |
| 1143 |
_GL_ARG_NONNULL ((1, 2))); |
| 1144 |
_GL_CXXALIAS_RPL (link, int, (const char *path1, const char *path2)); |
| 1145 |
# else |
| 1146 |
# if !@HAVE_LINK@ |
| 1147 |
_GL_FUNCDECL_SYS (link, int, (const char *path1, const char *path2) |
| 1148 |
_GL_ARG_NONNULL ((1, 2))); |
| 1149 |
# endif |
| 1150 |
_GL_CXXALIAS_SYS (link, int, (const char *path1, const char *path2)); |
| 1151 |
# endif |
| 1152 |
_GL_CXXALIASWARN (link); |
| 1153 |
#elif defined GNULIB_POSIXCHECK |
| 1154 |
# undef link |
| 1155 |
# if HAVE_RAW_DECL_LINK |
| 1156 |
_GL_WARN_ON_USE (link, "link is unportable - " |
| 1157 |
"use gnulib module link for portability"); |
| 1158 |
# endif |
| 1159 |
#endif |
| 1160 |
|
| 1161 |
|
| 1162 |
#if @GNULIB_LINKAT@ |
| 1163 |
|
| 1164 |
|
| 1165 |
|
| 1166 |
# if @REPLACE_LINKAT@ |
| 1167 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 1168 |
# undef linkat |
| 1169 |
# define linkat rpl_linkat |
| 1170 |
# endif |
| 1171 |
_GL_FUNCDECL_RPL (linkat, int, |
| 1172 |
(int fd1, const char *path1, int fd2, const char *path2, |
| 1173 |
int flag) |
| 1174 |
_GL_ARG_NONNULL ((2, 4))); |
| 1175 |
_GL_CXXALIAS_RPL (linkat, int, |
| 1176 |
(int fd1, const char *path1, int fd2, const char *path2, |
| 1177 |
int flag)); |
| 1178 |
# else |
| 1179 |
# if !@HAVE_LINKAT@ |
| 1180 |
_GL_FUNCDECL_SYS (linkat, int, |
| 1181 |
(int fd1, const char *path1, int fd2, const char *path2, |
| 1182 |
int flag) |
| 1183 |
_GL_ARG_NONNULL ((2, 4))); |
| 1184 |
# endif |
| 1185 |
_GL_CXXALIAS_SYS (linkat, int, |
| 1186 |
(int fd1, const char *path1, int fd2, const char *path2, |
| 1187 |
int flag)); |
| 1188 |
# endif |
| 1189 |
_GL_CXXALIASWARN (linkat); |
| 1190 |
#elif defined GNULIB_POSIXCHECK |
| 1191 |
# undef linkat |
| 1192 |
# if HAVE_RAW_DECL_LINKAT |
| 1193 |
_GL_WARN_ON_USE (linkat, "linkat is unportable - " |
| 1194 |
"use gnulib module linkat for portability"); |
| 1195 |
# endif |
| 1196 |
#endif |
| 1197 |
|
| 1198 |
|
| 1199 |
#if @GNULIB_LSEEK@ |
| 1200 |
|
| 1201 |
|
| 1202 |
|
| 1203 |
|
| 1204 |
# if @REPLACE_LSEEK@ |
| 1205 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 1206 |
# define lseek rpl_lseek |
| 1207 |
# endif |
| 1208 |
_GL_FUNCDECL_RPL (lseek, off_t, (int fd, off_t offset, int whence)); |
| 1209 |
_GL_CXXALIAS_RPL (lseek, off_t, (int fd, off_t offset, int whence)); |
| 1210 |
# else |
| 1211 |
_GL_CXXALIAS_SYS (lseek, off_t, (int fd, off_t offset, int whence)); |
| 1212 |
# endif |
| 1213 |
_GL_CXXALIASWARN (lseek); |
| 1214 |
#elif defined GNULIB_POSIXCHECK |
| 1215 |
# undef lseek |
| 1216 |
# if HAVE_RAW_DECL_LSEEK |
| 1217 |
_GL_WARN_ON_USE (lseek, "lseek does not fail with ESPIPE on pipes on some " |
| 1218 |
"systems - use gnulib module lseek for portability"); |
| 1219 |
# endif |
| 1220 |
#endif |
| 1221 |
|
| 1222 |
|
| 1223 |
#if @GNULIB_PIPE@ |
| 1224 |
|
| 1225 |
|
| 1226 |
|
| 1227 |
# if !@HAVE_PIPE@ |
| 1228 |
_GL_FUNCDECL_SYS (pipe, int, (int fd[2]) _GL_ARG_NONNULL ((1))); |
| 1229 |
# endif |
| 1230 |
_GL_CXXALIAS_SYS (pipe, int, (int fd[2])); |
| 1231 |
_GL_CXXALIASWARN (pipe); |
| 1232 |
#elif defined GNULIB_POSIXCHECK |
| 1233 |
# undef pipe |
| 1234 |
# if HAVE_RAW_DECL_PIPE |
| 1235 |
_GL_WARN_ON_USE (pipe, "pipe is unportable - " |
| 1236 |
"use gnulib module pipe-posix for portability"); |
| 1237 |
# endif |
| 1238 |
#endif |
| 1239 |
|
| 1240 |
|
| 1241 |
#if @GNULIB_PIPE2@ |
| 1242 |
|
| 1243 |
|
| 1244 |
|
| 1245 |
|
| 1246 |
|
| 1247 |
|
| 1248 |
|
| 1249 |
|
| 1250 |
# if @HAVE_PIPE2@ |
| 1251 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 1252 |
# define pipe2 rpl_pipe2 |
| 1253 |
# endif |
| 1254 |
_GL_FUNCDECL_RPL (pipe2, int, (int fd[2], int flags) _GL_ARG_NONNULL ((1))); |
| 1255 |
_GL_CXXALIAS_RPL (pipe2, int, (int fd[2], int flags)); |
| 1256 |
# else |
| 1257 |
_GL_FUNCDECL_SYS (pipe2, int, (int fd[2], int flags) _GL_ARG_NONNULL ((1))); |
| 1258 |
_GL_CXXALIAS_SYS (pipe2, int, (int fd[2], int flags)); |
| 1259 |
# endif |
| 1260 |
_GL_CXXALIASWARN (pipe2); |
| 1261 |
#elif defined GNULIB_POSIXCHECK |
| 1262 |
# undef pipe2 |
| 1263 |
# if HAVE_RAW_DECL_PIPE2 |
| 1264 |
_GL_WARN_ON_USE (pipe2, "pipe2 is unportable - " |
| 1265 |
"use gnulib module pipe2 for portability"); |
| 1266 |
# endif |
| 1267 |
#endif |
| 1268 |
|
| 1269 |
|
| 1270 |
#if @GNULIB_PREAD@ |
| 1271 |
|
| 1272 |
|
| 1273 |
|
| 1274 |
|
| 1275 |
|
| 1276 |
# if @REPLACE_PREAD@ |
| 1277 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 1278 |
# undef pread |
| 1279 |
# define pread rpl_pread |
| 1280 |
# endif |
| 1281 |
_GL_FUNCDECL_RPL (pread, ssize_t, |
| 1282 |
(int fd, void *buf, size_t bufsize, off_t offset) |
| 1283 |
_GL_ARG_NONNULL ((2))); |
| 1284 |
_GL_CXXALIAS_RPL (pread, ssize_t, |
| 1285 |
(int fd, void *buf, size_t bufsize, off_t offset)); |
| 1286 |
# else |
| 1287 |
# if !@HAVE_PREAD@ |
| 1288 |
_GL_FUNCDECL_SYS (pread, ssize_t, |
| 1289 |
(int fd, void *buf, size_t bufsize, off_t offset) |
| 1290 |
_GL_ARG_NONNULL ((2))); |
| 1291 |
# endif |
| 1292 |
_GL_CXXALIAS_SYS (pread, ssize_t, |
| 1293 |
(int fd, void *buf, size_t bufsize, off_t offset)); |
| 1294 |
# endif |
| 1295 |
_GL_CXXALIASWARN (pread); |
| 1296 |
#elif defined GNULIB_POSIXCHECK |
| 1297 |
# undef pread |
| 1298 |
# if HAVE_RAW_DECL_PREAD |
| 1299 |
_GL_WARN_ON_USE (pread, "pread is unportable - " |
| 1300 |
"use gnulib module pread for portability"); |
| 1301 |
# endif |
| 1302 |
#endif |
| 1303 |
|
| 1304 |
|
| 1305 |
#if @GNULIB_PWRITE@ |
| 1306 |
|
| 1307 |
|
| 1308 |
|
| 1309 |
|
| 1310 |
|
| 1311 |
# if @REPLACE_PWRITE@ |
| 1312 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 1313 |
# undef pwrite |
| 1314 |
# define pwrite rpl_pwrite |
| 1315 |
# endif |
| 1316 |
_GL_FUNCDECL_RPL (pwrite, ssize_t, |
| 1317 |
(int fd, const void *buf, size_t bufsize, off_t offset) |
| 1318 |
_GL_ARG_NONNULL ((2))); |
| 1319 |
_GL_CXXALIAS_RPL (pwrite, ssize_t, |
| 1320 |
(int fd, const void *buf, size_t bufsize, off_t offset)); |
| 1321 |
# else |
| 1322 |
# if !@HAVE_PWRITE@ |
| 1323 |
_GL_FUNCDECL_SYS (pwrite, ssize_t, |
| 1324 |
(int fd, const void *buf, size_t bufsize, off_t offset) |
| 1325 |
_GL_ARG_NONNULL ((2))); |
| 1326 |
# endif |
| 1327 |
_GL_CXXALIAS_SYS (pwrite, ssize_t, |
| 1328 |
(int fd, const void *buf, size_t bufsize, off_t offset)); |
| 1329 |
# endif |
| 1330 |
_GL_CXXALIASWARN (pwrite); |
| 1331 |
#elif defined GNULIB_POSIXCHECK |
| 1332 |
# undef pwrite |
| 1333 |
# if HAVE_RAW_DECL_PWRITE |
| 1334 |
_GL_WARN_ON_USE (pwrite, "pwrite is unportable - " |
| 1335 |
"use gnulib module pwrite for portability"); |
| 1336 |
# endif |
| 1337 |
#endif |
| 1338 |
|
| 1339 |
|
| 1340 |
#if @GNULIB_READ@ |
| 1341 |
|
| 1342 |
|
| 1343 |
|
| 1344 |
# if @REPLACE_READ@ |
| 1345 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 1346 |
# undef read |
| 1347 |
# define read rpl_read |
| 1348 |
# endif |
| 1349 |
_GL_FUNCDECL_RPL (read, ssize_t, (int fd, void *buf, size_t count) |
| 1350 |
_GL_ARG_NONNULL ((2))); |
| 1351 |
_GL_CXXALIAS_RPL (read, ssize_t, (int fd, void *buf, size_t count)); |
| 1352 |
# else |
| 1353 |
|
| 1354 |
|
| 1355 |
|
| 1356 |
_GL_CXXALIAS_SYS_CAST (read, ssize_t, (int fd, void *buf, size_t count)); |
| 1357 |
# endif |
| 1358 |
_GL_CXXALIASWARN (read); |
| 1359 |
#endif |
| 1360 |
|
| 1361 |
|
| 1362 |
#if @GNULIB_READLINK@ |
| 1363 |
|
| 1364 |
|
| 1365 |
|
| 1366 |
|
| 1367 |
|
| 1368 |
# if @REPLACE_READLINK@ |
| 1369 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 1370 |
# define readlink rpl_readlink |
| 1371 |
# endif |
| 1372 |
_GL_FUNCDECL_RPL (readlink, ssize_t, |
| 1373 |
(const char *restrict file, |
| 1374 |
char *restrict buf, size_t bufsize) |
| 1375 |
_GL_ARG_NONNULL ((1, 2))); |
| 1376 |
_GL_CXXALIAS_RPL (readlink, ssize_t, |
| 1377 |
(const char *restrict file, |
| 1378 |
char *restrict buf, size_t bufsize)); |
| 1379 |
# else |
| 1380 |
# if !@HAVE_READLINK@ |
| 1381 |
_GL_FUNCDECL_SYS (readlink, ssize_t, |
| 1382 |
(const char *restrict file, |
| 1383 |
char *restrict buf, size_t bufsize) |
| 1384 |
_GL_ARG_NONNULL ((1, 2))); |
| 1385 |
# endif |
| 1386 |
_GL_CXXALIAS_SYS (readlink, ssize_t, |
| 1387 |
(const char *restrict file, |
| 1388 |
char *restrict buf, size_t bufsize)); |
| 1389 |
# endif |
| 1390 |
_GL_CXXALIASWARN (readlink); |
| 1391 |
#elif defined GNULIB_POSIXCHECK |
| 1392 |
# undef readlink |
| 1393 |
# if HAVE_RAW_DECL_READLINK |
| 1394 |
_GL_WARN_ON_USE (readlink, "readlink is unportable - " |
| 1395 |
"use gnulib module readlink for portability"); |
| 1396 |
# endif |
| 1397 |
#endif |
| 1398 |
|
| 1399 |
|
| 1400 |
#if @GNULIB_READLINKAT@ |
| 1401 |
# if @REPLACE_READLINKAT@ |
| 1402 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 1403 |
# define readlinkat rpl_readlinkat |
| 1404 |
# endif |
| 1405 |
_GL_FUNCDECL_RPL (readlinkat, ssize_t, |
| 1406 |
(int fd, char const *restrict file, |
| 1407 |
char *restrict buf, size_t len) |
| 1408 |
_GL_ARG_NONNULL ((2, 3))); |
| 1409 |
_GL_CXXALIAS_RPL (readlinkat, ssize_t, |
| 1410 |
(int fd, char const *restrict file, |
| 1411 |
char *restrict buf, size_t len)); |
| 1412 |
# else |
| 1413 |
# if !@HAVE_READLINKAT@ |
| 1414 |
_GL_FUNCDECL_SYS (readlinkat, ssize_t, |
| 1415 |
(int fd, char const *restrict file, |
| 1416 |
char *restrict buf, size_t len) |
| 1417 |
_GL_ARG_NONNULL ((2, 3))); |
| 1418 |
# endif |
| 1419 |
_GL_CXXALIAS_SYS (readlinkat, ssize_t, |
| 1420 |
(int fd, char const *restrict file, |
| 1421 |
char *restrict buf, size_t len)); |
| 1422 |
# endif |
| 1423 |
_GL_CXXALIASWARN (readlinkat); |
| 1424 |
#elif defined GNULIB_POSIXCHECK |
| 1425 |
# undef readlinkat |
| 1426 |
# if HAVE_RAW_DECL_READLINKAT |
| 1427 |
_GL_WARN_ON_USE (readlinkat, "readlinkat is not portable - " |
| 1428 |
"use gnulib module readlinkat for portability"); |
| 1429 |
# endif |
| 1430 |
#endif |
| 1431 |
|
| 1432 |
|
| 1433 |
#if @GNULIB_RMDIR@ |
| 1434 |
|
| 1435 |
# if @REPLACE_RMDIR@ |
| 1436 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 1437 |
# define rmdir rpl_rmdir |
| 1438 |
# endif |
| 1439 |
_GL_FUNCDECL_RPL (rmdir, int, (char const *name) _GL_ARG_NONNULL ((1))); |
| 1440 |
_GL_CXXALIAS_RPL (rmdir, int, (char const *name)); |
| 1441 |
# else |
| 1442 |
_GL_CXXALIAS_SYS (rmdir, int, (char const *name)); |
| 1443 |
# endif |
| 1444 |
_GL_CXXALIASWARN (rmdir); |
| 1445 |
#elif defined GNULIB_POSIXCHECK |
| 1446 |
# undef rmdir |
| 1447 |
# if HAVE_RAW_DECL_RMDIR |
| 1448 |
_GL_WARN_ON_USE (rmdir, "rmdir is unportable - " |
| 1449 |
"use gnulib module rmdir for portability"); |
| 1450 |
# endif |
| 1451 |
#endif |
| 1452 |
|
| 1453 |
|
| 1454 |
#if @GNULIB_SETHOSTNAME@ |
| 1455 |
|
| 1456 |
|
| 1457 |
|
| 1458 |
|
| 1459 |
|
| 1460 |
|
| 1461 |
|
| 1462 |
|
| 1463 |
# if !@HAVE_SETHOSTNAME@ || !@HAVE_DECL_SETHOSTNAME@ |
| 1464 |
_GL_FUNCDECL_SYS (sethostname, int, (const char *name, size_t len) |
| 1465 |
_GL_ARG_NONNULL ((1))); |
| 1466 |
# endif |
| 1467 |
|
| 1468 |
|
| 1469 |
|
| 1470 |
_GL_CXXALIAS_SYS_CAST (sethostname, int, (const char *name, size_t len)); |
| 1471 |
_GL_CXXALIASWARN (sethostname); |
| 1472 |
#elif defined GNULIB_POSIXCHECK |
| 1473 |
# undef sethostname |
| 1474 |
# if HAVE_RAW_DECL_SETHOSTNAME |
| 1475 |
_GL_WARN_ON_USE (sethostname, "sethostname is unportable - " |
| 1476 |
"use gnulib module sethostname for portability"); |
| 1477 |
# endif |
| 1478 |
#endif |
| 1479 |
|
| 1480 |
|
| 1481 |
#if @GNULIB_SLEEP@ |
| 1482 |
|
| 1483 |
|
| 1484 |
|
| 1485 |
|
| 1486 |
# if @REPLACE_SLEEP@ |
| 1487 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 1488 |
# undef sleep |
| 1489 |
# define sleep rpl_sleep |
| 1490 |
# endif |
| 1491 |
_GL_FUNCDECL_RPL (sleep, unsigned int, (unsigned int n)); |
| 1492 |
_GL_CXXALIAS_RPL (sleep, unsigned int, (unsigned int n)); |
| 1493 |
# else |
| 1494 |
# if !@HAVE_SLEEP@ |
| 1495 |
_GL_FUNCDECL_SYS (sleep, unsigned int, (unsigned int n)); |
| 1496 |
# endif |
| 1497 |
_GL_CXXALIAS_SYS (sleep, unsigned int, (unsigned int n)); |
| 1498 |
# endif |
| 1499 |
_GL_CXXALIASWARN (sleep); |
| 1500 |
#elif defined GNULIB_POSIXCHECK |
| 1501 |
# undef sleep |
| 1502 |
# if HAVE_RAW_DECL_SLEEP |
| 1503 |
_GL_WARN_ON_USE (sleep, "sleep is unportable - " |
| 1504 |
"use gnulib module sleep for portability"); |
| 1505 |
# endif |
| 1506 |
#endif |
| 1507 |
|
| 1508 |
|
| 1509 |
#if @GNULIB_SYMLINK@ |
| 1510 |
# if @REPLACE_SYMLINK@ |
| 1511 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 1512 |
# undef symlink |
| 1513 |
# define symlink rpl_symlink |
| 1514 |
# endif |
| 1515 |
_GL_FUNCDECL_RPL (symlink, int, (char const *contents, char const *file) |
| 1516 |
_GL_ARG_NONNULL ((1, 2))); |
| 1517 |
_GL_CXXALIAS_RPL (symlink, int, (char const *contents, char const *file)); |
| 1518 |
# else |
| 1519 |
# if !@HAVE_SYMLINK@ |
| 1520 |
_GL_FUNCDECL_SYS (symlink, int, (char const *contents, char const *file) |
| 1521 |
_GL_ARG_NONNULL ((1, 2))); |
| 1522 |
# endif |
| 1523 |
_GL_CXXALIAS_SYS (symlink, int, (char const *contents, char const *file)); |
| 1524 |
# endif |
| 1525 |
_GL_CXXALIASWARN (symlink); |
| 1526 |
#elif defined GNULIB_POSIXCHECK |
| 1527 |
# undef symlink |
| 1528 |
# if HAVE_RAW_DECL_SYMLINK |
| 1529 |
_GL_WARN_ON_USE (symlink, "symlink is not portable - " |
| 1530 |
"use gnulib module symlink for portability"); |
| 1531 |
# endif |
| 1532 |
#endif |
| 1533 |
|
| 1534 |
|
| 1535 |
#if @GNULIB_SYMLINKAT@ |
| 1536 |
# if @REPLACE_SYMLINKAT@ |
| 1537 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 1538 |
# undef symlinkat |
| 1539 |
# define symlinkat rpl_symlinkat |
| 1540 |
# endif |
| 1541 |
_GL_FUNCDECL_RPL (symlinkat, int, |
| 1542 |
(char const *contents, int fd, char const *file) |
| 1543 |
_GL_ARG_NONNULL ((1, 3))); |
| 1544 |
_GL_CXXALIAS_RPL (symlinkat, int, |
| 1545 |
(char const *contents, int fd, char const *file)); |
| 1546 |
# else |
| 1547 |
# if !@HAVE_SYMLINKAT@ |
| 1548 |
_GL_FUNCDECL_SYS (symlinkat, int, |
| 1549 |
(char const *contents, int fd, char const *file) |
| 1550 |
_GL_ARG_NONNULL ((1, 3))); |
| 1551 |
# endif |
| 1552 |
_GL_CXXALIAS_SYS (symlinkat, int, |
| 1553 |
(char const *contents, int fd, char const *file)); |
| 1554 |
# endif |
| 1555 |
_GL_CXXALIASWARN (symlinkat); |
| 1556 |
#elif defined GNULIB_POSIXCHECK |
| 1557 |
# undef symlinkat |
| 1558 |
# if HAVE_RAW_DECL_SYMLINKAT |
| 1559 |
_GL_WARN_ON_USE (symlinkat, "symlinkat is not portable - " |
| 1560 |
"use gnulib module symlinkat for portability"); |
| 1561 |
# endif |
| 1562 |
#endif |
| 1563 |
|
| 1564 |
|
| 1565 |
#if @GNULIB_TRUNCATE@ |
| 1566 |
|
| 1567 |
|
| 1568 |
|
| 1569 |
|
| 1570 |
# if @REPLACE_TRUNCATE@ |
| 1571 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 1572 |
# undef truncate |
| 1573 |
# define truncate rpl_truncate |
| 1574 |
# endif |
| 1575 |
_GL_FUNCDECL_RPL (truncate, int, (const char *filename, off_t length) |
| 1576 |
_GL_ARG_NONNULL ((1))); |
| 1577 |
_GL_CXXALIAS_RPL (truncate, int, (const char *filename, off_t length)); |
| 1578 |
# else |
| 1579 |
# if !@HAVE_DECL_TRUNCATE@ |
| 1580 |
_GL_FUNCDECL_SYS (truncate, int, (const char *filename, off_t length) |
| 1581 |
_GL_ARG_NONNULL ((1))); |
| 1582 |
# endif |
| 1583 |
_GL_CXXALIAS_SYS (truncate, int, (const char *filename, off_t length)); |
| 1584 |
# endif |
| 1585 |
_GL_CXXALIASWARN (truncate); |
| 1586 |
#elif defined GNULIB_POSIXCHECK |
| 1587 |
# undef truncate |
| 1588 |
# if HAVE_RAW_DECL_TRUNCATE |
| 1589 |
_GL_WARN_ON_USE (truncate, "truncate is unportable - " |
| 1590 |
"use gnulib module truncate for portability"); |
| 1591 |
# endif |
| 1592 |
#endif |
| 1593 |
|
| 1594 |
|
| 1595 |
#if @GNULIB_TTYNAME_R@ |
| 1596 |
|
| 1597 |
|
| 1598 |
# if @REPLACE_TTYNAME_R@ |
| 1599 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 1600 |
# undef ttyname_r |
| 1601 |
# define ttyname_r rpl_ttyname_r |
| 1602 |
# endif |
| 1603 |
_GL_FUNCDECL_RPL (ttyname_r, int, |
| 1604 |
(int fd, char *buf, size_t buflen) _GL_ARG_NONNULL ((2))); |
| 1605 |
_GL_CXXALIAS_RPL (ttyname_r, int, |
| 1606 |
(int fd, char *buf, size_t buflen)); |
| 1607 |
# else |
| 1608 |
# if !@HAVE_DECL_TTYNAME_R@ |
| 1609 |
_GL_FUNCDECL_SYS (ttyname_r, int, |
| 1610 |
(int fd, char *buf, size_t buflen) _GL_ARG_NONNULL ((2))); |
| 1611 |
# endif |
| 1612 |
_GL_CXXALIAS_SYS (ttyname_r, int, |
| 1613 |
(int fd, char *buf, size_t buflen)); |
| 1614 |
# endif |
| 1615 |
_GL_CXXALIASWARN (ttyname_r); |
| 1616 |
#elif defined GNULIB_POSIXCHECK |
| 1617 |
# undef ttyname_r |
| 1618 |
# if HAVE_RAW_DECL_TTYNAME_R |
| 1619 |
_GL_WARN_ON_USE (ttyname_r, "ttyname_r is not portable - " |
| 1620 |
"use gnulib module ttyname_r for portability"); |
| 1621 |
# endif |
| 1622 |
#endif |
| 1623 |
|
| 1624 |
|
| 1625 |
#if @GNULIB_UNLINK@ |
| 1626 |
# if @REPLACE_UNLINK@ |
| 1627 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 1628 |
# undef unlink |
| 1629 |
# define unlink rpl_unlink |
| 1630 |
# endif |
| 1631 |
_GL_FUNCDECL_RPL (unlink, int, (char const *file) _GL_ARG_NONNULL ((1))); |
| 1632 |
_GL_CXXALIAS_RPL (unlink, int, (char const *file)); |
| 1633 |
# else |
| 1634 |
_GL_CXXALIAS_SYS (unlink, int, (char const *file)); |
| 1635 |
# endif |
| 1636 |
_GL_CXXALIASWARN (unlink); |
| 1637 |
#elif defined GNULIB_POSIXCHECK |
| 1638 |
# undef unlink |
| 1639 |
# if HAVE_RAW_DECL_UNLINK |
| 1640 |
_GL_WARN_ON_USE (unlink, "unlink is not portable - " |
| 1641 |
"use gnulib module unlink for portability"); |
| 1642 |
# endif |
| 1643 |
#endif |
| 1644 |
|
| 1645 |
|
| 1646 |
#if @GNULIB_UNLINKAT@ |
| 1647 |
# if @REPLACE_UNLINKAT@ |
| 1648 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 1649 |
# undef unlinkat |
| 1650 |
# define unlinkat rpl_unlinkat |
| 1651 |
# endif |
| 1652 |
_GL_FUNCDECL_RPL (unlinkat, int, (int fd, char const *file, int flag) |
| 1653 |
_GL_ARG_NONNULL ((2))); |
| 1654 |
_GL_CXXALIAS_RPL (unlinkat, int, (int fd, char const *file, int flag)); |
| 1655 |
# else |
| 1656 |
# if !@HAVE_UNLINKAT@ |
| 1657 |
_GL_FUNCDECL_SYS (unlinkat, int, (int fd, char const *file, int flag) |
| 1658 |
_GL_ARG_NONNULL ((2))); |
| 1659 |
# endif |
| 1660 |
_GL_CXXALIAS_SYS (unlinkat, int, (int fd, char const *file, int flag)); |
| 1661 |
# endif |
| 1662 |
_GL_CXXALIASWARN (unlinkat); |
| 1663 |
#elif defined GNULIB_POSIXCHECK |
| 1664 |
# undef unlinkat |
| 1665 |
# if HAVE_RAW_DECL_UNLINKAT |
| 1666 |
_GL_WARN_ON_USE (unlinkat, "unlinkat is not portable - " |
| 1667 |
"use gnulib module openat for portability"); |
| 1668 |
# endif |
| 1669 |
#endif |
| 1670 |
|
| 1671 |
|
| 1672 |
#if @GNULIB_USLEEP@ |
| 1673 |
|
| 1674 |
|
| 1675 |
|
| 1676 |
|
| 1677 |
# if @REPLACE_USLEEP@ |
| 1678 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 1679 |
# undef usleep |
| 1680 |
# define usleep rpl_usleep |
| 1681 |
# endif |
| 1682 |
_GL_FUNCDECL_RPL (usleep, int, (useconds_t n)); |
| 1683 |
_GL_CXXALIAS_RPL (usleep, int, (useconds_t n)); |
| 1684 |
# else |
| 1685 |
# if !@HAVE_USLEEP@ |
| 1686 |
_GL_FUNCDECL_SYS (usleep, int, (useconds_t n)); |
| 1687 |
# endif |
| 1688 |
|
| 1689 |
|
| 1690 |
_GL_CXXALIAS_SYS_CAST (usleep, int, (useconds_t n)); |
| 1691 |
# endif |
| 1692 |
_GL_CXXALIASWARN (usleep); |
| 1693 |
#elif defined GNULIB_POSIXCHECK |
| 1694 |
# undef usleep |
| 1695 |
# if HAVE_RAW_DECL_USLEEP |
| 1696 |
_GL_WARN_ON_USE (usleep, "usleep is unportable - " |
| 1697 |
"use gnulib module usleep for portability"); |
| 1698 |
# endif |
| 1699 |
#endif |
| 1700 |
|
| 1701 |
|
| 1702 |
#if @GNULIB_WRITE@ |
| 1703 |
|
| 1704 |
|
| 1705 |
|
| 1706 |
# if @REPLACE_WRITE@ |
| 1707 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 1708 |
# undef write |
| 1709 |
# define write rpl_write |
| 1710 |
# endif |
| 1711 |
_GL_FUNCDECL_RPL (write, ssize_t, (int fd, const void *buf, size_t count) |
| 1712 |
_GL_ARG_NONNULL ((2))); |
| 1713 |
_GL_CXXALIAS_RPL (write, ssize_t, (int fd, const void *buf, size_t count)); |
| 1714 |
# else |
| 1715 |
|
| 1716 |
|
| 1717 |
|
| 1718 |
_GL_CXXALIAS_SYS_CAST (write, ssize_t, (int fd, const void *buf, size_t count)); |
| 1719 |
# endif |
| 1720 |
_GL_CXXALIASWARN (write); |
| 1721 |
#endif |
| 1722 |
|
| 1723 |
_GL_INLINE_HEADER_END |
| 1724 |
|
| 1725 |
#endif |
| 1726 |
#endif |
| 1727 |
#endif |