diff options
Diffstat (limited to 'gl/sys_stat.in.h')
| -rw-r--r-- | gl/sys_stat.in.h | 146 |
1 files changed, 102 insertions, 44 deletions
diff --git a/gl/sys_stat.in.h b/gl/sys_stat.in.h index 096887c0..c3c38fd6 100644 --- a/gl/sys_stat.in.h +++ b/gl/sys_stat.in.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Provide a more complete sys/stat.h header file. | 1 | /* Provide a more complete sys/stat.h header file. |
| 2 | Copyright (C) 2005-2023 Free Software Foundation, Inc. | 2 | Copyright (C) 2005-2025 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is free software: you can redistribute it and/or modify | 4 | This file is free software: you can redistribute it and/or modify |
| 5 | it under the terms of the GNU Lesser General Public License as | 5 | it under the terms of the GNU Lesser General Public License as |
| @@ -25,6 +25,13 @@ | |||
| 25 | #endif | 25 | #endif |
| 26 | @PRAGMA_COLUMNS@ | 26 | @PRAGMA_COLUMNS@ |
| 27 | 27 | ||
| 28 | /* This file uses #include_next of a system file that defines time_t. | ||
| 29 | For the 'year2038' module to work right, <config.h> needs to have been | ||
| 30 | included before. */ | ||
| 31 | #if !_GL_CONFIG_H_INCLUDED | ||
| 32 | #error "Please include config.h first." | ||
| 33 | #endif | ||
| 34 | |||
| 28 | #if defined __need_system_sys_stat_h | 35 | #if defined __need_system_sys_stat_h |
| 29 | /* Special invocation convention. */ | 36 | /* Special invocation convention. */ |
| 30 | 37 | ||
| @@ -48,12 +55,42 @@ | |||
| 48 | #ifndef _@GUARD_PREFIX@_SYS_STAT_H | 55 | #ifndef _@GUARD_PREFIX@_SYS_STAT_H |
| 49 | #define _@GUARD_PREFIX@_SYS_STAT_H | 56 | #define _@GUARD_PREFIX@_SYS_STAT_H |
| 50 | 57 | ||
| 58 | /* This file uses _GL_ATTRIBUTE_NODISCARD, _GL_ATTRIBUTE_NOTHROW, | ||
| 59 | GNULIB_POSIXCHECK, HAVE_RAW_DECL_*. */ | ||
| 60 | #if !_GL_CONFIG_H_INCLUDED | ||
| 61 | #error "Please include config.h first." | ||
| 62 | #endif | ||
| 63 | |||
| 64 | |||
| 65 | /* _GL_ATTRIBUTE_NOTHROW declares that the function does not throw exceptions. | ||
| 66 | */ | ||
| 67 | #ifndef _GL_ATTRIBUTE_NOTHROW | ||
| 68 | # if defined __cplusplus | ||
| 69 | # if (__GNUC__ + (__GNUC_MINOR__ >= 8) > 2) || __clang_major__ >= 4 | ||
| 70 | # if __cplusplus >= 201103L | ||
| 71 | # define _GL_ATTRIBUTE_NOTHROW noexcept (true) | ||
| 72 | # else | ||
| 73 | # define _GL_ATTRIBUTE_NOTHROW throw () | ||
| 74 | # endif | ||
| 75 | # else | ||
| 76 | # define _GL_ATTRIBUTE_NOTHROW | ||
| 77 | # endif | ||
| 78 | # else | ||
| 79 | # if (__GNUC__ + (__GNUC_MINOR__ >= 3) > 3) || defined __clang__ | ||
| 80 | # define _GL_ATTRIBUTE_NOTHROW __attribute__ ((__nothrow__)) | ||
| 81 | # else | ||
| 82 | # define _GL_ATTRIBUTE_NOTHROW | ||
| 83 | # endif | ||
| 84 | # endif | ||
| 85 | #endif | ||
| 86 | |||
| 51 | /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ | 87 | /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ |
| 52 | 88 | ||
| 53 | /* The definition of _GL_ARG_NONNULL is copied here. */ | 89 | /* The definition of _GL_ARG_NONNULL is copied here. */ |
| 54 | 90 | ||
| 55 | /* The definition of _GL_WARN_ON_USE is copied here. */ | 91 | /* The definition of _GL_WARN_ON_USE is copied here. */ |
| 56 | 92 | ||
| 93 | |||
| 57 | /* Before doing "#define mknod rpl_mknod" below, we need to include all | 94 | /* Before doing "#define mknod rpl_mknod" below, we need to include all |
| 58 | headers that may declare mknod(). OS/2 kLIBC declares mknod() in | 95 | headers that may declare mknod(). OS/2 kLIBC declares mknod() in |
| 59 | <unistd.h>, not in <sys/stat.h>. */ | 96 | <unistd.h>, not in <sys/stat.h>. */ |
| @@ -86,9 +123,11 @@ | |||
| 86 | # if @GNULIB_STAT@ | 123 | # if @GNULIB_STAT@ |
| 87 | # define stat rpl_stat | 124 | # define stat rpl_stat |
| 88 | # else | 125 | # else |
| 89 | /* Provoke a clear link error if stat() is used as a function and | 126 | # if !GNULIB_STAT |
| 90 | module 'stat' is not in use. */ | 127 | /* Provoke a clear link error if stat() is used as a function and |
| 91 | # define stat stat_used_without_requesting_gnulib_module_stat | 128 | module 'stat' is not in use. */ |
| 129 | # define stat stat_used_without_requesting_gnulib_module_stat | ||
| 130 | # endif | ||
| 92 | # endif | 131 | # endif |
| 93 | 132 | ||
| 94 | # if !GNULIB_defined_struct_stat | 133 | # if !GNULIB_defined_struct_stat |
| @@ -397,7 +436,7 @@ struct stat | |||
| 397 | # undef chmod | 436 | # undef chmod |
| 398 | # define chmod rpl_chmod | 437 | # define chmod rpl_chmod |
| 399 | # endif | 438 | # endif |
| 400 | _GL_FUNCDECL_RPL (chmod, int, (const char *filename, mode_t mode) | 439 | _GL_FUNCDECL_RPL (chmod, int, (const char *filename, mode_t mode), |
| 401 | _GL_ARG_NONNULL ((1))); | 440 | _GL_ARG_NONNULL ((1))); |
| 402 | _GL_CXXALIAS_RPL (chmod, int, (const char *filename, mode_t mode)); | 441 | _GL_CXXALIAS_RPL (chmod, int, (const char *filename, mode_t mode)); |
| 403 | # elif defined _WIN32 && !defined __CYGWIN__ | 442 | # elif defined _WIN32 && !defined __CYGWIN__ |
| @@ -442,15 +481,15 @@ _GL_CXXALIASWARN (chmod); | |||
| 442 | # define fchmodat rpl_fchmodat | 481 | # define fchmodat rpl_fchmodat |
| 443 | # endif | 482 | # endif |
| 444 | _GL_FUNCDECL_RPL (fchmodat, int, | 483 | _GL_FUNCDECL_RPL (fchmodat, int, |
| 445 | (int fd, char const *file, mode_t mode, int flag) | 484 | (int fd, char const *file, mode_t mode, int flag), |
| 446 | _GL_ARG_NONNULL ((2))); | 485 | _GL_ARG_NONNULL ((2)) _GL_ATTRIBUTE_NODISCARD); |
| 447 | _GL_CXXALIAS_RPL (fchmodat, int, | 486 | _GL_CXXALIAS_RPL (fchmodat, int, |
| 448 | (int fd, char const *file, mode_t mode, int flag)); | 487 | (int fd, char const *file, mode_t mode, int flag)); |
| 449 | # else | 488 | # else |
| 450 | # if !@HAVE_FCHMODAT@ | 489 | # if !@HAVE_FCHMODAT@ |
| 451 | _GL_FUNCDECL_SYS (fchmodat, int, | 490 | _GL_FUNCDECL_SYS (fchmodat, int, |
| 452 | (int fd, char const *file, mode_t mode, int flag) | 491 | (int fd, char const *file, mode_t mode, int flag), |
| 453 | _GL_ARG_NONNULL ((2))); | 492 | _GL_ARG_NONNULL ((2)) _GL_ATTRIBUTE_NODISCARD); |
| 454 | # endif | 493 | # endif |
| 455 | _GL_CXXALIAS_SYS (fchmodat, int, | 494 | _GL_CXXALIAS_SYS (fchmodat, int, |
| 456 | (int fd, char const *file, mode_t mode, int flag)); | 495 | (int fd, char const *file, mode_t mode, int flag)); |
| @@ -471,7 +510,8 @@ _GL_WARN_ON_USE (fchmodat, "fchmodat is not portable - " | |||
| 471 | # undef fstat | 510 | # undef fstat |
| 472 | # define fstat rpl_fstat | 511 | # define fstat rpl_fstat |
| 473 | # endif | 512 | # endif |
| 474 | _GL_FUNCDECL_RPL (fstat, int, (int fd, struct stat *buf) _GL_ARG_NONNULL ((2))); | 513 | _GL_FUNCDECL_RPL (fstat, int, (int fd, struct stat *buf), |
| 514 | _GL_ARG_NONNULL ((2))); | ||
| 475 | _GL_CXXALIAS_RPL (fstat, int, (int fd, struct stat *buf)); | 515 | _GL_CXXALIAS_RPL (fstat, int, (int fd, struct stat *buf)); |
| 476 | # else | 516 | # else |
| 477 | _GL_CXXALIAS_SYS (fstat, int, (int fd, struct stat *buf)); | 517 | _GL_CXXALIAS_SYS (fstat, int, (int fd, struct stat *buf)); |
| @@ -480,8 +520,10 @@ _GL_CXXALIAS_SYS (fstat, int, (int fd, struct stat *buf)); | |||
| 480 | _GL_CXXALIASWARN (fstat); | 520 | _GL_CXXALIASWARN (fstat); |
| 481 | # endif | 521 | # endif |
| 482 | #elif @GNULIB_OVERRIDES_STRUCT_STAT@ | 522 | #elif @GNULIB_OVERRIDES_STRUCT_STAT@ |
| 483 | # undef fstat | 523 | # if !GNULIB_FSTAT |
| 484 | # define fstat fstat_used_without_requesting_gnulib_module_fstat | 524 | # undef fstat |
| 525 | # define fstat fstat_used_without_requesting_gnulib_module_fstat | ||
| 526 | # endif | ||
| 485 | #elif @WINDOWS_64_BIT_ST_SIZE@ | 527 | #elif @WINDOWS_64_BIT_ST_SIZE@ |
| 486 | /* Above, we define stat to _stati64. */ | 528 | /* Above, we define stat to _stati64. */ |
| 487 | # define fstat _fstati64 | 529 | # define fstat _fstati64 |
| @@ -502,7 +544,7 @@ _GL_WARN_ON_USE (fstat, "fstat has portability problems - " | |||
| 502 | # endif | 544 | # endif |
| 503 | _GL_FUNCDECL_RPL (fstatat, int, | 545 | _GL_FUNCDECL_RPL (fstatat, int, |
| 504 | (int fd, char const *restrict name, struct stat *restrict st, | 546 | (int fd, char const *restrict name, struct stat *restrict st, |
| 505 | int flags) | 547 | int flags), |
| 506 | _GL_ARG_NONNULL ((2, 3))); | 548 | _GL_ARG_NONNULL ((2, 3))); |
| 507 | _GL_CXXALIAS_RPL (fstatat, int, | 549 | _GL_CXXALIAS_RPL (fstatat, int, |
| 508 | (int fd, char const *restrict name, struct stat *restrict st, | 550 | (int fd, char const *restrict name, struct stat *restrict st, |
| @@ -511,7 +553,7 @@ _GL_CXXALIAS_RPL (fstatat, int, | |||
| 511 | # if !@HAVE_FSTATAT@ | 553 | # if !@HAVE_FSTATAT@ |
| 512 | _GL_FUNCDECL_SYS (fstatat, int, | 554 | _GL_FUNCDECL_SYS (fstatat, int, |
| 513 | (int fd, char const *restrict name, struct stat *restrict st, | 555 | (int fd, char const *restrict name, struct stat *restrict st, |
| 514 | int flags) | 556 | int flags), |
| 515 | _GL_ARG_NONNULL ((2, 3))); | 557 | _GL_ARG_NONNULL ((2, 3))); |
| 516 | # endif | 558 | # endif |
| 517 | _GL_CXXALIAS_SYS (fstatat, int, | 559 | _GL_CXXALIAS_SYS (fstatat, int, |
| @@ -520,8 +562,10 @@ _GL_CXXALIAS_SYS (fstatat, int, | |||
| 520 | # endif | 562 | # endif |
| 521 | _GL_CXXALIASWARN (fstatat); | 563 | _GL_CXXALIASWARN (fstatat); |
| 522 | #elif @GNULIB_OVERRIDES_STRUCT_STAT@ | 564 | #elif @GNULIB_OVERRIDES_STRUCT_STAT@ |
| 523 | # undef fstatat | 565 | # if !GNULIB_FSTATAT |
| 524 | # define fstatat fstatat_used_without_requesting_gnulib_module_fstatat | 566 | # undef fstatat |
| 567 | # define fstatat fstatat_used_without_requesting_gnulib_module_fstatat | ||
| 568 | # endif | ||
| 525 | #elif defined GNULIB_POSIXCHECK | 569 | #elif defined GNULIB_POSIXCHECK |
| 526 | # undef fstatat | 570 | # undef fstatat |
| 527 | # if HAVE_RAW_DECL_FSTATAT | 571 | # if HAVE_RAW_DECL_FSTATAT |
| @@ -541,15 +585,15 @@ _GL_WARN_ON_USE (fstatat, "fstatat is not portable - " | |||
| 541 | # undef futimens | 585 | # undef futimens |
| 542 | # define futimens rpl_futimens | 586 | # define futimens rpl_futimens |
| 543 | # endif | 587 | # endif |
| 544 | _GL_FUNCDECL_RPL (futimens, int, (int fd, struct timespec const times[2])); | 588 | _GL_FUNCDECL_RPL (futimens, int, (int fd, struct timespec const times[2]), ); |
| 545 | _GL_CXXALIAS_RPL (futimens, int, (int fd, struct timespec const times[2])); | 589 | _GL_CXXALIAS_RPL (futimens, int, (int fd, struct timespec const times[2])); |
| 546 | # else | 590 | # else |
| 547 | # if !@HAVE_FUTIMENS@ | 591 | # if !@HAVE_FUTIMENS@ |
| 548 | _GL_FUNCDECL_SYS (futimens, int, (int fd, struct timespec const times[2])); | 592 | _GL_FUNCDECL_SYS (futimens, int, (int fd, struct timespec const times[2]), ); |
| 549 | # endif | 593 | # endif |
| 550 | _GL_CXXALIAS_SYS (futimens, int, (int fd, struct timespec const times[2])); | 594 | _GL_CXXALIAS_SYS (futimens, int, (int fd, struct timespec const times[2])); |
| 551 | # endif | 595 | # endif |
| 552 | # if @HAVE_FUTIMENS@ | 596 | # if __GLIBC__ >= 2 && @HAVE_FUTIMENS@ |
| 553 | _GL_CXXALIASWARN (futimens); | 597 | _GL_CXXALIASWARN (futimens); |
| 554 | # endif | 598 | # endif |
| 555 | #elif defined GNULIB_POSIXCHECK | 599 | #elif defined GNULIB_POSIXCHECK |
| @@ -563,7 +607,11 @@ _GL_WARN_ON_USE (futimens, "futimens is not portable - " | |||
| 563 | 607 | ||
| 564 | #if @GNULIB_GETUMASK@ | 608 | #if @GNULIB_GETUMASK@ |
| 565 | # if !@HAVE_GETUMASK@ | 609 | # if !@HAVE_GETUMASK@ |
| 566 | _GL_FUNCDECL_SYS (getumask, mode_t, (void)); | 610 | # if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 |
| 611 | _GL_FUNCDECL_SYS (getumask, mode_t, (void), ) _GL_ATTRIBUTE_NOTHROW; | ||
| 612 | # else | ||
| 613 | _GL_FUNCDECL_SYS (getumask, mode_t, (void), ); | ||
| 614 | # endif | ||
| 567 | # endif | 615 | # endif |
| 568 | _GL_CXXALIAS_SYS (getumask, mode_t, (void)); | 616 | _GL_CXXALIAS_SYS (getumask, mode_t, (void)); |
| 569 | # if @HAVE_GETUMASK@ | 617 | # if @HAVE_GETUMASK@ |
| @@ -582,7 +630,7 @@ _GL_WARN_ON_USE (getumask, "getumask is not portable - " | |||
| 582 | /* Change the mode of FILENAME to MODE, without dereferencing it if FILENAME | 630 | /* Change the mode of FILENAME to MODE, without dereferencing it if FILENAME |
| 583 | denotes a symbolic link. */ | 631 | denotes a symbolic link. */ |
| 584 | # if !@HAVE_LCHMOD@ || defined __hpux | 632 | # if !@HAVE_LCHMOD@ || defined __hpux |
| 585 | _GL_FUNCDECL_SYS (lchmod, int, (const char *filename, mode_t mode) | 633 | _GL_FUNCDECL_SYS (lchmod, int, (const char *filename, mode_t mode), |
| 586 | _GL_ARG_NONNULL ((1))); | 634 | _GL_ARG_NONNULL ((1))); |
| 587 | # endif | 635 | # endif |
| 588 | _GL_CXXALIAS_SYS (lchmod, int, (const char *filename, mode_t mode)); | 636 | _GL_CXXALIAS_SYS (lchmod, int, (const char *filename, mode_t mode)); |
| @@ -602,7 +650,7 @@ _GL_WARN_ON_USE (lchmod, "lchmod is unportable - " | |||
| 602 | # undef mkdir | 650 | # undef mkdir |
| 603 | # define mkdir rpl_mkdir | 651 | # define mkdir rpl_mkdir |
| 604 | # endif | 652 | # endif |
| 605 | _GL_FUNCDECL_RPL (mkdir, int, (char const *name, mode_t mode) | 653 | _GL_FUNCDECL_RPL (mkdir, int, (char const *name, mode_t mode), |
| 606 | _GL_ARG_NONNULL ((1))); | 654 | _GL_ARG_NONNULL ((1))); |
| 607 | _GL_CXXALIAS_RPL (mkdir, int, (char const *name, mode_t mode)); | 655 | _GL_CXXALIAS_RPL (mkdir, int, (char const *name, mode_t mode)); |
| 608 | # elif defined _WIN32 && !defined __CYGWIN__ | 656 | # elif defined _WIN32 && !defined __CYGWIN__ |
| @@ -627,12 +675,6 @@ _GL_CXXALIAS_RPL (mkdir, int, (char const *name, mode_t mode)); | |||
| 627 | _GL_CXXALIAS_SYS (mkdir, int, (char const *name, mode_t mode)); | 675 | _GL_CXXALIAS_SYS (mkdir, int, (char const *name, mode_t mode)); |
| 628 | # endif | 676 | # endif |
| 629 | _GL_CXXALIASWARN (mkdir); | 677 | _GL_CXXALIASWARN (mkdir); |
| 630 | #elif defined GNULIB_POSIXCHECK | ||
| 631 | # undef mkdir | ||
| 632 | # if HAVE_RAW_DECL_MKDIR | ||
| 633 | _GL_WARN_ON_USE (mkdir, "mkdir does not always support two parameters - " | ||
| 634 | "use gnulib module mkdir for portability"); | ||
| 635 | # endif | ||
| 636 | #elif @GNULIB_MDA_MKDIR@ | 678 | #elif @GNULIB_MDA_MKDIR@ |
| 637 | /* On native Windows, map 'mkdir' to '_mkdir', so that -loldnames is not | 679 | /* On native Windows, map 'mkdir' to '_mkdir', so that -loldnames is not |
| 638 | required. In C++ with GNULIB_NAMESPACE, avoid differences between | 680 | required. In C++ with GNULIB_NAMESPACE, avoid differences between |
| @@ -655,12 +697,18 @@ _GL_CXXALIAS_RPL (mkdir, int, (char const *name, mode_t mode)); | |||
| 655 | _GL_CXXALIAS_SYS (mkdir, int, (char const *name, mode_t mode)); | 697 | _GL_CXXALIAS_SYS (mkdir, int, (char const *name, mode_t mode)); |
| 656 | # endif | 698 | # endif |
| 657 | _GL_CXXALIASWARN (mkdir); | 699 | _GL_CXXALIASWARN (mkdir); |
| 700 | #elif defined GNULIB_POSIXCHECK | ||
| 701 | # undef mkdir | ||
| 702 | # if HAVE_RAW_DECL_MKDIR | ||
| 703 | _GL_WARN_ON_USE (mkdir, "mkdir does not always support two parameters - " | ||
| 704 | "use gnulib module mkdir for portability"); | ||
| 705 | # endif | ||
| 658 | #endif | 706 | #endif |
| 659 | 707 | ||
| 660 | 708 | ||
| 661 | #if @GNULIB_MKDIRAT@ | 709 | #if @GNULIB_MKDIRAT@ |
| 662 | # if !@HAVE_MKDIRAT@ | 710 | # if !@HAVE_MKDIRAT@ |
| 663 | _GL_FUNCDECL_SYS (mkdirat, int, (int fd, char const *file, mode_t mode) | 711 | _GL_FUNCDECL_SYS (mkdirat, int, (int fd, char const *file, mode_t mode), |
| 664 | _GL_ARG_NONNULL ((2))); | 712 | _GL_ARG_NONNULL ((2))); |
| 665 | # endif | 713 | # endif |
| 666 | _GL_CXXALIAS_SYS (mkdirat, int, (int fd, char const *file, mode_t mode)); | 714 | _GL_CXXALIAS_SYS (mkdirat, int, (int fd, char const *file, mode_t mode)); |
| @@ -680,12 +728,12 @@ _GL_WARN_ON_USE (mkdirat, "mkdirat is not portable - " | |||
| 680 | # undef mkfifo | 728 | # undef mkfifo |
| 681 | # define mkfifo rpl_mkfifo | 729 | # define mkfifo rpl_mkfifo |
| 682 | # endif | 730 | # endif |
| 683 | _GL_FUNCDECL_RPL (mkfifo, int, (char const *file, mode_t mode) | 731 | _GL_FUNCDECL_RPL (mkfifo, int, (char const *file, mode_t mode), |
| 684 | _GL_ARG_NONNULL ((1))); | 732 | _GL_ARG_NONNULL ((1))); |
| 685 | _GL_CXXALIAS_RPL (mkfifo, int, (char const *file, mode_t mode)); | 733 | _GL_CXXALIAS_RPL (mkfifo, int, (char const *file, mode_t mode)); |
| 686 | # else | 734 | # else |
| 687 | # if !@HAVE_MKFIFO@ | 735 | # if !@HAVE_MKFIFO@ |
| 688 | _GL_FUNCDECL_SYS (mkfifo, int, (char const *file, mode_t mode) | 736 | _GL_FUNCDECL_SYS (mkfifo, int, (char const *file, mode_t mode), |
| 689 | _GL_ARG_NONNULL ((1))); | 737 | _GL_ARG_NONNULL ((1))); |
| 690 | # endif | 738 | # endif |
| 691 | _GL_CXXALIAS_SYS (mkfifo, int, (char const *file, mode_t mode)); | 739 | _GL_CXXALIAS_SYS (mkfifo, int, (char const *file, mode_t mode)); |
| @@ -706,17 +754,19 @@ _GL_WARN_ON_USE (mkfifo, "mkfifo is not portable - " | |||
| 706 | # undef mkfifoat | 754 | # undef mkfifoat |
| 707 | # define mkfifoat rpl_mkfifoat | 755 | # define mkfifoat rpl_mkfifoat |
| 708 | # endif | 756 | # endif |
| 709 | _GL_FUNCDECL_RPL (mkfifoat, int, (int fd, char const *file, mode_t mode) | 757 | _GL_FUNCDECL_RPL (mkfifoat, int, (int fd, char const *file, mode_t mode), |
| 710 | _GL_ARG_NONNULL ((2))); | 758 | _GL_ARG_NONNULL ((2))); |
| 711 | _GL_CXXALIAS_RPL (mkfifoat, int, (int fd, char const *file, mode_t mode)); | 759 | _GL_CXXALIAS_RPL (mkfifoat, int, (int fd, char const *file, mode_t mode)); |
| 712 | # else | 760 | # else |
| 713 | # if !@HAVE_MKFIFOAT@ | 761 | # if !@HAVE_MKFIFOAT@ |
| 714 | _GL_FUNCDECL_SYS (mkfifoat, int, (int fd, char const *file, mode_t mode) | 762 | _GL_FUNCDECL_SYS (mkfifoat, int, (int fd, char const *file, mode_t mode), |
| 715 | _GL_ARG_NONNULL ((2))); | 763 | _GL_ARG_NONNULL ((2))); |
| 716 | # endif | 764 | # endif |
| 717 | _GL_CXXALIAS_SYS (mkfifoat, int, (int fd, char const *file, mode_t mode)); | 765 | _GL_CXXALIAS_SYS (mkfifoat, int, (int fd, char const *file, mode_t mode)); |
| 718 | # endif | 766 | # endif |
| 767 | # if __GLIBC__ >= 2 | ||
| 719 | _GL_CXXALIASWARN (mkfifoat); | 768 | _GL_CXXALIASWARN (mkfifoat); |
| 769 | # endif | ||
| 720 | #elif defined GNULIB_POSIXCHECK | 770 | #elif defined GNULIB_POSIXCHECK |
| 721 | # undef mkfifoat | 771 | # undef mkfifoat |
| 722 | # if HAVE_RAW_DECL_MKFIFOAT | 772 | # if HAVE_RAW_DECL_MKFIFOAT |
| @@ -732,12 +782,12 @@ _GL_WARN_ON_USE (mkfifoat, "mkfifoat is not portable - " | |||
| 732 | # undef mknod | 782 | # undef mknod |
| 733 | # define mknod rpl_mknod | 783 | # define mknod rpl_mknod |
| 734 | # endif | 784 | # endif |
| 735 | _GL_FUNCDECL_RPL (mknod, int, (char const *file, mode_t mode, dev_t dev) | 785 | _GL_FUNCDECL_RPL (mknod, int, (char const *file, mode_t mode, dev_t dev), |
| 736 | _GL_ARG_NONNULL ((1))); | 786 | _GL_ARG_NONNULL ((1))); |
| 737 | _GL_CXXALIAS_RPL (mknod, int, (char const *file, mode_t mode, dev_t dev)); | 787 | _GL_CXXALIAS_RPL (mknod, int, (char const *file, mode_t mode, dev_t dev)); |
| 738 | # else | 788 | # else |
| 739 | # if !@HAVE_MKNOD@ | 789 | # if !@HAVE_MKNOD@ |
| 740 | _GL_FUNCDECL_SYS (mknod, int, (char const *file, mode_t mode, dev_t dev) | 790 | _GL_FUNCDECL_SYS (mknod, int, (char const *file, mode_t mode, dev_t dev), |
| 741 | _GL_ARG_NONNULL ((1))); | 791 | _GL_ARG_NONNULL ((1))); |
| 742 | # endif | 792 | # endif |
| 743 | /* Need to cast, because on OSF/1 5.1, the third parameter is '...'. */ | 793 | /* Need to cast, because on OSF/1 5.1, the third parameter is '...'. */ |
| @@ -760,20 +810,22 @@ _GL_WARN_ON_USE (mknod, "mknod is not portable - " | |||
| 760 | # define mknodat rpl_mknodat | 810 | # define mknodat rpl_mknodat |
| 761 | # endif | 811 | # endif |
| 762 | _GL_FUNCDECL_RPL (mknodat, int, | 812 | _GL_FUNCDECL_RPL (mknodat, int, |
| 763 | (int fd, char const *file, mode_t mode, dev_t dev) | 813 | (int fd, char const *file, mode_t mode, dev_t dev), |
| 764 | _GL_ARG_NONNULL ((2))); | 814 | _GL_ARG_NONNULL ((2))); |
| 765 | _GL_CXXALIAS_RPL (mknodat, int, | 815 | _GL_CXXALIAS_RPL (mknodat, int, |
| 766 | (int fd, char const *file, mode_t mode, dev_t dev)); | 816 | (int fd, char const *file, mode_t mode, dev_t dev)); |
| 767 | # else | 817 | # else |
| 768 | # if !@HAVE_MKNODAT@ | 818 | # if !@HAVE_MKNODAT@ |
| 769 | _GL_FUNCDECL_SYS (mknodat, int, | 819 | _GL_FUNCDECL_SYS (mknodat, int, |
| 770 | (int fd, char const *file, mode_t mode, dev_t dev) | 820 | (int fd, char const *file, mode_t mode, dev_t dev), |
| 771 | _GL_ARG_NONNULL ((2))); | 821 | _GL_ARG_NONNULL ((2))); |
| 772 | # endif | 822 | # endif |
| 773 | _GL_CXXALIAS_SYS (mknodat, int, | 823 | _GL_CXXALIAS_SYS (mknodat, int, |
| 774 | (int fd, char const *file, mode_t mode, dev_t dev)); | 824 | (int fd, char const *file, mode_t mode, dev_t dev)); |
| 775 | # endif | 825 | # endif |
| 826 | # if __GLIBC__ >= 2 | ||
| 776 | _GL_CXXALIASWARN (mknodat); | 827 | _GL_CXXALIASWARN (mknodat); |
| 828 | # endif | ||
| 777 | #elif defined GNULIB_POSIXCHECK | 829 | #elif defined GNULIB_POSIXCHECK |
| 778 | # undef mknodat | 830 | # undef mknodat |
| 779 | # if HAVE_RAW_DECL_MKNODAT | 831 | # if HAVE_RAW_DECL_MKNODAT |
| @@ -797,7 +849,11 @@ _GL_WARN_ON_USE (mknodat, "mknodat is not portable - " | |||
| 797 | # elif @WINDOWS_64_BIT_ST_SIZE@ | 849 | # elif @WINDOWS_64_BIT_ST_SIZE@ |
| 798 | /* Above, we define stat to _stati64. */ | 850 | /* Above, we define stat to _stati64. */ |
| 799 | # if defined __MINGW32__ && defined _stati64 | 851 | # if defined __MINGW32__ && defined _stati64 |
| 800 | # ifndef _USE_32BIT_TIME_T | 852 | # ifdef _USE_32BIT_TIME_T |
| 853 | /* The system headers possibly define _stati64 to _stat32i64. */ | ||
| 854 | # undef _stat32i64 | ||
| 855 | # define _stat32i64(name, st) rpl_stat (name, st) | ||
| 856 | # else | ||
| 801 | /* The system headers define _stati64 to _stat64. */ | 857 | /* The system headers define _stati64 to _stat64. */ |
| 802 | # undef _stat64 | 858 | # undef _stat64 |
| 803 | # define _stat64(name, st) rpl_stat (name, st) | 859 | # define _stat64(name, st) rpl_stat (name, st) |
| @@ -872,7 +928,7 @@ _GL_CXXALIAS_RPL_1 (lstat, stat, int, | |||
| 872 | # define lstat rpl_lstat | 928 | # define lstat rpl_lstat |
| 873 | # endif | 929 | # endif |
| 874 | _GL_FUNCDECL_RPL (lstat, int, | 930 | _GL_FUNCDECL_RPL (lstat, int, |
| 875 | (const char *restrict name, struct stat *restrict buf) | 931 | (const char *restrict name, struct stat *restrict buf), |
| 876 | _GL_ARG_NONNULL ((1, 2))); | 932 | _GL_ARG_NONNULL ((1, 2))); |
| 877 | _GL_CXXALIAS_RPL (lstat, int, | 933 | _GL_CXXALIAS_RPL (lstat, int, |
| 878 | (const char *restrict name, struct stat *restrict buf)); | 934 | (const char *restrict name, struct stat *restrict buf)); |
| @@ -884,8 +940,10 @@ _GL_CXXALIAS_SYS (lstat, int, | |||
| 884 | _GL_CXXALIASWARN (lstat); | 940 | _GL_CXXALIASWARN (lstat); |
| 885 | # endif | 941 | # endif |
| 886 | #elif @GNULIB_OVERRIDES_STRUCT_STAT@ | 942 | #elif @GNULIB_OVERRIDES_STRUCT_STAT@ |
| 887 | # undef lstat | 943 | # if !GNULIB_LSTAT |
| 888 | # define lstat lstat_used_without_requesting_gnulib_module_lstat | 944 | # undef lstat |
| 945 | # define lstat lstat_used_without_requesting_gnulib_module_lstat | ||
| 946 | # endif | ||
| 889 | #elif defined GNULIB_POSIXCHECK | 947 | #elif defined GNULIB_POSIXCHECK |
| 890 | # undef lstat | 948 | # undef lstat |
| 891 | # if HAVE_RAW_DECL_LSTAT | 949 | # if HAVE_RAW_DECL_LSTAT |
| @@ -924,20 +982,20 @@ _GL_CXXALIASWARN (umask); | |||
| 924 | # define utimensat rpl_utimensat | 982 | # define utimensat rpl_utimensat |
| 925 | # endif | 983 | # endif |
| 926 | _GL_FUNCDECL_RPL (utimensat, int, (int fd, char const *name, | 984 | _GL_FUNCDECL_RPL (utimensat, int, (int fd, char const *name, |
| 927 | struct timespec const times[2], int flag) | 985 | struct timespec const times[2], int flag), |
| 928 | _GL_ARG_NONNULL ((2))); | 986 | _GL_ARG_NONNULL ((2))); |
| 929 | _GL_CXXALIAS_RPL (utimensat, int, (int fd, char const *name, | 987 | _GL_CXXALIAS_RPL (utimensat, int, (int fd, char const *name, |
| 930 | struct timespec const times[2], int flag)); | 988 | struct timespec const times[2], int flag)); |
| 931 | # else | 989 | # else |
| 932 | # if !@HAVE_UTIMENSAT@ | 990 | # if !@HAVE_UTIMENSAT@ |
| 933 | _GL_FUNCDECL_SYS (utimensat, int, (int fd, char const *name, | 991 | _GL_FUNCDECL_SYS (utimensat, int, (int fd, char const *name, |
| 934 | struct timespec const times[2], int flag) | 992 | struct timespec const times[2], int flag), |
| 935 | _GL_ARG_NONNULL ((2))); | 993 | _GL_ARG_NONNULL ((2))); |
| 936 | # endif | 994 | # endif |
| 937 | _GL_CXXALIAS_SYS (utimensat, int, (int fd, char const *name, | 995 | _GL_CXXALIAS_SYS (utimensat, int, (int fd, char const *name, |
| 938 | struct timespec const times[2], int flag)); | 996 | struct timespec const times[2], int flag)); |
| 939 | # endif | 997 | # endif |
| 940 | # if @HAVE_UTIMENSAT@ | 998 | # if __GLIBC__ >= 2 && @HAVE_UTIMENSAT@ |
| 941 | _GL_CXXALIASWARN (utimensat); | 999 | _GL_CXXALIASWARN (utimensat); |
| 942 | # endif | 1000 | # endif |
| 943 | #elif defined GNULIB_POSIXCHECK | 1001 | #elif defined GNULIB_POSIXCHECK |
