diff options
Diffstat (limited to 'gl/sys_stat.in.h')
| -rw-r--r-- | gl/sys_stat.in.h | 121 |
1 files changed, 59 insertions, 62 deletions
diff --git a/gl/sys_stat.in.h b/gl/sys_stat.in.h index bf08f335..deed21cd 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-2026 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__ |
| @@ -448,7 +451,6 @@ _GL_CXXALIAS_SYS (chmod, int, (const char *filename, mode_t mode)); | |||
| 448 | # endif | 451 | # endif |
| 449 | _GL_CXXALIASWARN (chmod); | 452 | _GL_CXXALIASWARN (chmod); |
| 450 | #elif defined GNULIB_POSIXCHECK | 453 | #elif defined GNULIB_POSIXCHECK |
| 451 | # undef chmod | ||
| 452 | # if HAVE_RAW_DECL_CHMOD | 454 | # if HAVE_RAW_DECL_CHMOD |
| 453 | _GL_WARN_ON_USE (chmod, "chmod has portability problems - " | 455 | _GL_WARN_ON_USE (chmod, "chmod has portability problems - " |
| 454 | "use gnulib module chmod for portability"); | 456 | "use gnulib module chmod for portability"); |
| @@ -478,22 +480,21 @@ _GL_CXXALIASWARN (chmod); | |||
| 478 | # define fchmodat rpl_fchmodat | 480 | # define fchmodat rpl_fchmodat |
| 479 | # endif | 481 | # endif |
| 480 | _GL_FUNCDECL_RPL (fchmodat, int, | 482 | _GL_FUNCDECL_RPL (fchmodat, int, |
| 481 | (int fd, char const *file, mode_t mode, int flag) | 483 | (int fd, char const *file, mode_t mode, int flag), |
| 482 | _GL_ARG_NONNULL ((2))); | 484 | _GL_ARG_NONNULL ((2)) _GL_ATTRIBUTE_NODISCARD); |
| 483 | _GL_CXXALIAS_RPL (fchmodat, int, | 485 | _GL_CXXALIAS_RPL (fchmodat, int, |
| 484 | (int fd, char const *file, mode_t mode, int flag)); | 486 | (int fd, char const *file, mode_t mode, int flag)); |
| 485 | # else | 487 | # else |
| 486 | # if !@HAVE_FCHMODAT@ | 488 | # if !@HAVE_FCHMODAT@ |
| 487 | _GL_FUNCDECL_SYS (fchmodat, int, | 489 | _GL_FUNCDECL_SYS (fchmodat, int, |
| 488 | (int fd, char const *file, mode_t mode, int flag) | 490 | (int fd, char const *file, mode_t mode, int flag), |
| 489 | _GL_ARG_NONNULL ((2))); | 491 | _GL_ARG_NONNULL ((2)) _GL_ATTRIBUTE_NODISCARD); |
| 490 | # endif | 492 | # endif |
| 491 | _GL_CXXALIAS_SYS (fchmodat, int, | 493 | _GL_CXXALIAS_SYS (fchmodat, int, |
| 492 | (int fd, char const *file, mode_t mode, int flag)); | 494 | (int fd, char const *file, mode_t mode, int flag)); |
| 493 | # endif | 495 | # endif |
| 494 | _GL_CXXALIASWARN (fchmodat); | 496 | _GL_CXXALIASWARN (fchmodat); |
| 495 | #elif defined GNULIB_POSIXCHECK | 497 | #elif defined GNULIB_POSIXCHECK |
| 496 | # undef fchmodat | ||
| 497 | # if HAVE_RAW_DECL_FCHMODAT | 498 | # if HAVE_RAW_DECL_FCHMODAT |
| 498 | _GL_WARN_ON_USE (fchmodat, "fchmodat is not portable - " | 499 | _GL_WARN_ON_USE (fchmodat, "fchmodat is not portable - " |
| 499 | "use gnulib module openat for portability"); | 500 | "use gnulib module openat for portability"); |
| @@ -507,7 +508,8 @@ _GL_WARN_ON_USE (fchmodat, "fchmodat is not portable - " | |||
| 507 | # undef fstat | 508 | # undef fstat |
| 508 | # define fstat rpl_fstat | 509 | # define fstat rpl_fstat |
| 509 | # endif | 510 | # endif |
| 510 | _GL_FUNCDECL_RPL (fstat, int, (int fd, struct stat *buf) _GL_ARG_NONNULL ((2))); | 511 | _GL_FUNCDECL_RPL (fstat, int, (int fd, struct stat *buf), |
| 512 | _GL_ARG_NONNULL ((2))); | ||
| 511 | _GL_CXXALIAS_RPL (fstat, int, (int fd, struct stat *buf)); | 513 | _GL_CXXALIAS_RPL (fstat, int, (int fd, struct stat *buf)); |
| 512 | # else | 514 | # else |
| 513 | _GL_CXXALIAS_SYS (fstat, int, (int fd, struct stat *buf)); | 515 | _GL_CXXALIAS_SYS (fstat, int, (int fd, struct stat *buf)); |
| @@ -516,13 +518,14 @@ _GL_CXXALIAS_SYS (fstat, int, (int fd, struct stat *buf)); | |||
| 516 | _GL_CXXALIASWARN (fstat); | 518 | _GL_CXXALIASWARN (fstat); |
| 517 | # endif | 519 | # endif |
| 518 | #elif @GNULIB_OVERRIDES_STRUCT_STAT@ | 520 | #elif @GNULIB_OVERRIDES_STRUCT_STAT@ |
| 519 | # undef fstat | 521 | # if !GNULIB_FSTAT |
| 520 | # define fstat fstat_used_without_requesting_gnulib_module_fstat | 522 | # undef fstat |
| 523 | # define fstat fstat_used_without_requesting_gnulib_module_fstat | ||
| 524 | # endif | ||
| 521 | #elif @WINDOWS_64_BIT_ST_SIZE@ | 525 | #elif @WINDOWS_64_BIT_ST_SIZE@ |
| 522 | /* Above, we define stat to _stati64. */ | 526 | /* Above, we define stat to _stati64. */ |
| 523 | # define fstat _fstati64 | 527 | # define fstat _fstati64 |
| 524 | #elif defined GNULIB_POSIXCHECK | 528 | #elif defined GNULIB_POSIXCHECK |
| 525 | # undef fstat | ||
| 526 | # if HAVE_RAW_DECL_FSTAT | 529 | # if HAVE_RAW_DECL_FSTAT |
| 527 | _GL_WARN_ON_USE (fstat, "fstat has portability problems - " | 530 | _GL_WARN_ON_USE (fstat, "fstat has portability problems - " |
| 528 | "use gnulib module fstat for portability"); | 531 | "use gnulib module fstat for portability"); |
| @@ -538,7 +541,7 @@ _GL_WARN_ON_USE (fstat, "fstat has portability problems - " | |||
| 538 | # endif | 541 | # endif |
| 539 | _GL_FUNCDECL_RPL (fstatat, int, | 542 | _GL_FUNCDECL_RPL (fstatat, int, |
| 540 | (int fd, char const *restrict name, struct stat *restrict st, | 543 | (int fd, char const *restrict name, struct stat *restrict st, |
| 541 | int flags) | 544 | int flags), |
| 542 | _GL_ARG_NONNULL ((2, 3))); | 545 | _GL_ARG_NONNULL ((2, 3))); |
| 543 | _GL_CXXALIAS_RPL (fstatat, int, | 546 | _GL_CXXALIAS_RPL (fstatat, int, |
| 544 | (int fd, char const *restrict name, struct stat *restrict st, | 547 | (int fd, char const *restrict name, struct stat *restrict st, |
| @@ -547,7 +550,7 @@ _GL_CXXALIAS_RPL (fstatat, int, | |||
| 547 | # if !@HAVE_FSTATAT@ | 550 | # if !@HAVE_FSTATAT@ |
| 548 | _GL_FUNCDECL_SYS (fstatat, int, | 551 | _GL_FUNCDECL_SYS (fstatat, int, |
| 549 | (int fd, char const *restrict name, struct stat *restrict st, | 552 | (int fd, char const *restrict name, struct stat *restrict st, |
| 550 | int flags) | 553 | int flags), |
| 551 | _GL_ARG_NONNULL ((2, 3))); | 554 | _GL_ARG_NONNULL ((2, 3))); |
| 552 | # endif | 555 | # endif |
| 553 | _GL_CXXALIAS_SYS (fstatat, int, | 556 | _GL_CXXALIAS_SYS (fstatat, int, |
| @@ -556,10 +559,11 @@ _GL_CXXALIAS_SYS (fstatat, int, | |||
| 556 | # endif | 559 | # endif |
| 557 | _GL_CXXALIASWARN (fstatat); | 560 | _GL_CXXALIASWARN (fstatat); |
| 558 | #elif @GNULIB_OVERRIDES_STRUCT_STAT@ | 561 | #elif @GNULIB_OVERRIDES_STRUCT_STAT@ |
| 559 | # undef fstatat | 562 | # if !GNULIB_FSTATAT |
| 560 | # define fstatat fstatat_used_without_requesting_gnulib_module_fstatat | 563 | # undef fstatat |
| 564 | # define fstatat fstatat_used_without_requesting_gnulib_module_fstatat | ||
| 565 | # endif | ||
| 561 | #elif defined GNULIB_POSIXCHECK | 566 | #elif defined GNULIB_POSIXCHECK |
| 562 | # undef fstatat | ||
| 563 | # if HAVE_RAW_DECL_FSTATAT | 567 | # if HAVE_RAW_DECL_FSTATAT |
| 564 | _GL_WARN_ON_USE (fstatat, "fstatat is not portable - " | 568 | _GL_WARN_ON_USE (fstatat, "fstatat is not portable - " |
| 565 | "use gnulib module openat for portability"); | 569 | "use gnulib module openat for portability"); |
| @@ -577,11 +581,11 @@ _GL_WARN_ON_USE (fstatat, "fstatat is not portable - " | |||
| 577 | # undef futimens | 581 | # undef futimens |
| 578 | # define futimens rpl_futimens | 582 | # define futimens rpl_futimens |
| 579 | # endif | 583 | # endif |
| 580 | _GL_FUNCDECL_RPL (futimens, int, (int fd, struct timespec const times[2])); | 584 | _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])); | 585 | _GL_CXXALIAS_RPL (futimens, int, (int fd, struct timespec const times[2])); |
| 582 | # else | 586 | # else |
| 583 | # if !@HAVE_FUTIMENS@ | 587 | # if !@HAVE_FUTIMENS@ |
| 584 | _GL_FUNCDECL_SYS (futimens, int, (int fd, struct timespec const times[2])); | 588 | _GL_FUNCDECL_SYS (futimens, int, (int fd, struct timespec const times[2]), ); |
| 585 | # endif | 589 | # endif |
| 586 | _GL_CXXALIAS_SYS (futimens, int, (int fd, struct timespec const times[2])); | 590 | _GL_CXXALIAS_SYS (futimens, int, (int fd, struct timespec const times[2])); |
| 587 | # endif | 591 | # endif |
| @@ -589,7 +593,6 @@ _GL_CXXALIAS_SYS (futimens, int, (int fd, struct timespec const times[2])); | |||
| 589 | _GL_CXXALIASWARN (futimens); | 593 | _GL_CXXALIASWARN (futimens); |
| 590 | # endif | 594 | # endif |
| 591 | #elif defined GNULIB_POSIXCHECK | 595 | #elif defined GNULIB_POSIXCHECK |
| 592 | # undef futimens | ||
| 593 | # if HAVE_RAW_DECL_FUTIMENS | 596 | # if HAVE_RAW_DECL_FUTIMENS |
| 594 | _GL_WARN_ON_USE (futimens, "futimens is not portable - " | 597 | _GL_WARN_ON_USE (futimens, "futimens is not portable - " |
| 595 | "use gnulib module futimens for portability"); | 598 | "use gnulib module futimens for portability"); |
| @@ -600,9 +603,9 @@ _GL_WARN_ON_USE (futimens, "futimens is not portable - " | |||
| 600 | #if @GNULIB_GETUMASK@ | 603 | #if @GNULIB_GETUMASK@ |
| 601 | # if !@HAVE_GETUMASK@ | 604 | # if !@HAVE_GETUMASK@ |
| 602 | # if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 | 605 | # if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 |
| 603 | _GL_FUNCDECL_SYS (getumask, mode_t, (void) _GL_ATTRIBUTE_NOTHROW); | 606 | _GL_FUNCDECL_SYS (getumask, mode_t, (void), ) _GL_ATTRIBUTE_NOTHROW; |
| 604 | # else | 607 | # else |
| 605 | _GL_FUNCDECL_SYS (getumask, mode_t, (void)); | 608 | _GL_FUNCDECL_SYS (getumask, mode_t, (void), ); |
| 606 | # endif | 609 | # endif |
| 607 | # endif | 610 | # endif |
| 608 | _GL_CXXALIAS_SYS (getumask, mode_t, (void)); | 611 | _GL_CXXALIAS_SYS (getumask, mode_t, (void)); |
| @@ -610,7 +613,6 @@ _GL_CXXALIAS_SYS (getumask, mode_t, (void)); | |||
| 610 | _GL_CXXALIASWARN (getumask); | 613 | _GL_CXXALIASWARN (getumask); |
| 611 | # endif | 614 | # endif |
| 612 | #elif defined GNULIB_POSIXCHECK | 615 | #elif defined GNULIB_POSIXCHECK |
| 613 | # undef getumask | ||
| 614 | # if HAVE_RAW_DECL_GETUMASK | 616 | # if HAVE_RAW_DECL_GETUMASK |
| 615 | _GL_WARN_ON_USE (getumask, "getumask is not portable - " | 617 | _GL_WARN_ON_USE (getumask, "getumask is not portable - " |
| 616 | "use gnulib module getumask for portability"); | 618 | "use gnulib module getumask for portability"); |
| @@ -622,13 +624,12 @@ _GL_WARN_ON_USE (getumask, "getumask is not portable - " | |||
| 622 | /* Change the mode of FILENAME to MODE, without dereferencing it if FILENAME | 624 | /* Change the mode of FILENAME to MODE, without dereferencing it if FILENAME |
| 623 | denotes a symbolic link. */ | 625 | denotes a symbolic link. */ |
| 624 | # if !@HAVE_LCHMOD@ || defined __hpux | 626 | # if !@HAVE_LCHMOD@ || defined __hpux |
| 625 | _GL_FUNCDECL_SYS (lchmod, int, (const char *filename, mode_t mode) | 627 | _GL_FUNCDECL_SYS (lchmod, int, (const char *filename, mode_t mode), |
| 626 | _GL_ARG_NONNULL ((1))); | 628 | _GL_ARG_NONNULL ((1))); |
| 627 | # endif | 629 | # endif |
| 628 | _GL_CXXALIAS_SYS (lchmod, int, (const char *filename, mode_t mode)); | 630 | _GL_CXXALIAS_SYS (lchmod, int, (const char *filename, mode_t mode)); |
| 629 | _GL_CXXALIASWARN (lchmod); | 631 | _GL_CXXALIASWARN (lchmod); |
| 630 | #elif defined GNULIB_POSIXCHECK | 632 | #elif defined GNULIB_POSIXCHECK |
| 631 | # undef lchmod | ||
| 632 | # if HAVE_RAW_DECL_LCHMOD | 633 | # if HAVE_RAW_DECL_LCHMOD |
| 633 | _GL_WARN_ON_USE (lchmod, "lchmod is unportable - " | 634 | _GL_WARN_ON_USE (lchmod, "lchmod is unportable - " |
| 634 | "use gnulib module lchmod for portability"); | 635 | "use gnulib module lchmod for portability"); |
| @@ -642,7 +643,7 @@ _GL_WARN_ON_USE (lchmod, "lchmod is unportable - " | |||
| 642 | # undef mkdir | 643 | # undef mkdir |
| 643 | # define mkdir rpl_mkdir | 644 | # define mkdir rpl_mkdir |
| 644 | # endif | 645 | # endif |
| 645 | _GL_FUNCDECL_RPL (mkdir, int, (char const *name, mode_t mode) | 646 | _GL_FUNCDECL_RPL (mkdir, int, (char const *name, mode_t mode), |
| 646 | _GL_ARG_NONNULL ((1))); | 647 | _GL_ARG_NONNULL ((1))); |
| 647 | _GL_CXXALIAS_RPL (mkdir, int, (char const *name, mode_t mode)); | 648 | _GL_CXXALIAS_RPL (mkdir, int, (char const *name, mode_t mode)); |
| 648 | # elif defined _WIN32 && !defined __CYGWIN__ | 649 | # elif defined _WIN32 && !defined __CYGWIN__ |
| @@ -667,12 +668,6 @@ _GL_CXXALIAS_RPL (mkdir, int, (char const *name, mode_t mode)); | |||
| 667 | _GL_CXXALIAS_SYS (mkdir, int, (char const *name, mode_t mode)); | 668 | _GL_CXXALIAS_SYS (mkdir, int, (char const *name, mode_t mode)); |
| 668 | # endif | 669 | # endif |
| 669 | _GL_CXXALIASWARN (mkdir); | 670 | _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@ | 671 | #elif @GNULIB_MDA_MKDIR@ |
| 677 | /* On native Windows, map 'mkdir' to '_mkdir', so that -loldnames is not | 672 | /* On native Windows, map 'mkdir' to '_mkdir', so that -loldnames is not |
| 678 | required. In C++ with GNULIB_NAMESPACE, avoid differences between | 673 | required. In C++ with GNULIB_NAMESPACE, avoid differences between |
| @@ -695,18 +690,22 @@ _GL_CXXALIAS_RPL (mkdir, int, (char const *name, mode_t mode)); | |||
| 695 | _GL_CXXALIAS_SYS (mkdir, int, (char const *name, mode_t mode)); | 690 | _GL_CXXALIAS_SYS (mkdir, int, (char const *name, mode_t mode)); |
| 696 | # endif | 691 | # endif |
| 697 | _GL_CXXALIASWARN (mkdir); | 692 | _GL_CXXALIASWARN (mkdir); |
| 693 | #elif defined GNULIB_POSIXCHECK | ||
| 694 | # if HAVE_RAW_DECL_MKDIR | ||
| 695 | _GL_WARN_ON_USE (mkdir, "mkdir does not always support two parameters - " | ||
| 696 | "use gnulib module mkdir for portability"); | ||
| 697 | # endif | ||
| 698 | #endif | 698 | #endif |
| 699 | 699 | ||
| 700 | 700 | ||
| 701 | #if @GNULIB_MKDIRAT@ | 701 | #if @GNULIB_MKDIRAT@ |
| 702 | # if !@HAVE_MKDIRAT@ | 702 | # if !@HAVE_MKDIRAT@ |
| 703 | _GL_FUNCDECL_SYS (mkdirat, int, (int fd, char const *file, mode_t mode) | 703 | _GL_FUNCDECL_SYS (mkdirat, int, (int fd, char const *file, mode_t mode), |
| 704 | _GL_ARG_NONNULL ((2))); | 704 | _GL_ARG_NONNULL ((2))); |
| 705 | # endif | 705 | # endif |
| 706 | _GL_CXXALIAS_SYS (mkdirat, int, (int fd, char const *file, mode_t mode)); | 706 | _GL_CXXALIAS_SYS (mkdirat, int, (int fd, char const *file, mode_t mode)); |
| 707 | _GL_CXXALIASWARN (mkdirat); | 707 | _GL_CXXALIASWARN (mkdirat); |
| 708 | #elif defined GNULIB_POSIXCHECK | 708 | #elif defined GNULIB_POSIXCHECK |
| 709 | # undef mkdirat | ||
| 710 | # if HAVE_RAW_DECL_MKDIRAT | 709 | # if HAVE_RAW_DECL_MKDIRAT |
| 711 | _GL_WARN_ON_USE (mkdirat, "mkdirat is not portable - " | 710 | _GL_WARN_ON_USE (mkdirat, "mkdirat is not portable - " |
| 712 | "use gnulib module openat for portability"); | 711 | "use gnulib module openat for portability"); |
| @@ -720,19 +719,18 @@ _GL_WARN_ON_USE (mkdirat, "mkdirat is not portable - " | |||
| 720 | # undef mkfifo | 719 | # undef mkfifo |
| 721 | # define mkfifo rpl_mkfifo | 720 | # define mkfifo rpl_mkfifo |
| 722 | # endif | 721 | # endif |
| 723 | _GL_FUNCDECL_RPL (mkfifo, int, (char const *file, mode_t mode) | 722 | _GL_FUNCDECL_RPL (mkfifo, int, (char const *file, mode_t mode), |
| 724 | _GL_ARG_NONNULL ((1))); | 723 | _GL_ARG_NONNULL ((1))); |
| 725 | _GL_CXXALIAS_RPL (mkfifo, int, (char const *file, mode_t mode)); | 724 | _GL_CXXALIAS_RPL (mkfifo, int, (char const *file, mode_t mode)); |
| 726 | # else | 725 | # else |
| 727 | # if !@HAVE_MKFIFO@ | 726 | # if !@HAVE_MKFIFO@ |
| 728 | _GL_FUNCDECL_SYS (mkfifo, int, (char const *file, mode_t mode) | 727 | _GL_FUNCDECL_SYS (mkfifo, int, (char const *file, mode_t mode), |
| 729 | _GL_ARG_NONNULL ((1))); | 728 | _GL_ARG_NONNULL ((1))); |
| 730 | # endif | 729 | # endif |
| 731 | _GL_CXXALIAS_SYS (mkfifo, int, (char const *file, mode_t mode)); | 730 | _GL_CXXALIAS_SYS (mkfifo, int, (char const *file, mode_t mode)); |
| 732 | # endif | 731 | # endif |
| 733 | _GL_CXXALIASWARN (mkfifo); | 732 | _GL_CXXALIASWARN (mkfifo); |
| 734 | #elif defined GNULIB_POSIXCHECK | 733 | #elif defined GNULIB_POSIXCHECK |
| 735 | # undef mkfifo | ||
| 736 | # if HAVE_RAW_DECL_MKFIFO | 734 | # if HAVE_RAW_DECL_MKFIFO |
| 737 | _GL_WARN_ON_USE (mkfifo, "mkfifo is not portable - " | 735 | _GL_WARN_ON_USE (mkfifo, "mkfifo is not portable - " |
| 738 | "use gnulib module mkfifo for portability"); | 736 | "use gnulib module mkfifo for portability"); |
| @@ -746,12 +744,12 @@ _GL_WARN_ON_USE (mkfifo, "mkfifo is not portable - " | |||
| 746 | # undef mkfifoat | 744 | # undef mkfifoat |
| 747 | # define mkfifoat rpl_mkfifoat | 745 | # define mkfifoat rpl_mkfifoat |
| 748 | # endif | 746 | # endif |
| 749 | _GL_FUNCDECL_RPL (mkfifoat, int, (int fd, char const *file, mode_t mode) | 747 | _GL_FUNCDECL_RPL (mkfifoat, int, (int fd, char const *file, mode_t mode), |
| 750 | _GL_ARG_NONNULL ((2))); | 748 | _GL_ARG_NONNULL ((2))); |
| 751 | _GL_CXXALIAS_RPL (mkfifoat, int, (int fd, char const *file, mode_t mode)); | 749 | _GL_CXXALIAS_RPL (mkfifoat, int, (int fd, char const *file, mode_t mode)); |
| 752 | # else | 750 | # else |
| 753 | # if !@HAVE_MKFIFOAT@ | 751 | # if !@HAVE_MKFIFOAT@ |
| 754 | _GL_FUNCDECL_SYS (mkfifoat, int, (int fd, char const *file, mode_t mode) | 752 | _GL_FUNCDECL_SYS (mkfifoat, int, (int fd, char const *file, mode_t mode), |
| 755 | _GL_ARG_NONNULL ((2))); | 753 | _GL_ARG_NONNULL ((2))); |
| 756 | # endif | 754 | # endif |
| 757 | _GL_CXXALIAS_SYS (mkfifoat, int, (int fd, char const *file, mode_t mode)); | 755 | _GL_CXXALIAS_SYS (mkfifoat, int, (int fd, char const *file, mode_t mode)); |
| @@ -760,7 +758,6 @@ _GL_CXXALIAS_SYS (mkfifoat, int, (int fd, char const *file, mode_t mode)); | |||
| 760 | _GL_CXXALIASWARN (mkfifoat); | 758 | _GL_CXXALIASWARN (mkfifoat); |
| 761 | # endif | 759 | # endif |
| 762 | #elif defined GNULIB_POSIXCHECK | 760 | #elif defined GNULIB_POSIXCHECK |
| 763 | # undef mkfifoat | ||
| 764 | # if HAVE_RAW_DECL_MKFIFOAT | 761 | # if HAVE_RAW_DECL_MKFIFOAT |
| 765 | _GL_WARN_ON_USE (mkfifoat, "mkfifoat is not portable - " | 762 | _GL_WARN_ON_USE (mkfifoat, "mkfifoat is not portable - " |
| 766 | "use gnulib module mkfifoat for portability"); | 763 | "use gnulib module mkfifoat for portability"); |
| @@ -774,20 +771,18 @@ _GL_WARN_ON_USE (mkfifoat, "mkfifoat is not portable - " | |||
| 774 | # undef mknod | 771 | # undef mknod |
| 775 | # define mknod rpl_mknod | 772 | # define mknod rpl_mknod |
| 776 | # endif | 773 | # endif |
| 777 | _GL_FUNCDECL_RPL (mknod, int, (char const *file, mode_t mode, dev_t dev) | 774 | _GL_FUNCDECL_RPL (mknod, int, (char const *file, mode_t mode, dev_t dev), |
| 778 | _GL_ARG_NONNULL ((1))); | 775 | _GL_ARG_NONNULL ((1))); |
| 779 | _GL_CXXALIAS_RPL (mknod, int, (char const *file, mode_t mode, dev_t dev)); | 776 | _GL_CXXALIAS_RPL (mknod, int, (char const *file, mode_t mode, dev_t dev)); |
| 780 | # else | 777 | # else |
| 781 | # if !@HAVE_MKNOD@ | 778 | # if !@HAVE_MKNOD@ |
| 782 | _GL_FUNCDECL_SYS (mknod, int, (char const *file, mode_t mode, dev_t dev) | 779 | _GL_FUNCDECL_SYS (mknod, int, (char const *file, mode_t mode, dev_t dev), |
| 783 | _GL_ARG_NONNULL ((1))); | 780 | _GL_ARG_NONNULL ((1))); |
| 784 | # endif | 781 | # endif |
| 785 | /* Need to cast, because on OSF/1 5.1, the third parameter is '...'. */ | 782 | _GL_CXXALIAS_SYS (mknod, int, (char const *file, mode_t mode, dev_t dev)); |
| 786 | _GL_CXXALIAS_SYS_CAST (mknod, int, (char const *file, mode_t mode, dev_t dev)); | ||
| 787 | # endif | 783 | # endif |
| 788 | _GL_CXXALIASWARN (mknod); | 784 | _GL_CXXALIASWARN (mknod); |
| 789 | #elif defined GNULIB_POSIXCHECK | 785 | #elif defined GNULIB_POSIXCHECK |
| 790 | # undef mknod | ||
| 791 | # if HAVE_RAW_DECL_MKNOD | 786 | # if HAVE_RAW_DECL_MKNOD |
| 792 | _GL_WARN_ON_USE (mknod, "mknod is not portable - " | 787 | _GL_WARN_ON_USE (mknod, "mknod is not portable - " |
| 793 | "use gnulib module mknod for portability"); | 788 | "use gnulib module mknod for portability"); |
| @@ -802,14 +797,14 @@ _GL_WARN_ON_USE (mknod, "mknod is not portable - " | |||
| 802 | # define mknodat rpl_mknodat | 797 | # define mknodat rpl_mknodat |
| 803 | # endif | 798 | # endif |
| 804 | _GL_FUNCDECL_RPL (mknodat, int, | 799 | _GL_FUNCDECL_RPL (mknodat, int, |
| 805 | (int fd, char const *file, mode_t mode, dev_t dev) | 800 | (int fd, char const *file, mode_t mode, dev_t dev), |
| 806 | _GL_ARG_NONNULL ((2))); | 801 | _GL_ARG_NONNULL ((2))); |
| 807 | _GL_CXXALIAS_RPL (mknodat, int, | 802 | _GL_CXXALIAS_RPL (mknodat, int, |
| 808 | (int fd, char const *file, mode_t mode, dev_t dev)); | 803 | (int fd, char const *file, mode_t mode, dev_t dev)); |
| 809 | # else | 804 | # else |
| 810 | # if !@HAVE_MKNODAT@ | 805 | # if !@HAVE_MKNODAT@ |
| 811 | _GL_FUNCDECL_SYS (mknodat, int, | 806 | _GL_FUNCDECL_SYS (mknodat, int, |
| 812 | (int fd, char const *file, mode_t mode, dev_t dev) | 807 | (int fd, char const *file, mode_t mode, dev_t dev), |
| 813 | _GL_ARG_NONNULL ((2))); | 808 | _GL_ARG_NONNULL ((2))); |
| 814 | # endif | 809 | # endif |
| 815 | _GL_CXXALIAS_SYS (mknodat, int, | 810 | _GL_CXXALIAS_SYS (mknodat, int, |
| @@ -819,7 +814,6 @@ _GL_CXXALIAS_SYS (mknodat, int, | |||
| 819 | _GL_CXXALIASWARN (mknodat); | 814 | _GL_CXXALIASWARN (mknodat); |
| 820 | # endif | 815 | # endif |
| 821 | #elif defined GNULIB_POSIXCHECK | 816 | #elif defined GNULIB_POSIXCHECK |
| 822 | # undef mknodat | ||
| 823 | # if HAVE_RAW_DECL_MKNODAT | 817 | # if HAVE_RAW_DECL_MKNODAT |
| 824 | _GL_WARN_ON_USE (mknodat, "mknodat is not portable - " | 818 | _GL_WARN_ON_USE (mknodat, "mknodat is not portable - " |
| 825 | "use gnulib module mkfifoat for portability"); | 819 | "use gnulib module mkfifoat for portability"); |
| @@ -841,7 +835,11 @@ _GL_WARN_ON_USE (mknodat, "mknodat is not portable - " | |||
| 841 | # elif @WINDOWS_64_BIT_ST_SIZE@ | 835 | # elif @WINDOWS_64_BIT_ST_SIZE@ |
| 842 | /* Above, we define stat to _stati64. */ | 836 | /* Above, we define stat to _stati64. */ |
| 843 | # if defined __MINGW32__ && defined _stati64 | 837 | # if defined __MINGW32__ && defined _stati64 |
| 844 | # ifndef _USE_32BIT_TIME_T | 838 | # ifdef _USE_32BIT_TIME_T |
| 839 | /* The system headers possibly define _stati64 to _stat32i64. */ | ||
| 840 | # undef _stat32i64 | ||
| 841 | # define _stat32i64(name, st) rpl_stat (name, st) | ||
| 842 | # else | ||
| 845 | /* The system headers define _stati64 to _stat64. */ | 843 | /* The system headers define _stati64 to _stat64. */ |
| 846 | # undef _stat64 | 844 | # undef _stat64 |
| 847 | # define _stat64(name, st) rpl_stat (name, st) | 845 | # define _stat64(name, st) rpl_stat (name, st) |
| @@ -893,7 +891,6 @@ _GL_EXTERN_C int stat (const char *restrict name, struct stat *restrict buf) | |||
| 893 | #define stat stat_used_without_requesting_gnulib_module_stat | 891 | #define stat stat_used_without_requesting_gnulib_module_stat |
| 894 | */ | 892 | */ |
| 895 | #elif defined GNULIB_POSIXCHECK | 893 | #elif defined GNULIB_POSIXCHECK |
| 896 | # undef stat | ||
| 897 | # if HAVE_RAW_DECL_STAT | 894 | # if HAVE_RAW_DECL_STAT |
| 898 | _GL_WARN_ON_USE (stat, "stat is unportable - " | 895 | _GL_WARN_ON_USE (stat, "stat is unportable - " |
| 899 | "use gnulib module stat for portability"); | 896 | "use gnulib module stat for portability"); |
| @@ -916,7 +913,7 @@ _GL_CXXALIAS_RPL_1 (lstat, stat, int, | |||
| 916 | # define lstat rpl_lstat | 913 | # define lstat rpl_lstat |
| 917 | # endif | 914 | # endif |
| 918 | _GL_FUNCDECL_RPL (lstat, int, | 915 | _GL_FUNCDECL_RPL (lstat, int, |
| 919 | (const char *restrict name, struct stat *restrict buf) | 916 | (const char *restrict name, struct stat *restrict buf), |
| 920 | _GL_ARG_NONNULL ((1, 2))); | 917 | _GL_ARG_NONNULL ((1, 2))); |
| 921 | _GL_CXXALIAS_RPL (lstat, int, | 918 | _GL_CXXALIAS_RPL (lstat, int, |
| 922 | (const char *restrict name, struct stat *restrict buf)); | 919 | (const char *restrict name, struct stat *restrict buf)); |
| @@ -928,10 +925,11 @@ _GL_CXXALIAS_SYS (lstat, int, | |||
| 928 | _GL_CXXALIASWARN (lstat); | 925 | _GL_CXXALIASWARN (lstat); |
| 929 | # endif | 926 | # endif |
| 930 | #elif @GNULIB_OVERRIDES_STRUCT_STAT@ | 927 | #elif @GNULIB_OVERRIDES_STRUCT_STAT@ |
| 931 | # undef lstat | 928 | # if !GNULIB_LSTAT |
| 932 | # define lstat lstat_used_without_requesting_gnulib_module_lstat | 929 | # undef lstat |
| 930 | # define lstat lstat_used_without_requesting_gnulib_module_lstat | ||
| 931 | # endif | ||
| 933 | #elif defined GNULIB_POSIXCHECK | 932 | #elif defined GNULIB_POSIXCHECK |
| 934 | # undef lstat | ||
| 935 | # if HAVE_RAW_DECL_LSTAT | 933 | # if HAVE_RAW_DECL_LSTAT |
| 936 | _GL_WARN_ON_USE (lstat, "lstat is unportable - " | 934 | _GL_WARN_ON_USE (lstat, "lstat is unportable - " |
| 937 | "use gnulib module lstat for portability"); | 935 | "use gnulib module lstat for portability"); |
| @@ -968,14 +966,14 @@ _GL_CXXALIASWARN (umask); | |||
| 968 | # define utimensat rpl_utimensat | 966 | # define utimensat rpl_utimensat |
| 969 | # endif | 967 | # endif |
| 970 | _GL_FUNCDECL_RPL (utimensat, int, (int fd, char const *name, | 968 | _GL_FUNCDECL_RPL (utimensat, int, (int fd, char const *name, |
| 971 | struct timespec const times[2], int flag) | 969 | struct timespec const times[2], int flag), |
| 972 | _GL_ARG_NONNULL ((2))); | 970 | _GL_ARG_NONNULL ((2))); |
| 973 | _GL_CXXALIAS_RPL (utimensat, int, (int fd, char const *name, | 971 | _GL_CXXALIAS_RPL (utimensat, int, (int fd, char const *name, |
| 974 | struct timespec const times[2], int flag)); | 972 | struct timespec const times[2], int flag)); |
| 975 | # else | 973 | # else |
| 976 | # if !@HAVE_UTIMENSAT@ | 974 | # if !@HAVE_UTIMENSAT@ |
| 977 | _GL_FUNCDECL_SYS (utimensat, int, (int fd, char const *name, | 975 | _GL_FUNCDECL_SYS (utimensat, int, (int fd, char const *name, |
| 978 | struct timespec const times[2], int flag) | 976 | struct timespec const times[2], int flag), |
| 979 | _GL_ARG_NONNULL ((2))); | 977 | _GL_ARG_NONNULL ((2))); |
| 980 | # endif | 978 | # endif |
| 981 | _GL_CXXALIAS_SYS (utimensat, int, (int fd, char const *name, | 979 | _GL_CXXALIAS_SYS (utimensat, int, (int fd, char const *name, |
| @@ -985,7 +983,6 @@ _GL_CXXALIAS_SYS (utimensat, int, (int fd, char const *name, | |||
| 985 | _GL_CXXALIASWARN (utimensat); | 983 | _GL_CXXALIASWARN (utimensat); |
| 986 | # endif | 984 | # endif |
| 987 | #elif defined GNULIB_POSIXCHECK | 985 | #elif defined GNULIB_POSIXCHECK |
| 988 | # undef utimensat | ||
| 989 | # if HAVE_RAW_DECL_UTIMENSAT | 986 | # if HAVE_RAW_DECL_UTIMENSAT |
| 990 | _GL_WARN_ON_USE (utimensat, "utimensat is not portable - " | 987 | _GL_WARN_ON_USE (utimensat, "utimensat is not portable - " |
| 991 | "use gnulib module utimensat for portability"); | 988 | "use gnulib module utimensat for portability"); |
