diff options
Diffstat (limited to 'gl/sys_stat.in.h')
| -rw-r--r-- | gl/sys_stat.in.h | 104 |
1 files changed, 59 insertions, 45 deletions
diff --git a/gl/sys_stat.in.h b/gl/sys_stat.in.h index bf08f335..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-2024 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 |
| @@ -55,7 +55,8 @@ | |||
| 55 | #ifndef _@GUARD_PREFIX@_SYS_STAT_H | 55 | #ifndef _@GUARD_PREFIX@_SYS_STAT_H |
| 56 | #define _@GUARD_PREFIX@_SYS_STAT_H | 56 | #define _@GUARD_PREFIX@_SYS_STAT_H |
| 57 | 57 | ||
| 58 | /* This file uses _GL_ATTRIBUTE_NOTHROW, GNULIB_POSIXCHECK, HAVE_RAW_DECL_*. */ | 58 | /* This file uses _GL_ATTRIBUTE_NODISCARD, _GL_ATTRIBUTE_NOTHROW, |
| 59 | GNULIB_POSIXCHECK, HAVE_RAW_DECL_*. */ | ||
| 59 | #if !_GL_CONFIG_H_INCLUDED | 60 | #if !_GL_CONFIG_H_INCLUDED |
| 60 | #error "Please include config.h first." | 61 | #error "Please include config.h first." |
| 61 | #endif | 62 | #endif |
| @@ -65,7 +66,7 @@ | |||
| 65 | */ | 66 | */ |
| 66 | #ifndef _GL_ATTRIBUTE_NOTHROW | 67 | #ifndef _GL_ATTRIBUTE_NOTHROW |
| 67 | # if defined __cplusplus | 68 | # if defined __cplusplus |
| 68 | # if (__GNUC__ + (__GNUC_MINOR__ >= 8) > 2) || __clang_major >= 4 | 69 | # if (__GNUC__ + (__GNUC_MINOR__ >= 8) > 2) || __clang_major__ >= 4 |
| 69 | # if __cplusplus >= 201103L | 70 | # if __cplusplus >= 201103L |
| 70 | # define _GL_ATTRIBUTE_NOTHROW noexcept (true) | 71 | # define _GL_ATTRIBUTE_NOTHROW noexcept (true) |
| 71 | # else | 72 | # else |
| @@ -122,9 +123,11 @@ | |||
| 122 | # if @GNULIB_STAT@ | 123 | # if @GNULIB_STAT@ |
| 123 | # define stat rpl_stat | 124 | # define stat rpl_stat |
| 124 | # else | 125 | # else |
| 125 | /* Provoke a clear link error if stat() is used as a function and | 126 | # if !GNULIB_STAT |
| 126 | module 'stat' is not in use. */ | 127 | /* Provoke a clear link error if stat() is used as a function and |
| 127 | # 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 | ||
| 128 | # endif | 131 | # endif |
| 129 | 132 | ||
| 130 | # if !GNULIB_defined_struct_stat | 133 | # if !GNULIB_defined_struct_stat |
| @@ -433,7 +436,7 @@ struct stat | |||
| 433 | # undef chmod | 436 | # undef chmod |
| 434 | # define chmod rpl_chmod | 437 | # define chmod rpl_chmod |
| 435 | # endif | 438 | # endif |
| 436 | _GL_FUNCDECL_RPL (chmod, int, (const char *filename, mode_t mode) | 439 | _GL_FUNCDECL_RPL (chmod, int, (const char *filename, mode_t mode), |
| 437 | _GL_ARG_NONNULL ((1))); | 440 | _GL_ARG_NONNULL ((1))); |
| 438 | _GL_CXXALIAS_RPL (chmod, int, (const char *filename, mode_t mode)); | 441 | _GL_CXXALIAS_RPL (chmod, int, (const char *filename, mode_t mode)); |
| 439 | # elif defined _WIN32 && !defined __CYGWIN__ | 442 | # elif defined _WIN32 && !defined __CYGWIN__ |
| @@ -478,15 +481,15 @@ _GL_CXXALIASWARN (chmod); | |||
| 478 | # define fchmodat rpl_fchmodat | 481 | # define fchmodat rpl_fchmodat |
| 479 | # endif | 482 | # endif |
| 480 | _GL_FUNCDECL_RPL (fchmodat, int, | 483 | _GL_FUNCDECL_RPL (fchmodat, int, |
| 481 | (int fd, char const *file, mode_t mode, int flag) | 484 | (int fd, char const *file, mode_t mode, int flag), |
| 482 | _GL_ARG_NONNULL ((2))); | 485 | _GL_ARG_NONNULL ((2)) _GL_ATTRIBUTE_NODISCARD); |
| 483 | _GL_CXXALIAS_RPL (fchmodat, int, | 486 | _GL_CXXALIAS_RPL (fchmodat, int, |
| 484 | (int fd, char const *file, mode_t mode, int flag)); | 487 | (int fd, char const *file, mode_t mode, int flag)); |
| 485 | # else | 488 | # else |
| 486 | # if !@HAVE_FCHMODAT@ | 489 | # if !@HAVE_FCHMODAT@ |
| 487 | _GL_FUNCDECL_SYS (fchmodat, int, | 490 | _GL_FUNCDECL_SYS (fchmodat, int, |
| 488 | (int fd, char const *file, mode_t mode, int flag) | 491 | (int fd, char const *file, mode_t mode, int flag), |
| 489 | _GL_ARG_NONNULL ((2))); | 492 | _GL_ARG_NONNULL ((2)) _GL_ATTRIBUTE_NODISCARD); |
| 490 | # endif | 493 | # endif |
| 491 | _GL_CXXALIAS_SYS (fchmodat, int, | 494 | _GL_CXXALIAS_SYS (fchmodat, int, |
| 492 | (int fd, char const *file, mode_t mode, int flag)); | 495 | (int fd, char const *file, mode_t mode, int flag)); |
| @@ -507,7 +510,8 @@ _GL_WARN_ON_USE (fchmodat, "fchmodat is not portable - " | |||
| 507 | # undef fstat | 510 | # undef fstat |
| 508 | # define fstat rpl_fstat | 511 | # define fstat rpl_fstat |
| 509 | # endif | 512 | # endif |
| 510 | _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))); | ||
| 511 | _GL_CXXALIAS_RPL (fstat, int, (int fd, struct stat *buf)); | 515 | _GL_CXXALIAS_RPL (fstat, int, (int fd, struct stat *buf)); |
| 512 | # else | 516 | # else |
| 513 | _GL_CXXALIAS_SYS (fstat, int, (int fd, struct stat *buf)); | 517 | _GL_CXXALIAS_SYS (fstat, int, (int fd, struct stat *buf)); |
| @@ -516,8 +520,10 @@ _GL_CXXALIAS_SYS (fstat, int, (int fd, struct stat *buf)); | |||
| 516 | _GL_CXXALIASWARN (fstat); | 520 | _GL_CXXALIASWARN (fstat); |
| 517 | # endif | 521 | # endif |
| 518 | #elif @GNULIB_OVERRIDES_STRUCT_STAT@ | 522 | #elif @GNULIB_OVERRIDES_STRUCT_STAT@ |
| 519 | # undef fstat | 523 | # if !GNULIB_FSTAT |
| 520 | # define fstat fstat_used_without_requesting_gnulib_module_fstat | 524 | # undef fstat |
| 525 | # define fstat fstat_used_without_requesting_gnulib_module_fstat | ||
| 526 | # endif | ||
| 521 | #elif @WINDOWS_64_BIT_ST_SIZE@ | 527 | #elif @WINDOWS_64_BIT_ST_SIZE@ |
| 522 | /* Above, we define stat to _stati64. */ | 528 | /* Above, we define stat to _stati64. */ |
| 523 | # define fstat _fstati64 | 529 | # define fstat _fstati64 |
| @@ -538,7 +544,7 @@ _GL_WARN_ON_USE (fstat, "fstat has portability problems - " | |||
| 538 | # endif | 544 | # endif |
| 539 | _GL_FUNCDECL_RPL (fstatat, int, | 545 | _GL_FUNCDECL_RPL (fstatat, int, |
| 540 | (int fd, char const *restrict name, struct stat *restrict st, | 546 | (int fd, char const *restrict name, struct stat *restrict st, |
| 541 | int flags) | 547 | int flags), |
| 542 | _GL_ARG_NONNULL ((2, 3))); | 548 | _GL_ARG_NONNULL ((2, 3))); |
| 543 | _GL_CXXALIAS_RPL (fstatat, int, | 549 | _GL_CXXALIAS_RPL (fstatat, int, |
| 544 | (int fd, char const *restrict name, struct stat *restrict st, | 550 | (int fd, char const *restrict name, struct stat *restrict st, |
| @@ -547,7 +553,7 @@ _GL_CXXALIAS_RPL (fstatat, int, | |||
| 547 | # if !@HAVE_FSTATAT@ | 553 | # if !@HAVE_FSTATAT@ |
| 548 | _GL_FUNCDECL_SYS (fstatat, int, | 554 | _GL_FUNCDECL_SYS (fstatat, int, |
| 549 | (int fd, char const *restrict name, struct stat *restrict st, | 555 | (int fd, char const *restrict name, struct stat *restrict st, |
| 550 | int flags) | 556 | int flags), |
| 551 | _GL_ARG_NONNULL ((2, 3))); | 557 | _GL_ARG_NONNULL ((2, 3))); |
| 552 | # endif | 558 | # endif |
| 553 | _GL_CXXALIAS_SYS (fstatat, int, | 559 | _GL_CXXALIAS_SYS (fstatat, int, |
| @@ -556,8 +562,10 @@ _GL_CXXALIAS_SYS (fstatat, int, | |||
| 556 | # endif | 562 | # endif |
| 557 | _GL_CXXALIASWARN (fstatat); | 563 | _GL_CXXALIASWARN (fstatat); |
| 558 | #elif @GNULIB_OVERRIDES_STRUCT_STAT@ | 564 | #elif @GNULIB_OVERRIDES_STRUCT_STAT@ |
| 559 | # undef fstatat | 565 | # if !GNULIB_FSTATAT |
| 560 | # define fstatat fstatat_used_without_requesting_gnulib_module_fstatat | 566 | # undef fstatat |
| 567 | # define fstatat fstatat_used_without_requesting_gnulib_module_fstatat | ||
| 568 | # endif | ||
| 561 | #elif defined GNULIB_POSIXCHECK | 569 | #elif defined GNULIB_POSIXCHECK |
| 562 | # undef fstatat | 570 | # undef fstatat |
| 563 | # if HAVE_RAW_DECL_FSTATAT | 571 | # if HAVE_RAW_DECL_FSTATAT |
| @@ -577,11 +585,11 @@ _GL_WARN_ON_USE (fstatat, "fstatat is not portable - " | |||
| 577 | # undef futimens | 585 | # undef futimens |
| 578 | # define futimens rpl_futimens | 586 | # define futimens rpl_futimens |
| 579 | # endif | 587 | # endif |
| 580 | _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]), ); |
| 581 | _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])); |
| 582 | # else | 590 | # else |
| 583 | # if !@HAVE_FUTIMENS@ | 591 | # if !@HAVE_FUTIMENS@ |
| 584 | _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]), ); |
| 585 | # endif | 593 | # endif |
| 586 | _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])); |
| 587 | # endif | 595 | # endif |
| @@ -600,9 +608,9 @@ _GL_WARN_ON_USE (futimens, "futimens is not portable - " | |||
| 600 | #if @GNULIB_GETUMASK@ | 608 | #if @GNULIB_GETUMASK@ |
| 601 | # if !@HAVE_GETUMASK@ | 609 | # if !@HAVE_GETUMASK@ |
| 602 | # if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 | 610 | # if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 |
| 603 | _GL_FUNCDECL_SYS (getumask, mode_t, (void) _GL_ATTRIBUTE_NOTHROW); | 611 | _GL_FUNCDECL_SYS (getumask, mode_t, (void), ) _GL_ATTRIBUTE_NOTHROW; |
| 604 | # else | 612 | # else |
| 605 | _GL_FUNCDECL_SYS (getumask, mode_t, (void)); | 613 | _GL_FUNCDECL_SYS (getumask, mode_t, (void), ); |
| 606 | # endif | 614 | # endif |
| 607 | # endif | 615 | # endif |
| 608 | _GL_CXXALIAS_SYS (getumask, mode_t, (void)); | 616 | _GL_CXXALIAS_SYS (getumask, mode_t, (void)); |
| @@ -622,7 +630,7 @@ _GL_WARN_ON_USE (getumask, "getumask is not portable - " | |||
| 622 | /* 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 |
| 623 | denotes a symbolic link. */ | 631 | denotes a symbolic link. */ |
| 624 | # if !@HAVE_LCHMOD@ || defined __hpux | 632 | # if !@HAVE_LCHMOD@ || defined __hpux |
| 625 | _GL_FUNCDECL_SYS (lchmod, int, (const char *filename, mode_t mode) | 633 | _GL_FUNCDECL_SYS (lchmod, int, (const char *filename, mode_t mode), |
| 626 | _GL_ARG_NONNULL ((1))); | 634 | _GL_ARG_NONNULL ((1))); |
| 627 | # endif | 635 | # endif |
| 628 | _GL_CXXALIAS_SYS (lchmod, int, (const char *filename, mode_t mode)); | 636 | _GL_CXXALIAS_SYS (lchmod, int, (const char *filename, mode_t mode)); |
| @@ -642,7 +650,7 @@ _GL_WARN_ON_USE (lchmod, "lchmod is unportable - " | |||
| 642 | # undef mkdir | 650 | # undef mkdir |
| 643 | # define mkdir rpl_mkdir | 651 | # define mkdir rpl_mkdir |
| 644 | # endif | 652 | # endif |
| 645 | _GL_FUNCDECL_RPL (mkdir, int, (char const *name, mode_t mode) | 653 | _GL_FUNCDECL_RPL (mkdir, int, (char const *name, mode_t mode), |
| 646 | _GL_ARG_NONNULL ((1))); | 654 | _GL_ARG_NONNULL ((1))); |
| 647 | _GL_CXXALIAS_RPL (mkdir, int, (char const *name, mode_t mode)); | 655 | _GL_CXXALIAS_RPL (mkdir, int, (char const *name, mode_t mode)); |
| 648 | # elif defined _WIN32 && !defined __CYGWIN__ | 656 | # elif defined _WIN32 && !defined __CYGWIN__ |
| @@ -667,12 +675,6 @@ _GL_CXXALIAS_RPL (mkdir, int, (char const *name, mode_t mode)); | |||
| 667 | _GL_CXXALIAS_SYS (mkdir, int, (char const *name, mode_t mode)); | 675 | _GL_CXXALIAS_SYS (mkdir, int, (char const *name, mode_t mode)); |
| 668 | # endif | 676 | # endif |
| 669 | _GL_CXXALIASWARN (mkdir); | 677 | _GL_CXXALIASWARN (mkdir); |
| 670 | #elif defined GNULIB_POSIXCHECK | ||
| 671 | # undef mkdir | ||
| 672 | # if HAVE_RAW_DECL_MKDIR | ||
| 673 | _GL_WARN_ON_USE (mkdir, "mkdir does not always support two parameters - " | ||
| 674 | "use gnulib module mkdir for portability"); | ||
| 675 | # endif | ||
| 676 | #elif @GNULIB_MDA_MKDIR@ | 678 | #elif @GNULIB_MDA_MKDIR@ |
| 677 | /* 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 |
| 678 | required. In C++ with GNULIB_NAMESPACE, avoid differences between | 680 | required. In C++ with GNULIB_NAMESPACE, avoid differences between |
| @@ -695,12 +697,18 @@ _GL_CXXALIAS_RPL (mkdir, int, (char const *name, mode_t mode)); | |||
| 695 | _GL_CXXALIAS_SYS (mkdir, int, (char const *name, mode_t mode)); | 697 | _GL_CXXALIAS_SYS (mkdir, int, (char const *name, mode_t mode)); |
| 696 | # endif | 698 | # endif |
| 697 | _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 | ||
| 698 | #endif | 706 | #endif |
| 699 | 707 | ||
| 700 | 708 | ||
| 701 | #if @GNULIB_MKDIRAT@ | 709 | #if @GNULIB_MKDIRAT@ |
| 702 | # if !@HAVE_MKDIRAT@ | 710 | # if !@HAVE_MKDIRAT@ |
| 703 | _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), |
| 704 | _GL_ARG_NONNULL ((2))); | 712 | _GL_ARG_NONNULL ((2))); |
| 705 | # endif | 713 | # endif |
| 706 | _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)); |
| @@ -720,12 +728,12 @@ _GL_WARN_ON_USE (mkdirat, "mkdirat is not portable - " | |||
| 720 | # undef mkfifo | 728 | # undef mkfifo |
| 721 | # define mkfifo rpl_mkfifo | 729 | # define mkfifo rpl_mkfifo |
| 722 | # endif | 730 | # endif |
| 723 | _GL_FUNCDECL_RPL (mkfifo, int, (char const *file, mode_t mode) | 731 | _GL_FUNCDECL_RPL (mkfifo, int, (char const *file, mode_t mode), |
| 724 | _GL_ARG_NONNULL ((1))); | 732 | _GL_ARG_NONNULL ((1))); |
| 725 | _GL_CXXALIAS_RPL (mkfifo, int, (char const *file, mode_t mode)); | 733 | _GL_CXXALIAS_RPL (mkfifo, int, (char const *file, mode_t mode)); |
| 726 | # else | 734 | # else |
| 727 | # if !@HAVE_MKFIFO@ | 735 | # if !@HAVE_MKFIFO@ |
| 728 | _GL_FUNCDECL_SYS (mkfifo, int, (char const *file, mode_t mode) | 736 | _GL_FUNCDECL_SYS (mkfifo, int, (char const *file, mode_t mode), |
| 729 | _GL_ARG_NONNULL ((1))); | 737 | _GL_ARG_NONNULL ((1))); |
| 730 | # endif | 738 | # endif |
| 731 | _GL_CXXALIAS_SYS (mkfifo, int, (char const *file, mode_t mode)); | 739 | _GL_CXXALIAS_SYS (mkfifo, int, (char const *file, mode_t mode)); |
| @@ -746,12 +754,12 @@ _GL_WARN_ON_USE (mkfifo, "mkfifo is not portable - " | |||
| 746 | # undef mkfifoat | 754 | # undef mkfifoat |
| 747 | # define mkfifoat rpl_mkfifoat | 755 | # define mkfifoat rpl_mkfifoat |
| 748 | # endif | 756 | # endif |
| 749 | _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), |
| 750 | _GL_ARG_NONNULL ((2))); | 758 | _GL_ARG_NONNULL ((2))); |
| 751 | _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)); |
| 752 | # else | 760 | # else |
| 753 | # if !@HAVE_MKFIFOAT@ | 761 | # if !@HAVE_MKFIFOAT@ |
| 754 | _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), |
| 755 | _GL_ARG_NONNULL ((2))); | 763 | _GL_ARG_NONNULL ((2))); |
| 756 | # endif | 764 | # endif |
| 757 | _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)); |
| @@ -774,12 +782,12 @@ _GL_WARN_ON_USE (mkfifoat, "mkfifoat is not portable - " | |||
| 774 | # undef mknod | 782 | # undef mknod |
| 775 | # define mknod rpl_mknod | 783 | # define mknod rpl_mknod |
| 776 | # endif | 784 | # endif |
| 777 | _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), |
| 778 | _GL_ARG_NONNULL ((1))); | 786 | _GL_ARG_NONNULL ((1))); |
| 779 | _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)); |
| 780 | # else | 788 | # else |
| 781 | # if !@HAVE_MKNOD@ | 789 | # if !@HAVE_MKNOD@ |
| 782 | _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), |
| 783 | _GL_ARG_NONNULL ((1))); | 791 | _GL_ARG_NONNULL ((1))); |
| 784 | # endif | 792 | # endif |
| 785 | /* 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 '...'. */ |
| @@ -802,14 +810,14 @@ _GL_WARN_ON_USE (mknod, "mknod is not portable - " | |||
| 802 | # define mknodat rpl_mknodat | 810 | # define mknodat rpl_mknodat |
| 803 | # endif | 811 | # endif |
| 804 | _GL_FUNCDECL_RPL (mknodat, int, | 812 | _GL_FUNCDECL_RPL (mknodat, int, |
| 805 | (int fd, char const *file, mode_t mode, dev_t dev) | 813 | (int fd, char const *file, mode_t mode, dev_t dev), |
| 806 | _GL_ARG_NONNULL ((2))); | 814 | _GL_ARG_NONNULL ((2))); |
| 807 | _GL_CXXALIAS_RPL (mknodat, int, | 815 | _GL_CXXALIAS_RPL (mknodat, int, |
| 808 | (int fd, char const *file, mode_t mode, dev_t dev)); | 816 | (int fd, char const *file, mode_t mode, dev_t dev)); |
| 809 | # else | 817 | # else |
| 810 | # if !@HAVE_MKNODAT@ | 818 | # if !@HAVE_MKNODAT@ |
| 811 | _GL_FUNCDECL_SYS (mknodat, int, | 819 | _GL_FUNCDECL_SYS (mknodat, int, |
| 812 | (int fd, char const *file, mode_t mode, dev_t dev) | 820 | (int fd, char const *file, mode_t mode, dev_t dev), |
| 813 | _GL_ARG_NONNULL ((2))); | 821 | _GL_ARG_NONNULL ((2))); |
| 814 | # endif | 822 | # endif |
| 815 | _GL_CXXALIAS_SYS (mknodat, int, | 823 | _GL_CXXALIAS_SYS (mknodat, int, |
| @@ -841,7 +849,11 @@ _GL_WARN_ON_USE (mknodat, "mknodat is not portable - " | |||
| 841 | # elif @WINDOWS_64_BIT_ST_SIZE@ | 849 | # elif @WINDOWS_64_BIT_ST_SIZE@ |
| 842 | /* Above, we define stat to _stati64. */ | 850 | /* Above, we define stat to _stati64. */ |
| 843 | # if defined __MINGW32__ && defined _stati64 | 851 | # if defined __MINGW32__ && defined _stati64 |
| 844 | # 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 | ||
| 845 | /* The system headers define _stati64 to _stat64. */ | 857 | /* The system headers define _stati64 to _stat64. */ |
| 846 | # undef _stat64 | 858 | # undef _stat64 |
| 847 | # define _stat64(name, st) rpl_stat (name, st) | 859 | # define _stat64(name, st) rpl_stat (name, st) |
| @@ -916,7 +928,7 @@ _GL_CXXALIAS_RPL_1 (lstat, stat, int, | |||
| 916 | # define lstat rpl_lstat | 928 | # define lstat rpl_lstat |
| 917 | # endif | 929 | # endif |
| 918 | _GL_FUNCDECL_RPL (lstat, int, | 930 | _GL_FUNCDECL_RPL (lstat, int, |
| 919 | (const char *restrict name, struct stat *restrict buf) | 931 | (const char *restrict name, struct stat *restrict buf), |
| 920 | _GL_ARG_NONNULL ((1, 2))); | 932 | _GL_ARG_NONNULL ((1, 2))); |
| 921 | _GL_CXXALIAS_RPL (lstat, int, | 933 | _GL_CXXALIAS_RPL (lstat, int, |
| 922 | (const char *restrict name, struct stat *restrict buf)); | 934 | (const char *restrict name, struct stat *restrict buf)); |
| @@ -928,8 +940,10 @@ _GL_CXXALIAS_SYS (lstat, int, | |||
| 928 | _GL_CXXALIASWARN (lstat); | 940 | _GL_CXXALIASWARN (lstat); |
| 929 | # endif | 941 | # endif |
| 930 | #elif @GNULIB_OVERRIDES_STRUCT_STAT@ | 942 | #elif @GNULIB_OVERRIDES_STRUCT_STAT@ |
| 931 | # undef lstat | 943 | # if !GNULIB_LSTAT |
| 932 | # define lstat lstat_used_without_requesting_gnulib_module_lstat | 944 | # undef lstat |
| 945 | # define lstat lstat_used_without_requesting_gnulib_module_lstat | ||
| 946 | # endif | ||
| 933 | #elif defined GNULIB_POSIXCHECK | 947 | #elif defined GNULIB_POSIXCHECK |
| 934 | # undef lstat | 948 | # undef lstat |
| 935 | # if HAVE_RAW_DECL_LSTAT | 949 | # if HAVE_RAW_DECL_LSTAT |
| @@ -968,14 +982,14 @@ _GL_CXXALIASWARN (umask); | |||
| 968 | # define utimensat rpl_utimensat | 982 | # define utimensat rpl_utimensat |
| 969 | # endif | 983 | # endif |
| 970 | _GL_FUNCDECL_RPL (utimensat, int, (int fd, char const *name, | 984 | _GL_FUNCDECL_RPL (utimensat, int, (int fd, char const *name, |
| 971 | struct timespec const times[2], int flag) | 985 | struct timespec const times[2], int flag), |
| 972 | _GL_ARG_NONNULL ((2))); | 986 | _GL_ARG_NONNULL ((2))); |
| 973 | _GL_CXXALIAS_RPL (utimensat, int, (int fd, char const *name, | 987 | _GL_CXXALIAS_RPL (utimensat, int, (int fd, char const *name, |
| 974 | struct timespec const times[2], int flag)); | 988 | struct timespec const times[2], int flag)); |
| 975 | # else | 989 | # else |
| 976 | # if !@HAVE_UTIMENSAT@ | 990 | # if !@HAVE_UTIMENSAT@ |
| 977 | _GL_FUNCDECL_SYS (utimensat, int, (int fd, char const *name, | 991 | _GL_FUNCDECL_SYS (utimensat, int, (int fd, char const *name, |
| 978 | struct timespec const times[2], int flag) | 992 | struct timespec const times[2], int flag), |
| 979 | _GL_ARG_NONNULL ((2))); | 993 | _GL_ARG_NONNULL ((2))); |
| 980 | # endif | 994 | # endif |
| 981 | _GL_CXXALIAS_SYS (utimensat, int, (int fd, char const *name, | 995 | _GL_CXXALIAS_SYS (utimensat, int, (int fd, char const *name, |
