diff options
Diffstat (limited to 'lib/unistd.in.h')
| -rw-r--r-- | lib/unistd.in.h | 159 |
1 files changed, 159 insertions, 0 deletions
diff --git a/lib/unistd.in.h b/lib/unistd.in.h index a81a14fe873..357a35e3881 100644 --- a/lib/unistd.in.h +++ b/lib/unistd.in.h | |||
| @@ -273,6 +273,12 @@ _GL_INLINE_HEADER_BEGIN | |||
| 273 | _GL_FUNCDECL_RPL (access, int, (const char *file, int mode) | 273 | _GL_FUNCDECL_RPL (access, int, (const char *file, int mode) |
| 274 | _GL_ARG_NONNULL ((1))); | 274 | _GL_ARG_NONNULL ((1))); |
| 275 | _GL_CXXALIAS_RPL (access, int, (const char *file, int mode)); | 275 | _GL_CXXALIAS_RPL (access, int, (const char *file, int mode)); |
| 276 | # elif defined _WIN32 && !defined __CYGWIN__ | ||
| 277 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 278 | # undef access | ||
| 279 | # define access _access | ||
| 280 | # endif | ||
| 281 | _GL_CXXALIAS_MDA (access, int, (const char *file, int mode)); | ||
| 276 | # else | 282 | # else |
| 277 | _GL_CXXALIAS_SYS (access, int, (const char *file, int mode)); | 283 | _GL_CXXALIAS_SYS (access, int, (const char *file, int mode)); |
| 278 | # endif | 284 | # endif |
| @@ -286,11 +292,22 @@ _GL_WARN_ON_USE (access, "access does not always support X_OK - " | |||
| 286 | "also, this function is a security risk - " | 292 | "also, this function is a security risk - " |
| 287 | "use the gnulib module faccessat instead"); | 293 | "use the gnulib module faccessat instead"); |
| 288 | # endif | 294 | # endif |
| 295 | #elif defined _WIN32 && !defined __CYGWIN__ | ||
| 296 | # undef access | ||
| 297 | # define access _access | ||
| 289 | #endif | 298 | #endif |
| 290 | 299 | ||
| 291 | 300 | ||
| 292 | #if @GNULIB_CHDIR@ | 301 | #if @GNULIB_CHDIR@ |
| 302 | # if defined _WIN32 && !defined __CYGWIN__ | ||
| 303 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 304 | # undef chdir | ||
| 305 | # define chdir _chdir | ||
| 306 | # endif | ||
| 307 | _GL_CXXALIAS_MDA (chdir, int, (const char *file)); | ||
| 308 | # else | ||
| 293 | _GL_CXXALIAS_SYS (chdir, int, (const char *file) _GL_ARG_NONNULL ((1))); | 309 | _GL_CXXALIAS_SYS (chdir, int, (const char *file) _GL_ARG_NONNULL ((1))); |
| 310 | # endif | ||
| 294 | _GL_CXXALIASWARN (chdir); | 311 | _GL_CXXALIASWARN (chdir); |
| 295 | #elif defined GNULIB_POSIXCHECK | 312 | #elif defined GNULIB_POSIXCHECK |
| 296 | # undef chdir | 313 | # undef chdir |
| @@ -298,6 +315,9 @@ _GL_CXXALIASWARN (chdir); | |||
| 298 | _GL_WARN_ON_USE (chown, "chdir is not always in <unistd.h> - " | 315 | _GL_WARN_ON_USE (chown, "chdir is not always in <unistd.h> - " |
| 299 | "use gnulib module chdir for portability"); | 316 | "use gnulib module chdir for portability"); |
| 300 | # endif | 317 | # endif |
| 318 | #elif defined _WIN32 && !defined __CYGWIN__ | ||
| 319 | # undef chdir | ||
| 320 | # define chdir _chdir | ||
| 301 | #endif | 321 | #endif |
| 302 | 322 | ||
| 303 | 323 | ||
| @@ -342,6 +362,12 @@ _GL_WARN_ON_USE (chown, "chown fails to follow symlinks on some systems and " | |||
| 342 | # endif | 362 | # endif |
| 343 | _GL_FUNCDECL_RPL (close, int, (int fd)); | 363 | _GL_FUNCDECL_RPL (close, int, (int fd)); |
| 344 | _GL_CXXALIAS_RPL (close, int, (int fd)); | 364 | _GL_CXXALIAS_RPL (close, int, (int fd)); |
| 365 | # elif defined _WIN32 && !defined __CYGWIN__ | ||
| 366 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 367 | # undef close | ||
| 368 | # define close _close | ||
| 369 | # endif | ||
| 370 | _GL_CXXALIAS_MDA (close, int, (int fd)); | ||
| 345 | # else | 371 | # else |
| 346 | _GL_CXXALIAS_SYS (close, int, (int fd)); | 372 | _GL_CXXALIAS_SYS (close, int, (int fd)); |
| 347 | # endif | 373 | # endif |
| @@ -354,6 +380,9 @@ _GL_CXXALIASWARN (close); | |||
| 354 | /* Assume close is always declared. */ | 380 | /* Assume close is always declared. */ |
| 355 | _GL_WARN_ON_USE (close, "close does not portably work on sockets - " | 381 | _GL_WARN_ON_USE (close, "close does not portably work on sockets - " |
| 356 | "use gnulib module close for portability"); | 382 | "use gnulib module close for portability"); |
| 383 | #elif defined _WIN32 && !defined __CYGWIN__ | ||
| 384 | # undef close | ||
| 385 | # define close _close | ||
| 357 | #endif | 386 | #endif |
| 358 | 387 | ||
| 359 | 388 | ||
| @@ -382,6 +411,12 @@ _GL_WARN_ON_USE (copy_file_range, | |||
| 382 | # endif | 411 | # endif |
| 383 | _GL_FUNCDECL_RPL (dup, int, (int oldfd)); | 412 | _GL_FUNCDECL_RPL (dup, int, (int oldfd)); |
| 384 | _GL_CXXALIAS_RPL (dup, int, (int oldfd)); | 413 | _GL_CXXALIAS_RPL (dup, int, (int oldfd)); |
| 414 | # elif defined _WIN32 && !defined __CYGWIN__ | ||
| 415 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 416 | # undef dup | ||
| 417 | # define dup _dup | ||
| 418 | # endif | ||
| 419 | _GL_CXXALIAS_MDA (dup, int, (int oldfd)); | ||
| 385 | # else | 420 | # else |
| 386 | _GL_CXXALIAS_SYS (dup, int, (int oldfd)); | 421 | _GL_CXXALIAS_SYS (dup, int, (int oldfd)); |
| 387 | # endif | 422 | # endif |
| @@ -392,6 +427,9 @@ _GL_CXXALIASWARN (dup); | |||
| 392 | _GL_WARN_ON_USE (dup, "dup is unportable - " | 427 | _GL_WARN_ON_USE (dup, "dup is unportable - " |
| 393 | "use gnulib module dup for portability"); | 428 | "use gnulib module dup for portability"); |
| 394 | # endif | 429 | # endif |
| 430 | #elif defined _WIN32 && !defined __CYGWIN__ | ||
| 431 | # undef dup | ||
| 432 | # define dup _dup | ||
| 395 | #endif | 433 | #endif |
| 396 | 434 | ||
| 397 | 435 | ||
| @@ -407,6 +445,12 @@ _GL_WARN_ON_USE (dup, "dup is unportable - " | |||
| 407 | # endif | 445 | # endif |
| 408 | _GL_FUNCDECL_RPL (dup2, int, (int oldfd, int newfd)); | 446 | _GL_FUNCDECL_RPL (dup2, int, (int oldfd, int newfd)); |
| 409 | _GL_CXXALIAS_RPL (dup2, int, (int oldfd, int newfd)); | 447 | _GL_CXXALIAS_RPL (dup2, int, (int oldfd, int newfd)); |
| 448 | # elif defined _WIN32 && !defined __CYGWIN__ | ||
| 449 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 450 | # undef dup2 | ||
| 451 | # define dup2 _dup2 | ||
| 452 | # endif | ||
| 453 | _GL_CXXALIAS_MDA (dup2, int, (int oldfd, int newfd)); | ||
| 410 | # else | 454 | # else |
| 411 | _GL_CXXALIAS_SYS (dup2, int, (int oldfd, int newfd)); | 455 | _GL_CXXALIAS_SYS (dup2, int, (int oldfd, int newfd)); |
| 412 | # endif | 456 | # endif |
| @@ -417,6 +461,9 @@ _GL_CXXALIASWARN (dup2); | |||
| 417 | _GL_WARN_ON_USE (dup2, "dup2 is unportable - " | 461 | _GL_WARN_ON_USE (dup2, "dup2 is unportable - " |
| 418 | "use gnulib module dup2 for portability"); | 462 | "use gnulib module dup2 for portability"); |
| 419 | # endif | 463 | # endif |
| 464 | #elif defined _WIN32 && !defined __CYGWIN__ | ||
| 465 | # undef dup2 | ||
| 466 | # define dup2 _dup2 | ||
| 420 | #endif | 467 | #endif |
| 421 | 468 | ||
| 422 | 469 | ||
| @@ -517,6 +564,43 @@ _GL_WARN_ON_USE (euidaccess, "euidaccess is unportable - " | |||
| 517 | #endif | 564 | #endif |
| 518 | 565 | ||
| 519 | 566 | ||
| 567 | #if defined _WIN32 && !defined __CYGWIN__ | ||
| 568 | # undef execl | ||
| 569 | # define execl _execl | ||
| 570 | #endif | ||
| 571 | |||
| 572 | #if defined _WIN32 && !defined __CYGWIN__ | ||
| 573 | # undef execle | ||
| 574 | # define execle _execle | ||
| 575 | #endif | ||
| 576 | |||
| 577 | #if defined _WIN32 && !defined __CYGWIN__ | ||
| 578 | # undef execlp | ||
| 579 | # define execlp _execlp | ||
| 580 | #endif | ||
| 581 | |||
| 582 | |||
| 583 | #if defined _WIN32 && !defined __CYGWIN__ | ||
| 584 | # undef execv | ||
| 585 | # define execv _execv | ||
| 586 | #endif | ||
| 587 | |||
| 588 | #if defined _WIN32 && !defined __CYGWIN__ | ||
| 589 | # undef execve | ||
| 590 | # define execve _execve | ||
| 591 | #endif | ||
| 592 | |||
| 593 | #if defined _WIN32 && !defined __CYGWIN__ | ||
| 594 | # undef execvp | ||
| 595 | # define execvp _execvp | ||
| 596 | #endif | ||
| 597 | |||
| 598 | #if defined _WIN32 && !defined __CYGWIN__ | ||
| 599 | # undef execvpe | ||
| 600 | # define execvpe _execvpe | ||
| 601 | #endif | ||
| 602 | |||
| 603 | |||
| 520 | #if @GNULIB_FACCESSAT@ | 604 | #if @GNULIB_FACCESSAT@ |
| 521 | # if @REPLACE_FACCESSAT@ | 605 | # if @REPLACE_FACCESSAT@ |
| 522 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | 606 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| @@ -692,6 +776,12 @@ _GL_WARN_ON_USE (ftruncate, "ftruncate is unportable - " | |||
| 692 | # endif | 776 | # endif |
| 693 | _GL_FUNCDECL_RPL (getcwd, char *, (char *buf, size_t size)); | 777 | _GL_FUNCDECL_RPL (getcwd, char *, (char *buf, size_t size)); |
| 694 | _GL_CXXALIAS_RPL (getcwd, char *, (char *buf, size_t size)); | 778 | _GL_CXXALIAS_RPL (getcwd, char *, (char *buf, size_t size)); |
| 779 | # elif defined _WIN32 && !defined __CYGWIN__ | ||
| 780 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 781 | # undef getcwd | ||
| 782 | # define getcwd _getcwd | ||
| 783 | # endif | ||
| 784 | _GL_CXXALIAS_MDA (getcwd, char *, (char *buf, size_t size)); | ||
| 695 | # else | 785 | # else |
| 696 | /* Need to cast, because on mingw, the second parameter is | 786 | /* Need to cast, because on mingw, the second parameter is |
| 697 | int size. */ | 787 | int size. */ |
| @@ -704,6 +794,9 @@ _GL_CXXALIASWARN (getcwd); | |||
| 704 | _GL_WARN_ON_USE (getcwd, "getcwd is unportable - " | 794 | _GL_WARN_ON_USE (getcwd, "getcwd is unportable - " |
| 705 | "use gnulib module getcwd for portability"); | 795 | "use gnulib module getcwd for portability"); |
| 706 | # endif | 796 | # endif |
| 797 | #elif defined _WIN32 && !defined __CYGWIN__ | ||
| 798 | # undef getcwd | ||
| 799 | # define getcwd _getcwd | ||
| 707 | #endif | 800 | #endif |
| 708 | 801 | ||
| 709 | 802 | ||
| @@ -1038,6 +1131,12 @@ _GL_WARN_ON_USE (getpass, "getpass is unportable - " | |||
| 1038 | #endif | 1131 | #endif |
| 1039 | 1132 | ||
| 1040 | 1133 | ||
| 1134 | #if defined _WIN32 && !defined __CYGWIN__ | ||
| 1135 | # undef getpid | ||
| 1136 | # define getpid _getpid | ||
| 1137 | #endif | ||
| 1138 | |||
| 1139 | |||
| 1041 | #if @GNULIB_GETUSERSHELL@ | 1140 | #if @GNULIB_GETUSERSHELL@ |
| 1042 | /* Return the next valid login shell on the system, or NULL when the end of | 1141 | /* Return the next valid login shell on the system, or NULL when the end of |
| 1043 | the list has been reached. */ | 1142 | the list has been reached. */ |
| @@ -1110,6 +1209,12 @@ _GL_WARN_ON_USE (group_member, "group_member is unportable - " | |||
| 1110 | # endif | 1209 | # endif |
| 1111 | _GL_FUNCDECL_RPL (isatty, int, (int fd)); | 1210 | _GL_FUNCDECL_RPL (isatty, int, (int fd)); |
| 1112 | _GL_CXXALIAS_RPL (isatty, int, (int fd)); | 1211 | _GL_CXXALIAS_RPL (isatty, int, (int fd)); |
| 1212 | # elif defined _WIN32 && !defined __CYGWIN__ | ||
| 1213 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 1214 | # undef isatty | ||
| 1215 | # define isatty _isatty | ||
| 1216 | # endif | ||
| 1217 | _GL_CXXALIAS_MDA (isatty, int, (int fd)); | ||
| 1113 | # else | 1218 | # else |
| 1114 | _GL_CXXALIAS_SYS (isatty, int, (int fd)); | 1219 | _GL_CXXALIAS_SYS (isatty, int, (int fd)); |
| 1115 | # endif | 1220 | # endif |
| @@ -1120,6 +1225,9 @@ _GL_CXXALIASWARN (isatty); | |||
| 1120 | _GL_WARN_ON_USE (isatty, "isatty has portability problems on native Windows - " | 1225 | _GL_WARN_ON_USE (isatty, "isatty has portability problems on native Windows - " |
| 1121 | "use gnulib module isatty for portability"); | 1226 | "use gnulib module isatty for portability"); |
| 1122 | # endif | 1227 | # endif |
| 1228 | #elif defined _WIN32 && !defined __CYGWIN__ | ||
| 1229 | # undef isatty | ||
| 1230 | # define isatty _isatty | ||
| 1123 | #endif | 1231 | #endif |
| 1124 | 1232 | ||
| 1125 | 1233 | ||
| @@ -1231,6 +1339,12 @@ _GL_WARN_ON_USE (linkat, "linkat is unportable - " | |||
| 1231 | # endif | 1339 | # endif |
| 1232 | _GL_FUNCDECL_RPL (lseek, off_t, (int fd, off_t offset, int whence)); | 1340 | _GL_FUNCDECL_RPL (lseek, off_t, (int fd, off_t offset, int whence)); |
| 1233 | _GL_CXXALIAS_RPL (lseek, off_t, (int fd, off_t offset, int whence)); | 1341 | _GL_CXXALIAS_RPL (lseek, off_t, (int fd, off_t offset, int whence)); |
| 1342 | # elif defined _WIN32 && !defined __CYGWIN__ | ||
| 1343 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 1344 | # undef lseek | ||
| 1345 | # define lseek _lseek | ||
| 1346 | # endif | ||
| 1347 | _GL_CXXALIAS_MDA (lseek, off_t, (int fd, off_t offset, int whence)); | ||
| 1234 | # else | 1348 | # else |
| 1235 | _GL_CXXALIAS_SYS (lseek, off_t, (int fd, off_t offset, int whence)); | 1349 | _GL_CXXALIAS_SYS (lseek, off_t, (int fd, off_t offset, int whence)); |
| 1236 | # endif | 1350 | # endif |
| @@ -1241,6 +1355,9 @@ _GL_CXXALIASWARN (lseek); | |||
| 1241 | _GL_WARN_ON_USE (lseek, "lseek does not fail with ESPIPE on pipes on some " | 1355 | _GL_WARN_ON_USE (lseek, "lseek does not fail with ESPIPE on pipes on some " |
| 1242 | "systems - use gnulib module lseek for portability"); | 1356 | "systems - use gnulib module lseek for portability"); |
| 1243 | # endif | 1357 | # endif |
| 1358 | #elif defined _WIN32 && !defined __CYGWIN__ | ||
| 1359 | # undef lseek | ||
| 1360 | # define lseek _lseek | ||
| 1244 | #endif | 1361 | #endif |
| 1245 | 1362 | ||
| 1246 | 1363 | ||
| @@ -1373,6 +1490,12 @@ _GL_WARN_ON_USE (pwrite, "pwrite is unportable - " | |||
| 1373 | _GL_FUNCDECL_RPL (read, ssize_t, (int fd, void *buf, size_t count) | 1490 | _GL_FUNCDECL_RPL (read, ssize_t, (int fd, void *buf, size_t count) |
| 1374 | _GL_ARG_NONNULL ((2))); | 1491 | _GL_ARG_NONNULL ((2))); |
| 1375 | _GL_CXXALIAS_RPL (read, ssize_t, (int fd, void *buf, size_t count)); | 1492 | _GL_CXXALIAS_RPL (read, ssize_t, (int fd, void *buf, size_t count)); |
| 1493 | # elif defined _WIN32 && !defined __CYGWIN__ | ||
| 1494 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 1495 | # undef read | ||
| 1496 | # define read _read | ||
| 1497 | # endif | ||
| 1498 | _GL_CXXALIAS_MDA (read, ssize_t, (int fd, void *buf, size_t count)); | ||
| 1376 | # else | 1499 | # else |
| 1377 | /* Need to cast, because on mingw, the third parameter is | 1500 | /* Need to cast, because on mingw, the third parameter is |
| 1378 | unsigned int count | 1501 | unsigned int count |
| @@ -1380,6 +1503,9 @@ _GL_CXXALIAS_RPL (read, ssize_t, (int fd, void *buf, size_t count)); | |||
| 1380 | _GL_CXXALIAS_SYS_CAST (read, ssize_t, (int fd, void *buf, size_t count)); | 1503 | _GL_CXXALIAS_SYS_CAST (read, ssize_t, (int fd, void *buf, size_t count)); |
| 1381 | # endif | 1504 | # endif |
| 1382 | _GL_CXXALIASWARN (read); | 1505 | _GL_CXXALIASWARN (read); |
| 1506 | #elif defined _WIN32 && !defined __CYGWIN__ | ||
| 1507 | # undef read | ||
| 1508 | # define read _read | ||
| 1383 | #endif | 1509 | #endif |
| 1384 | 1510 | ||
| 1385 | 1511 | ||
| @@ -1462,6 +1588,12 @@ _GL_WARN_ON_USE (readlinkat, "readlinkat is not portable - " | |||
| 1462 | # endif | 1588 | # endif |
| 1463 | _GL_FUNCDECL_RPL (rmdir, int, (char const *name) _GL_ARG_NONNULL ((1))); | 1589 | _GL_FUNCDECL_RPL (rmdir, int, (char const *name) _GL_ARG_NONNULL ((1))); |
| 1464 | _GL_CXXALIAS_RPL (rmdir, int, (char const *name)); | 1590 | _GL_CXXALIAS_RPL (rmdir, int, (char const *name)); |
| 1591 | # elif defined _WIN32 && !defined __CYGWIN__ | ||
| 1592 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 1593 | # undef rmdir | ||
| 1594 | # define rmdir _rmdir | ||
| 1595 | # endif | ||
| 1596 | _GL_CXXALIAS_MDA (rmdir, int, (char const *name)); | ||
| 1465 | # else | 1597 | # else |
| 1466 | _GL_CXXALIAS_SYS (rmdir, int, (char const *name)); | 1598 | _GL_CXXALIAS_SYS (rmdir, int, (char const *name)); |
| 1467 | # endif | 1599 | # endif |
| @@ -1472,6 +1604,9 @@ _GL_CXXALIASWARN (rmdir); | |||
| 1472 | _GL_WARN_ON_USE (rmdir, "rmdir is unportable - " | 1604 | _GL_WARN_ON_USE (rmdir, "rmdir is unportable - " |
| 1473 | "use gnulib module rmdir for portability"); | 1605 | "use gnulib module rmdir for portability"); |
| 1474 | # endif | 1606 | # endif |
| 1607 | #elif defined _WIN32 && !defined __CYGWIN__ | ||
| 1608 | # undef rmdir | ||
| 1609 | # define rmdir _rmdir | ||
| 1475 | #endif | 1610 | #endif |
| 1476 | 1611 | ||
| 1477 | 1612 | ||
| @@ -1530,6 +1665,12 @@ _GL_WARN_ON_USE (sleep, "sleep is unportable - " | |||
| 1530 | #endif | 1665 | #endif |
| 1531 | 1666 | ||
| 1532 | 1667 | ||
| 1668 | #if defined _WIN32 && !defined __CYGWIN__ | ||
| 1669 | # undef swab | ||
| 1670 | # define swab _swab | ||
| 1671 | #endif | ||
| 1672 | |||
| 1673 | |||
| 1533 | #if @GNULIB_SYMLINK@ | 1674 | #if @GNULIB_SYMLINK@ |
| 1534 | # if @REPLACE_SYMLINK@ | 1675 | # if @REPLACE_SYMLINK@ |
| 1535 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | 1676 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| @@ -1654,6 +1795,12 @@ _GL_WARN_ON_USE (ttyname_r, "ttyname_r is not portable - " | |||
| 1654 | # endif | 1795 | # endif |
| 1655 | _GL_FUNCDECL_RPL (unlink, int, (char const *file) _GL_ARG_NONNULL ((1))); | 1796 | _GL_FUNCDECL_RPL (unlink, int, (char const *file) _GL_ARG_NONNULL ((1))); |
| 1656 | _GL_CXXALIAS_RPL (unlink, int, (char const *file)); | 1797 | _GL_CXXALIAS_RPL (unlink, int, (char const *file)); |
| 1798 | # elif defined _WIN32 && !defined __CYGWIN__ | ||
| 1799 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 1800 | # undef unlink | ||
| 1801 | # define unlink _unlink | ||
| 1802 | # endif | ||
| 1803 | _GL_CXXALIAS_MDA (unlink, int, (char const *file)); | ||
| 1657 | # else | 1804 | # else |
| 1658 | _GL_CXXALIAS_SYS (unlink, int, (char const *file)); | 1805 | _GL_CXXALIAS_SYS (unlink, int, (char const *file)); |
| 1659 | # endif | 1806 | # endif |
| @@ -1664,6 +1811,9 @@ _GL_CXXALIASWARN (unlink); | |||
| 1664 | _GL_WARN_ON_USE (unlink, "unlink is not portable - " | 1811 | _GL_WARN_ON_USE (unlink, "unlink is not portable - " |
| 1665 | "use gnulib module unlink for portability"); | 1812 | "use gnulib module unlink for portability"); |
| 1666 | # endif | 1813 | # endif |
| 1814 | #elif defined _WIN32 && !defined __CYGWIN__ | ||
| 1815 | # undef unlink | ||
| 1816 | # define unlink _unlink | ||
| 1667 | #endif | 1817 | #endif |
| 1668 | 1818 | ||
| 1669 | 1819 | ||
| @@ -1735,6 +1885,12 @@ _GL_WARN_ON_USE (usleep, "usleep is unportable - " | |||
| 1735 | _GL_FUNCDECL_RPL (write, ssize_t, (int fd, const void *buf, size_t count) | 1885 | _GL_FUNCDECL_RPL (write, ssize_t, (int fd, const void *buf, size_t count) |
| 1736 | _GL_ARG_NONNULL ((2))); | 1886 | _GL_ARG_NONNULL ((2))); |
| 1737 | _GL_CXXALIAS_RPL (write, ssize_t, (int fd, const void *buf, size_t count)); | 1887 | _GL_CXXALIAS_RPL (write, ssize_t, (int fd, const void *buf, size_t count)); |
| 1888 | # elif defined _WIN32 && !defined __CYGWIN__ | ||
| 1889 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 1890 | # undef write | ||
| 1891 | # define write _write | ||
| 1892 | # endif | ||
| 1893 | _GL_CXXALIAS_MDA (write, ssize_t, (int fd, const void *buf, size_t count)); | ||
| 1738 | # else | 1894 | # else |
| 1739 | /* Need to cast, because on mingw, the third parameter is | 1895 | /* Need to cast, because on mingw, the third parameter is |
| 1740 | unsigned int count | 1896 | unsigned int count |
| @@ -1742,6 +1898,9 @@ _GL_CXXALIAS_RPL (write, ssize_t, (int fd, const void *buf, size_t count)); | |||
| 1742 | _GL_CXXALIAS_SYS_CAST (write, ssize_t, (int fd, const void *buf, size_t count)); | 1898 | _GL_CXXALIAS_SYS_CAST (write, ssize_t, (int fd, const void *buf, size_t count)); |
| 1743 | # endif | 1899 | # endif |
| 1744 | _GL_CXXALIASWARN (write); | 1900 | _GL_CXXALIASWARN (write); |
| 1901 | #elif defined _WIN32 && !defined __CYGWIN__ | ||
| 1902 | # undef write | ||
| 1903 | # define write _write | ||
| 1745 | #endif | 1904 | #endif |
| 1746 | 1905 | ||
| 1747 | _GL_INLINE_HEADER_END | 1906 | _GL_INLINE_HEADER_END |