diff options
Diffstat (limited to 'gl/sys_stat.in.h')
-rw-r--r-- | gl/sys_stat.in.h | 50 |
1 files changed, 47 insertions, 3 deletions
diff --git a/gl/sys_stat.in.h b/gl/sys_stat.in.h index 096887c..bf08f33 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-2024 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,41 @@ | |||
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_NOTHROW, GNULIB_POSIXCHECK, HAVE_RAW_DECL_*. */ | ||
59 | #if !_GL_CONFIG_H_INCLUDED | ||
60 | #error "Please include config.h first." | ||
61 | #endif | ||
62 | |||
63 | |||
64 | /* _GL_ATTRIBUTE_NOTHROW declares that the function does not throw exceptions. | ||
65 | */ | ||
66 | #ifndef _GL_ATTRIBUTE_NOTHROW | ||
67 | # if defined __cplusplus | ||
68 | # if (__GNUC__ + (__GNUC_MINOR__ >= 8) > 2) || __clang_major >= 4 | ||
69 | # if __cplusplus >= 201103L | ||
70 | # define _GL_ATTRIBUTE_NOTHROW noexcept (true) | ||
71 | # else | ||
72 | # define _GL_ATTRIBUTE_NOTHROW throw () | ||
73 | # endif | ||
74 | # else | ||
75 | # define _GL_ATTRIBUTE_NOTHROW | ||
76 | # endif | ||
77 | # else | ||
78 | # if (__GNUC__ + (__GNUC_MINOR__ >= 3) > 3) || defined __clang__ | ||
79 | # define _GL_ATTRIBUTE_NOTHROW __attribute__ ((__nothrow__)) | ||
80 | # else | ||
81 | # define _GL_ATTRIBUTE_NOTHROW | ||
82 | # endif | ||
83 | # endif | ||
84 | #endif | ||
85 | |||
51 | /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ | 86 | /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ |
52 | 87 | ||
53 | /* The definition of _GL_ARG_NONNULL is copied here. */ | 88 | /* The definition of _GL_ARG_NONNULL is copied here. */ |
54 | 89 | ||
55 | /* The definition of _GL_WARN_ON_USE is copied here. */ | 90 | /* The definition of _GL_WARN_ON_USE is copied here. */ |
56 | 91 | ||
92 | |||
57 | /* Before doing "#define mknod rpl_mknod" below, we need to include all | 93 | /* Before doing "#define mknod rpl_mknod" below, we need to include all |
58 | headers that may declare mknod(). OS/2 kLIBC declares mknod() in | 94 | headers that may declare mknod(). OS/2 kLIBC declares mknod() in |
59 | <unistd.h>, not in <sys/stat.h>. */ | 95 | <unistd.h>, not in <sys/stat.h>. */ |
@@ -549,7 +585,7 @@ _GL_FUNCDECL_SYS (futimens, int, (int fd, struct timespec const times[2])); | |||
549 | # endif | 585 | # endif |
550 | _GL_CXXALIAS_SYS (futimens, int, (int fd, struct timespec const times[2])); | 586 | _GL_CXXALIAS_SYS (futimens, int, (int fd, struct timespec const times[2])); |
551 | # endif | 587 | # endif |
552 | # if @HAVE_FUTIMENS@ | 588 | # if __GLIBC__ >= 2 && @HAVE_FUTIMENS@ |
553 | _GL_CXXALIASWARN (futimens); | 589 | _GL_CXXALIASWARN (futimens); |
554 | # endif | 590 | # endif |
555 | #elif defined GNULIB_POSIXCHECK | 591 | #elif defined GNULIB_POSIXCHECK |
@@ -563,7 +599,11 @@ _GL_WARN_ON_USE (futimens, "futimens is not portable - " | |||
563 | 599 | ||
564 | #if @GNULIB_GETUMASK@ | 600 | #if @GNULIB_GETUMASK@ |
565 | # if !@HAVE_GETUMASK@ | 601 | # if !@HAVE_GETUMASK@ |
602 | # if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 | ||
603 | _GL_FUNCDECL_SYS (getumask, mode_t, (void) _GL_ATTRIBUTE_NOTHROW); | ||
604 | # else | ||
566 | _GL_FUNCDECL_SYS (getumask, mode_t, (void)); | 605 | _GL_FUNCDECL_SYS (getumask, mode_t, (void)); |
606 | # endif | ||
567 | # endif | 607 | # endif |
568 | _GL_CXXALIAS_SYS (getumask, mode_t, (void)); | 608 | _GL_CXXALIAS_SYS (getumask, mode_t, (void)); |
569 | # if @HAVE_GETUMASK@ | 609 | # if @HAVE_GETUMASK@ |
@@ -716,7 +756,9 @@ _GL_FUNCDECL_SYS (mkfifoat, int, (int fd, char const *file, mode_t mode) | |||
716 | # endif | 756 | # endif |
717 | _GL_CXXALIAS_SYS (mkfifoat, int, (int fd, char const *file, mode_t mode)); | 757 | _GL_CXXALIAS_SYS (mkfifoat, int, (int fd, char const *file, mode_t mode)); |
718 | # endif | 758 | # endif |
759 | # if __GLIBC__ >= 2 | ||
719 | _GL_CXXALIASWARN (mkfifoat); | 760 | _GL_CXXALIASWARN (mkfifoat); |
761 | # endif | ||
720 | #elif defined GNULIB_POSIXCHECK | 762 | #elif defined GNULIB_POSIXCHECK |
721 | # undef mkfifoat | 763 | # undef mkfifoat |
722 | # if HAVE_RAW_DECL_MKFIFOAT | 764 | # if HAVE_RAW_DECL_MKFIFOAT |
@@ -773,7 +815,9 @@ _GL_FUNCDECL_SYS (mknodat, int, | |||
773 | _GL_CXXALIAS_SYS (mknodat, int, | 815 | _GL_CXXALIAS_SYS (mknodat, int, |
774 | (int fd, char const *file, mode_t mode, dev_t dev)); | 816 | (int fd, char const *file, mode_t mode, dev_t dev)); |
775 | # endif | 817 | # endif |
818 | # if __GLIBC__ >= 2 | ||
776 | _GL_CXXALIASWARN (mknodat); | 819 | _GL_CXXALIASWARN (mknodat); |
820 | # endif | ||
777 | #elif defined GNULIB_POSIXCHECK | 821 | #elif defined GNULIB_POSIXCHECK |
778 | # undef mknodat | 822 | # undef mknodat |
779 | # if HAVE_RAW_DECL_MKNODAT | 823 | # if HAVE_RAW_DECL_MKNODAT |
@@ -937,7 +981,7 @@ _GL_FUNCDECL_SYS (utimensat, int, (int fd, char const *name, | |||
937 | _GL_CXXALIAS_SYS (utimensat, int, (int fd, char const *name, | 981 | _GL_CXXALIAS_SYS (utimensat, int, (int fd, char const *name, |
938 | struct timespec const times[2], int flag)); | 982 | struct timespec const times[2], int flag)); |
939 | # endif | 983 | # endif |
940 | # if @HAVE_UTIMENSAT@ | 984 | # if __GLIBC__ >= 2 && @HAVE_UTIMENSAT@ |
941 | _GL_CXXALIASWARN (utimensat); | 985 | _GL_CXXALIASWARN (utimensat); |
942 | # endif | 986 | # endif |
943 | #elif defined GNULIB_POSIXCHECK | 987 | #elif defined GNULIB_POSIXCHECK |