* modules/sys_stat-h: Renamed from modules/sys_stat.
* modules/sys_stat-h-tests: Renamed from modules/sys_stat-tests.
* modules/sys_stat-h-c++-tests: Renamed from modules/sys_stat-c++-tests.
* tests/test-sys_stat-h.c: Renamed from tests/test-sys_stat.c.
* tests/test-sys_stat-h-c++.cc: Renamed from tests/test-sys_stat-c++.cc.
* doc/posix-headers/sys_stat.texi: Update.
* doc/posix-functions/mkdir.texi: Update.
* modules/* (Depends-on): Update.
* modules/sys_stat: New file.
+2024-12-27 Bruno Haible <bruno@clisp.org>
+
+ Rename module sys_stat to sys_stat-h.
+ * modules/sys_stat-h: Renamed from modules/sys_stat.
+ * modules/sys_stat-h-tests: Renamed from modules/sys_stat-tests.
+ * modules/sys_stat-h-c++-tests: Renamed from modules/sys_stat-c++-tests.
+ * tests/test-sys_stat-h.c: Renamed from tests/test-sys_stat.c.
+ * tests/test-sys_stat-h-c++.cc: Renamed from tests/test-sys_stat-c++.cc.
+ * doc/posix-headers/sys_stat.texi: Update.
+ * doc/posix-functions/mkdir.texi: Update.
+ * modules/* (Depends-on): Update.
+ * modules/sys_stat: New file.
+
2024-12-27 Bruno Haible <bruno@clisp.org>
Rename module sys_socket to sys_socket-h.
POSIX specification:@* @url{https://pubs.opengroup.org/onlinepubs/9799919799/functions/mkdir.html}
-Gnulib module: sys_stat or mkdir
-@mindex sys_stat
+Gnulib module: sys_stat-h or mkdir
+@mindex sys_stat-h
@mindex mkdir
-Portability problems fixed by either Gnulib module @code{sys_stat} or @code{mkdir}:
+Portability problems fixed by either Gnulib module @code{sys_stat-h} or @code{mkdir}:
@itemize
@item
This function is declared in different header files (namely, @code{<io.h>} or
POSIX specification:@* @url{https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/sys_stat.h.html}
-Gnulib module: sys_stat
-@mindex sys_stat
+Gnulib module: sys_stat-h
+@mindex sys_stat-h
-Portability problems fixed by Gnulib module @code{sys_stat}:
+Portability problems fixed by Gnulib module @code{sys_stat-h}:
@itemize
@item
The type @code{mode_t} is not defined on some platforms:
@end itemize
@mindex windows-stat-inodes
-Portability problems fixed by Gnulib module @code{sys_stat}, together with module @code{windows-stat-inodes}:
+Portability problems fixed by Gnulib module @code{sys_stat-h}, together with module @code{windows-stat-inodes}:
@itemize
@item
On Windows platforms (excluding Cygwin), @code{st_ino} is always 0.
minmax
stat
stdbool-h
-sys_stat
+sys_stat-h
configure.ac:
gl_FUNC_ACL
fcntl-h
intprops
open [case $host_os in mingw* | windows*) false;; *) :;; esac]
-sys_stat
+sys_stat-h
unistd
configure.ac:
lib/c-file-type.c
Depends-on:
-sys_stat
+sys_stat-h
configure.ac:
glibc-internal/scratch_buffer
stat
stdbool-h
-sys_stat
+sys_stat-h
unistd
xalloc-die
glibc-internal/scratch_buffer [test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1]
stat [test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1]
stdbool-h [test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1]
-sys_stat [test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1]
+sys_stat-h [test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1]
unistd [test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1]
configure.ac:
m4/chmod.m4
Depends-on:
-sys_stat
+sys_stat-h
lstat [test $REPLACE_CHMOD = 1]
configure.ac:
open [test $HAVE_CHOWN = 0 || test $REPLACE_CHOWN = 1]
stat [test $HAVE_CHOWN = 0 || test $REPLACE_CHOWN = 1]
stdbool-h [test $HAVE_CHOWN = 0 || test $REPLACE_CHOWN = 1]
-sys_stat [test $HAVE_CHOWN = 0 || test $REPLACE_CHOWN = 1]
+sys_stat-h [test $HAVE_CHOWN = 0 || test $REPLACE_CHOWN = 1]
configure.ac:
gl_FUNC_CHOWN
ftello [test $USE_AF_ALG = 1]
fstat [test $USE_AF_ALG = 1]
sys_socket-h
-sys_stat
+sys_stat-h
configure.ac:
gl_AF_ALG
access [test $HAVE_EUIDACCESS = 0]
group-member [test $HAVE_EUIDACCESS = 0]
stat [test $HAVE_EUIDACCESS = 0]
-sys_stat [test $HAVE_EUIDACCESS = 0]
+sys_stat-h [test $HAVE_EUIDACCESS = 0]
configure.ac:
gl_FUNC_EUIDACCESS
stat [test $HAVE_FCHDIR = 0 || test $REPLACE_FCHDIR = 1]
stdbool-h [test $HAVE_FCHDIR = 0 || test $REPLACE_FCHDIR = 1]
strdup-posix [test $HAVE_FCHDIR = 0 || test $REPLACE_FCHDIR = 1]
-sys_stat [test $HAVE_FCHDIR = 0 || test $REPLACE_FCHDIR = 1]
+sys_stat-h [test $HAVE_FCHDIR = 0 || test $REPLACE_FCHDIR = 1]
configure.ac:
gl_FUNC_FCHDIR
m4/fchmodat.m4
Depends-on:
-sys_stat
+sys_stat-h
extensions
errno-h [test $HAVE_FCHMODAT = 0 || test $REPLACE_FCHMODAT = 1]
fcntl-h [test $HAVE_FCHMODAT = 0 || test $REPLACE_FCHMODAT = 1]
c-file-type
gettext-h
gnulib-i18n
-sys_stat
+sys_stat-h
configure.ac:
m4/filemode.m4
Depends-on:
-sys_stat
+sys_stat-h
configure.ac:
gl_FILEMODE
Depends-on:
stdbool-h
-sys_stat
+sys_stat-h
xalloc
xconcat-filename
access
Depends-on:
stdbool-h
-sys_stat
+sys_stat-h
filename
concat-filename
access
Depends-on:
stdbool-h
-sys_stat
+sys_stat-h
strdup
concat-filename
access
m4/fstat.m4
Depends-on:
-sys_stat
+sys_stat-h
largefile
pathmax [test $REPLACE_FSTAT = 1]
stat [test $REPLACE_FSTAT = 1]
m4/lstat.m4
Depends-on:
-sys_stat
+sys_stat-h
extensions
at-internal [test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1]
errno-h [test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1]
m4/futimens.m4
Depends-on:
-sys_stat
+sys_stat-h
extensions
utimens [test $HAVE_FUTIMENS = 0 || test $REPLACE_FUTIMENS = 1]
getcwd-lgpl
pathmax
stdbool-h
-sys_stat
+sys_stat-h
test-framework-sh
configure.ac:
m4/getumask.m4
Depends-on:
-sys_stat
+sys_stat-h
extensions
c99 [test $HAVE_GETUMASK = 0]
unistd [test $HAVE_GETUMASK = 0]
snippet/warn-on-use
libc-config
lstat
-sys_stat
+sys_stat-h
configure.ac:
gl_GLOB_H
Depends-on:
stdbool-h [test $HAVE_ISAPIPE = 0]
-sys_stat [test $HAVE_ISAPIPE = 0]
+sys_stat-h [test $HAVE_ISAPIPE = 0]
unistd [test $HAVE_ISAPIPE = 0]
msvc-nothrow [test $HAVE_ISAPIPE = 0]
fstat [test $HAVE_ISAPIPE = 0]
Depends-on:
intprops
sys_types
-sys_stat
+sys_stat-h
configure.ac:
intprops [test $HAVE_LCHMOD = 0]
lstat [test $HAVE_LCHMOD = 0]
readlink [test $HAVE_LCHMOD = 0]
-sys_stat
+sys_stat-h
unistd [test $HAVE_LCHMOD = 0]
configure.ac:
chown [test $HAVE_LCHOWN = 0 || test $REPLACE_LCHOWN = 1]
errno-h [test $HAVE_LCHOWN = 0 || test $REPLACE_LCHOWN = 1]
stdbool-h [test $HAVE_LCHOWN = 0 || test $REPLACE_LCHOWN = 1]
-sys_stat [test $HAVE_LCHOWN = 0 || test $REPLACE_LCHOWN = 1]
+sys_stat-h [test $HAVE_LCHOWN = 0 || test $REPLACE_LCHOWN = 1]
lstat [test $REPLACE_LCHOWN = 1]
configure.ac:
free-posix [test $HAVE_LINK = 0 || test $REPLACE_LINK = 1]
stat [test $HAVE_LINK = 0 || test $REPLACE_LINK = 1]
strdup-posix [test $HAVE_LINK = 0 || test $REPLACE_LINK = 1]
-sys_stat [test $HAVE_LINK = 0 || test $REPLACE_LINK = 1]
+sys_stat-h [test $HAVE_LINK = 0 || test $REPLACE_LINK = 1]
configure.ac:
gl_FUNC_LINK
ignore-value
errno-h
stdbool-h
-sys_stat
+sys_stat-h
configure.ac:
m4/lstat.m4
Depends-on:
-sys_stat
+sys_stat-h
largefile
stat [test $REPLACE_LSTAT = 1]
stat-time [test $REPLACE_LSTAT = 1]
filename
savewd
stat-macros
-sys_stat
+sys_stat-h
configure.ac:
gl_MKANCESDIRS
m4/mkdir.m4
Depends-on:
-sys_stat
+sys_stat-h
dirname-lgpl [test $REPLACE_MKDIR = 1]
stat [test $REPLACE_MKDIR = 1]
stat
stat-macros
stdbool-h
-sys_stat
+sys_stat-h
configure.ac:
gl_MKDIR_PARENTS
m4/mkdirat.m4
Depends-on:
-sys_stat
+sys_stat-h
extensions
at-internal [test $HAVE_MKDIRAT = 0]
errno-h [test $HAVE_MKDIRAT = 0]
m4/mkfifo.m4
Depends-on:
-sys_stat
+sys_stat-h
stat [test $HAVE_MKFIFO = 0 || test $REPLACE_MKFIFO = 1]
configure.ac:
m4/mkfifoat.m4
Depends-on:
-sys_stat
+sys_stat-h
extensions
fcntl-h [test $HAVE_MKFIFOAT = 0 || test $REPLACE_MKFIFOAT = 1 || test $HAVE_MKNODAT = 0 || test $REPLACE_MKNODAT = 1]
fstatat [test $REPLACE_MKFIFOAT = 1 || test $REPLACE_MKNODAT = 1]
m4/mknod.m4
Depends-on:
-sys_stat
+sys_stat-h
extensions
mkfifo [test $HAVE_MKNOD = 0 || test $REPLACE_MKNOD = 1]
stat [test $HAVE_MKNOD = 0 || test $REPLACE_MKNOD = 1]
stat
stat-macros
stdbool-h
-sys_stat
+sys_stat-h
xalloc
configure.ac:
largefile
openat-h [test $HAVE_OPENAT = 0 || test $REPLACE_OPENAT = 1]
stdbool-h [test $HAVE_OPENAT = 0 || test $REPLACE_OPENAT = 1]
-sys_stat [test $HAVE_OPENAT = 0 || test $REPLACE_OPENAT = 1]
+sys_stat-h [test $HAVE_OPENAT = 0 || test $REPLACE_OPENAT = 1]
cloexec [test $REPLACE_OPENAT = 1]
fstat [test $REPLACE_OPENAT = 1]
at-internal [test $HAVE_OPENAT = 0]
extern-inline
fcntl-h
stdbool-h
-sys_stat
+sys_stat-h
unistd
configure.ac:
sys_resource-h
sys_select-h
sys_socket-h
-sys_stat
+sys_stat-h
sys_time
sys_times
sys_utsname
memset_explicit
realloc-posix
stdint-h
-sys_stat
+sys_stat-h
configure.ac:
gl_PREREQ_READ_FILE
stdint-h
stdlib-h
string-h
-sys_stat
+sys_stat-h
unistd
xalloc-oversized
Depends-on:
ignore-value
symlink
-sys_stat
+sys_stat-h
configure.ac:
link
stdbool-h
symlink
-sys_stat
+sys_stat-h
opendir
readdir
closedir
Depends-on:
unistd
filename [test $REPLACE_RMDIR = 1]
-sys_stat [test $REPLACE_RMDIR = 1]
+sys_stat-h [test $REPLACE_RMDIR = 1]
configure.ac:
gl_FUNC_RMDIR
m4/stat.m4
Depends-on:
-sys_stat
+sys_stat-h
largefile
assert-h [test $REPLACE_STAT = 1]
filename [test $REPLACE_STAT = 1]
Depends-on:
fileblocks
-sys_stat
+sys_stat-h
configure.ac:
gl_STAT_SIZE
c99
fcntl-h
stdbool-h
-sys_stat
+sys_stat-h
clean-temp
tempname
canonicalize
Description:
A <sys/stat.h> for systems with missing declarations.
+Status:
+deprecated
+
+Notice:
+This module is deprecated. Use the module 'sys_stat-h' instead.
+
Files:
-lib/sys_stat.in.h
-m4/sys_stat_h.m4
-m4/unistd_h.m4
-m4/pid_t.m4
Depends-on:
-gen-header
-include_next
-snippet/arg-nonnull
-snippet/c++defs
-snippet/warn-on-use
-sys_types
-time-h
+sys_stat-h
configure.ac:
-gl_SYS_STAT_H
-gl_SYS_STAT_H_REQUIRE_DEFAULTS
-AC_PROG_MKDIR_P
Makefile.am:
-BUILT_SOURCES += sys/stat.h
-
-# We need the following in order to create <sys/stat.h> when the system
-# has one that is incomplete.
-sys/stat.h: sys_stat.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
- $(AM_V_GEN)$(MKDIR_P) '%reldir%/sys'
- $(AM_V_at)$(SED_HEADER_STDOUT) \
- -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \
- -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
- -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
- -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
- -e 's|@''NEXT_SYS_STAT_H''@|$(NEXT_SYS_STAT_H)|g' \
- -e 's|@''WINDOWS_64_BIT_ST_SIZE''@|$(WINDOWS_64_BIT_ST_SIZE)|g' \
- -e 's|@''WINDOWS_STAT_TIMESPEC''@|$(WINDOWS_STAT_TIMESPEC)|g' \
- -e 's/@''GNULIB_CHMOD''@/$(GNULIB_CHMOD)/g' \
- -e 's/@''GNULIB_FCHMODAT''@/$(GNULIB_FCHMODAT)/g' \
- -e 's/@''GNULIB_FSTAT''@/$(GNULIB_FSTAT)/g' \
- -e 's/@''GNULIB_FSTATAT''@/$(GNULIB_FSTATAT)/g' \
- -e 's/@''GNULIB_FUTIMENS''@/$(GNULIB_FUTIMENS)/g' \
- -e 's/@''GNULIB_GETUMASK''@/$(GNULIB_GETUMASK)/g' \
- -e 's/@''GNULIB_LCHMOD''@/$(GNULIB_LCHMOD)/g' \
- -e 's/@''GNULIB_LSTAT''@/$(GNULIB_LSTAT)/g' \
- -e 's/@''GNULIB_MKDIR''@/$(GNULIB_MKDIR)/g' \
- -e 's/@''GNULIB_MKDIRAT''@/$(GNULIB_MKDIRAT)/g' \
- -e 's/@''GNULIB_MKFIFO''@/$(GNULIB_MKFIFO)/g' \
- -e 's/@''GNULIB_MKFIFOAT''@/$(GNULIB_MKFIFOAT)/g' \
- -e 's/@''GNULIB_MKNOD''@/$(GNULIB_MKNOD)/g' \
- -e 's/@''GNULIB_MKNODAT''@/$(GNULIB_MKNODAT)/g' \
- -e 's/@''GNULIB_STAT''@/$(GNULIB_STAT)/g' \
- -e 's/@''GNULIB_UTIMENSAT''@/$(GNULIB_UTIMENSAT)/g' \
- -e 's/@''GNULIB_OVERRIDES_STRUCT_STAT''@/$(GNULIB_OVERRIDES_STRUCT_STAT)/g' \
- -e 's/@''GNULIB_MDA_CHMOD''@/$(GNULIB_MDA_CHMOD)/g' \
- -e 's/@''GNULIB_MDA_MKDIR''@/$(GNULIB_MDA_MKDIR)/g' \
- -e 's/@''GNULIB_MDA_UMASK''@/$(GNULIB_MDA_UMASK)/g' \
- -e 's|@''HAVE_FCHMODAT''@|$(HAVE_FCHMODAT)|g' \
- -e 's|@''HAVE_FSTATAT''@|$(HAVE_FSTATAT)|g' \
- -e 's|@''HAVE_FUTIMENS''@|$(HAVE_FUTIMENS)|g' \
- -e 's|@''HAVE_GETUMASK''@|$(HAVE_GETUMASK)|g' \
- -e 's|@''HAVE_LCHMOD''@|$(HAVE_LCHMOD)|g' \
- -e 's|@''HAVE_LSTAT''@|$(HAVE_LSTAT)|g' \
- -e 's|@''HAVE_MKDIRAT''@|$(HAVE_MKDIRAT)|g' \
- -e 's|@''HAVE_MKFIFO''@|$(HAVE_MKFIFO)|g' \
- -e 's|@''HAVE_MKFIFOAT''@|$(HAVE_MKFIFOAT)|g' \
- -e 's|@''HAVE_MKNOD''@|$(HAVE_MKNOD)|g' \
- -e 's|@''HAVE_MKNODAT''@|$(HAVE_MKNODAT)|g' \
- -e 's|@''HAVE_UTIMENSAT''@|$(HAVE_UTIMENSAT)|g' \
- -e 's|@''REPLACE_CHMOD''@|$(REPLACE_CHMOD)|g' \
- -e 's|@''REPLACE_FCHMODAT''@|$(REPLACE_FCHMODAT)|g' \
- -e 's|@''REPLACE_FSTAT''@|$(REPLACE_FSTAT)|g' \
- -e 's|@''REPLACE_FSTATAT''@|$(REPLACE_FSTATAT)|g' \
- -e 's|@''REPLACE_FUTIMENS''@|$(REPLACE_FUTIMENS)|g' \
- -e 's|@''REPLACE_LSTAT''@|$(REPLACE_LSTAT)|g' \
- -e 's|@''REPLACE_MKDIR''@|$(REPLACE_MKDIR)|g' \
- -e 's|@''REPLACE_MKFIFO''@|$(REPLACE_MKFIFO)|g' \
- -e 's|@''REPLACE_MKFIFOAT''@|$(REPLACE_MKFIFOAT)|g' \
- -e 's|@''REPLACE_MKNOD''@|$(REPLACE_MKNOD)|g' \
- -e 's|@''REPLACE_MKNODAT''@|$(REPLACE_MKNODAT)|g' \
- -e 's|@''REPLACE_STAT''@|$(REPLACE_STAT)|g' \
- -e 's|@''REPLACE_UTIMENSAT''@|$(REPLACE_UTIMENSAT)|g' \
- -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
- -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
- -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
- $(srcdir)/sys_stat.in.h > $@-t
- $(AM_V_at)mv $@-t $@
-MOSTLYCLEANFILES += sys/stat.h sys/stat.h-t
-MOSTLYCLEANDIRS += sys
Include:
<sys/stat.h>
LGPLv2+
Maintainer:
-all
+++ /dev/null
-Files:
-tests/test-sys_stat-c++.cc
-tests/signature.h
-
-Status:
-c++-test
-
-Depends-on:
-ansi-c++-opt
-
-configure.ac:
-
-Makefile.am:
-if ANSICXX
-TESTS += test-sys_stat-c++
-check_PROGRAMS += test-sys_stat-c++
-test_sys_stat_c___SOURCES = test-sys_stat-c++.cc
-test_sys_stat_c___LDADD = $(LDADD) $(LIBINTL) $(CLOCK_TIME_LIB) $(MBRTOWC_LIB) $(GETRANDOM_LIB)
-endif
--- /dev/null
+Description:
+A <sys/stat.h> for systems with missing declarations.
+
+Files:
+lib/sys_stat.in.h
+m4/sys_stat_h.m4
+m4/unistd_h.m4
+m4/pid_t.m4
+
+Depends-on:
+gen-header
+include_next
+snippet/arg-nonnull
+snippet/c++defs
+snippet/warn-on-use
+sys_types
+time-h
+
+configure.ac:
+gl_SYS_STAT_H
+gl_SYS_STAT_H_REQUIRE_DEFAULTS
+AC_PROG_MKDIR_P
+
+Makefile.am:
+BUILT_SOURCES += sys/stat.h
+
+# We need the following in order to create <sys/stat.h> when the system
+# has one that is incomplete.
+sys/stat.h: sys_stat.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
+ $(AM_V_GEN)$(MKDIR_P) '%reldir%/sys'
+ $(AM_V_at)$(SED_HEADER_STDOUT) \
+ -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \
+ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+ -e 's|@''NEXT_SYS_STAT_H''@|$(NEXT_SYS_STAT_H)|g' \
+ -e 's|@''WINDOWS_64_BIT_ST_SIZE''@|$(WINDOWS_64_BIT_ST_SIZE)|g' \
+ -e 's|@''WINDOWS_STAT_TIMESPEC''@|$(WINDOWS_STAT_TIMESPEC)|g' \
+ -e 's/@''GNULIB_CHMOD''@/$(GNULIB_CHMOD)/g' \
+ -e 's/@''GNULIB_FCHMODAT''@/$(GNULIB_FCHMODAT)/g' \
+ -e 's/@''GNULIB_FSTAT''@/$(GNULIB_FSTAT)/g' \
+ -e 's/@''GNULIB_FSTATAT''@/$(GNULIB_FSTATAT)/g' \
+ -e 's/@''GNULIB_FUTIMENS''@/$(GNULIB_FUTIMENS)/g' \
+ -e 's/@''GNULIB_GETUMASK''@/$(GNULIB_GETUMASK)/g' \
+ -e 's/@''GNULIB_LCHMOD''@/$(GNULIB_LCHMOD)/g' \
+ -e 's/@''GNULIB_LSTAT''@/$(GNULIB_LSTAT)/g' \
+ -e 's/@''GNULIB_MKDIR''@/$(GNULIB_MKDIR)/g' \
+ -e 's/@''GNULIB_MKDIRAT''@/$(GNULIB_MKDIRAT)/g' \
+ -e 's/@''GNULIB_MKFIFO''@/$(GNULIB_MKFIFO)/g' \
+ -e 's/@''GNULIB_MKFIFOAT''@/$(GNULIB_MKFIFOAT)/g' \
+ -e 's/@''GNULIB_MKNOD''@/$(GNULIB_MKNOD)/g' \
+ -e 's/@''GNULIB_MKNODAT''@/$(GNULIB_MKNODAT)/g' \
+ -e 's/@''GNULIB_STAT''@/$(GNULIB_STAT)/g' \
+ -e 's/@''GNULIB_UTIMENSAT''@/$(GNULIB_UTIMENSAT)/g' \
+ -e 's/@''GNULIB_OVERRIDES_STRUCT_STAT''@/$(GNULIB_OVERRIDES_STRUCT_STAT)/g' \
+ -e 's/@''GNULIB_MDA_CHMOD''@/$(GNULIB_MDA_CHMOD)/g' \
+ -e 's/@''GNULIB_MDA_MKDIR''@/$(GNULIB_MDA_MKDIR)/g' \
+ -e 's/@''GNULIB_MDA_UMASK''@/$(GNULIB_MDA_UMASK)/g' \
+ -e 's|@''HAVE_FCHMODAT''@|$(HAVE_FCHMODAT)|g' \
+ -e 's|@''HAVE_FSTATAT''@|$(HAVE_FSTATAT)|g' \
+ -e 's|@''HAVE_FUTIMENS''@|$(HAVE_FUTIMENS)|g' \
+ -e 's|@''HAVE_GETUMASK''@|$(HAVE_GETUMASK)|g' \
+ -e 's|@''HAVE_LCHMOD''@|$(HAVE_LCHMOD)|g' \
+ -e 's|@''HAVE_LSTAT''@|$(HAVE_LSTAT)|g' \
+ -e 's|@''HAVE_MKDIRAT''@|$(HAVE_MKDIRAT)|g' \
+ -e 's|@''HAVE_MKFIFO''@|$(HAVE_MKFIFO)|g' \
+ -e 's|@''HAVE_MKFIFOAT''@|$(HAVE_MKFIFOAT)|g' \
+ -e 's|@''HAVE_MKNOD''@|$(HAVE_MKNOD)|g' \
+ -e 's|@''HAVE_MKNODAT''@|$(HAVE_MKNODAT)|g' \
+ -e 's|@''HAVE_UTIMENSAT''@|$(HAVE_UTIMENSAT)|g' \
+ -e 's|@''REPLACE_CHMOD''@|$(REPLACE_CHMOD)|g' \
+ -e 's|@''REPLACE_FCHMODAT''@|$(REPLACE_FCHMODAT)|g' \
+ -e 's|@''REPLACE_FSTAT''@|$(REPLACE_FSTAT)|g' \
+ -e 's|@''REPLACE_FSTATAT''@|$(REPLACE_FSTATAT)|g' \
+ -e 's|@''REPLACE_FUTIMENS''@|$(REPLACE_FUTIMENS)|g' \
+ -e 's|@''REPLACE_LSTAT''@|$(REPLACE_LSTAT)|g' \
+ -e 's|@''REPLACE_MKDIR''@|$(REPLACE_MKDIR)|g' \
+ -e 's|@''REPLACE_MKFIFO''@|$(REPLACE_MKFIFO)|g' \
+ -e 's|@''REPLACE_MKFIFOAT''@|$(REPLACE_MKFIFOAT)|g' \
+ -e 's|@''REPLACE_MKNOD''@|$(REPLACE_MKNOD)|g' \
+ -e 's|@''REPLACE_MKNODAT''@|$(REPLACE_MKNODAT)|g' \
+ -e 's|@''REPLACE_STAT''@|$(REPLACE_STAT)|g' \
+ -e 's|@''REPLACE_UTIMENSAT''@|$(REPLACE_UTIMENSAT)|g' \
+ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
+ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
+ $(srcdir)/sys_stat.in.h > $@-t
+ $(AM_V_at)mv $@-t $@
+MOSTLYCLEANFILES += sys/stat.h sys/stat.h-t
+MOSTLYCLEANDIRS += sys
+
+Include:
+<sys/stat.h>
+
+License:
+LGPLv2+
+
+Maintainer:
+all
--- /dev/null
+Files:
+tests/test-sys_stat-h-c++.cc
+tests/signature.h
+
+Status:
+c++-test
+
+Depends-on:
+ansi-c++-opt
+
+configure.ac:
+
+Makefile.am:
+if ANSICXX
+TESTS += test-sys_stat-h-c++
+check_PROGRAMS += test-sys_stat-h-c++
+test_sys_stat_h_c___SOURCES = test-sys_stat-h-c++.cc
+test_sys_stat_h_c___LDADD = $(LDADD) $(LIBINTL) $(CLOCK_TIME_LIB) $(MBRTOWC_LIB) $(GETRANDOM_LIB)
+endif
--- /dev/null
+Files:
+tests/test-sys_stat-h.c
+
+Depends-on:
+assert-h
+sys_stat-h-c++-tests
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-sys_stat-h
+check_PROGRAMS += test-sys_stat-h
+++ /dev/null
-Files:
-tests/test-sys_stat.c
-
-Depends-on:
-assert-h
-sys_stat-c++-tests
-
-configure.ac:
-
-Makefile.am:
-TESTS += test-sys_stat
-check_PROGRAMS += test-sys_stat
mkdir
stdbool-h
stdint-h
-sys_stat
+sys_stat-h
time-h
configure.ac:
secure_getenv
stat
stdbool-h
-sys_stat
+sys_stat-h
pathmax
configure.ac:
unistd
sys_types
largefile
-sys_stat
+sys_stat-h
stat [test $REPLACE_TRUNCATE = 1]
open [test $HAVE_DECL_TRUNCATE = 0 || test $REPLACE_TRUNCATE = 1]
ftruncate [test $HAVE_DECL_TRUNCATE = 0 || test $REPLACE_TRUNCATE = 1]
extensions
fcntl-h [test $HAVE_UNLINKAT = 0 || test $REPLACE_UNLINKAT = 1]
openat-h [test $HAVE_UNLINKAT = 0 || test $REPLACE_UNLINKAT = 1]
-sys_stat [test $HAVE_UNLINKAT = 0 || test $REPLACE_UNLINKAT = 1]
+sys_stat-h [test $HAVE_UNLINKAT = 0 || test $REPLACE_UNLINKAT = 1]
at-internal [test $HAVE_UNLINKAT = 0]
errno-h [test $HAVE_UNLINKAT = 0]
fchdir [test $HAVE_UNLINKAT = 0]
stat
stat-time
stdbool-h
-sys_stat
+sys_stat-h
sys_time
time-h
utime
m4/utimensat.m4
Depends-on:
-sys_stat
+sys_stat-h
extensions
at-internal [test $HAVE_UTIMENSAT = 0 || test $REPLACE_UTIMENSAT = 1]
errno-h [test $HAVE_UTIMENSAT = 0 || test $REPLACE_UTIMENSAT = 1]
Files:
Depends-on:
-sys_stat
+sys_stat-h
configure.ac:
gl_SYS_STAT_H_REQUIRE_DEFAULTS
+++ /dev/null
-/* Test of <sys/stat.h> substitute in C++ mode.
- Copyright (C) 2010-2024 Free Software Foundation, Inc.
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <https://www.gnu.org/licenses/>. */
-
-/* Written by Bruno Haible <bruno@clisp.org>, 2010. */
-
-#define GNULIB_NAMESPACE gnulib
-#include <config.h>
-
-#include <sys/stat.h>
-
-#include "signature.h"
-
-
-#if GNULIB_TEST_FCHMODAT
-SIGNATURE_CHECK (GNULIB_NAMESPACE::fchmodat, int,
- (int, char const *, mode_t, int));
-#endif
-
-#if GNULIB_TEST_FSTAT
-SIGNATURE_CHECK (GNULIB_NAMESPACE::fstat, int, (int, struct stat *));
-#endif
-
-#if GNULIB_TEST_FSTATAT
-SIGNATURE_CHECK (GNULIB_NAMESPACE::fstatat, int,
- (int, char const *, struct stat *, int));
-#endif
-
-#if GNULIB_TEST_FUTIMENS
-SIGNATURE_CHECK (GNULIB_NAMESPACE::futimens, int,
- (int, struct timespec const[2]));
-#endif
-
-#if GNULIB_TEST_GETUMASK
-SIGNATURE_CHECK (GNULIB_NAMESPACE::getumask, mode_t, (void));
-#endif
-
-#if GNULIB_TEST_LCHMOD
-SIGNATURE_CHECK (GNULIB_NAMESPACE::lchmod, int, (const char *, mode_t));
-#endif
-
-#if GNULIB_TEST_LSTAT
-SIGNATURE_CHECK (GNULIB_NAMESPACE::lstat, int, (const char *, struct stat *));
-#endif
-
-SIGNATURE_CHECK (GNULIB_NAMESPACE::mkdir, int, (char const *, mode_t));
-
-#if GNULIB_TEST_MKDIRAT
-SIGNATURE_CHECK (GNULIB_NAMESPACE::mkdirat, int, (int, char const *, mode_t));
-#endif
-
-#if GNULIB_TEST_MKFIFO
-SIGNATURE_CHECK (GNULIB_NAMESPACE::mkfifo, int, (char const *, mode_t));
-#endif
-
-#if GNULIB_TEST_MKFIFOAT
-SIGNATURE_CHECK (GNULIB_NAMESPACE::mkfifoat, int, (int, char const *, mode_t));
-#endif
-
-#if GNULIB_TEST_MKNOD
-SIGNATURE_CHECK (GNULIB_NAMESPACE::mknod, int, (char const *, mode_t, dev_t));
-#endif
-
-#if GNULIB_TEST_MKNODAT
-SIGNATURE_CHECK (GNULIB_NAMESPACE::mknodat, int,
- (int, char const *, mode_t, dev_t));
-#endif
-
-#if GNULIB_TEST_STAT
-//SIGNATURE_CHECK (GNULIB_NAMESPACE::stat, int, (const char *, struct stat *));
-#endif
-
-#if GNULIB_TEST_UTIMENSAT
-SIGNATURE_CHECK (GNULIB_NAMESPACE::utimensat, int,
- (int, char const *, struct timespec const[2], int));
-#endif
-
-
-int
-main ()
-{
-}
--- /dev/null
+/* Test of <sys/stat.h> substitute in C++ mode.
+ Copyright (C) 2010-2024 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2010. */
+
+#define GNULIB_NAMESPACE gnulib
+#include <config.h>
+
+#include <sys/stat.h>
+
+#include "signature.h"
+
+
+#if GNULIB_TEST_FCHMODAT
+SIGNATURE_CHECK (GNULIB_NAMESPACE::fchmodat, int,
+ (int, char const *, mode_t, int));
+#endif
+
+#if GNULIB_TEST_FSTAT
+SIGNATURE_CHECK (GNULIB_NAMESPACE::fstat, int, (int, struct stat *));
+#endif
+
+#if GNULIB_TEST_FSTATAT
+SIGNATURE_CHECK (GNULIB_NAMESPACE::fstatat, int,
+ (int, char const *, struct stat *, int));
+#endif
+
+#if GNULIB_TEST_FUTIMENS
+SIGNATURE_CHECK (GNULIB_NAMESPACE::futimens, int,
+ (int, struct timespec const[2]));
+#endif
+
+#if GNULIB_TEST_GETUMASK
+SIGNATURE_CHECK (GNULIB_NAMESPACE::getumask, mode_t, (void));
+#endif
+
+#if GNULIB_TEST_LCHMOD
+SIGNATURE_CHECK (GNULIB_NAMESPACE::lchmod, int, (const char *, mode_t));
+#endif
+
+#if GNULIB_TEST_LSTAT
+SIGNATURE_CHECK (GNULIB_NAMESPACE::lstat, int, (const char *, struct stat *));
+#endif
+
+SIGNATURE_CHECK (GNULIB_NAMESPACE::mkdir, int, (char const *, mode_t));
+
+#if GNULIB_TEST_MKDIRAT
+SIGNATURE_CHECK (GNULIB_NAMESPACE::mkdirat, int, (int, char const *, mode_t));
+#endif
+
+#if GNULIB_TEST_MKFIFO
+SIGNATURE_CHECK (GNULIB_NAMESPACE::mkfifo, int, (char const *, mode_t));
+#endif
+
+#if GNULIB_TEST_MKFIFOAT
+SIGNATURE_CHECK (GNULIB_NAMESPACE::mkfifoat, int, (int, char const *, mode_t));
+#endif
+
+#if GNULIB_TEST_MKNOD
+SIGNATURE_CHECK (GNULIB_NAMESPACE::mknod, int, (char const *, mode_t, dev_t));
+#endif
+
+#if GNULIB_TEST_MKNODAT
+SIGNATURE_CHECK (GNULIB_NAMESPACE::mknodat, int,
+ (int, char const *, mode_t, dev_t));
+#endif
+
+#if GNULIB_TEST_STAT
+//SIGNATURE_CHECK (GNULIB_NAMESPACE::stat, int, (const char *, struct stat *));
+#endif
+
+#if GNULIB_TEST_UTIMENSAT
+SIGNATURE_CHECK (GNULIB_NAMESPACE::utimensat, int,
+ (int, char const *, struct timespec const[2], int));
+#endif
+
+
+int
+main ()
+{
+}
--- /dev/null
+/* Test of <sys/stat.h> substitute.
+ Copyright (C) 2007-2024 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
+
+#include <config.h>
+
+#include <sys/stat.h>
+
+/* Check the existence of some macros. */
+int a[] =
+ {
+ S_IFMT,
+#ifdef S_IFBLK /* missing on MSVC */
+ S_IFBLK,
+#endif
+ S_IFCHR, S_IFDIR, S_IFIFO, S_IFREG,
+#ifdef S_IFLNK /* missing on native Windows and DJGPP */
+ S_IFLNK,
+#endif
+#ifdef S_IFSOCK /* missing on native Windows and DJGPP */
+ S_IFSOCK,
+#endif
+ S_IRWXU, S_IRUSR, S_IWUSR, S_IXUSR,
+ S_IRWXG, S_IRGRP, S_IWGRP, S_IXGRP,
+ S_IRWXO, S_IROTH, S_IWOTH, S_IXOTH,
+ S_ISUID, S_ISGID, S_ISVTX,
+ S_ISBLK (S_IFREG),
+ S_ISCHR (S_IFREG),
+ S_ISDIR (S_IFREG),
+ S_ISFIFO (S_IFREG),
+ S_ISREG (S_IFREG),
+ S_ISLNK (S_IFREG),
+ S_ISSOCK (S_IFREG),
+ S_ISDOOR (S_IFREG),
+ S_ISMPB (S_IFREG),
+ S_ISMPX (S_IFREG),
+ S_ISNAM (S_IFREG),
+ S_ISNWK (S_IFREG),
+ S_ISPORT (S_IFREG),
+ S_ISCTG (S_IFREG),
+ S_ISOFD (S_IFREG),
+ S_ISOFL (S_IFREG),
+ S_ISWHT (S_IFREG)
+ };
+
+/* Sanity checks. */
+
+static_assert (S_IRWXU == (S_IRUSR | S_IWUSR | S_IXUSR));
+static_assert (S_IRWXG == (S_IRGRP | S_IWGRP | S_IXGRP));
+static_assert (S_IRWXO == (S_IROTH | S_IWOTH | S_IXOTH));
+
+#ifdef S_IFBLK
+static_assert (S_ISBLK (S_IFBLK));
+#endif
+static_assert (!S_ISBLK (S_IFCHR));
+static_assert (!S_ISBLK (S_IFDIR));
+static_assert (!S_ISBLK (S_IFIFO));
+static_assert (!S_ISBLK (S_IFREG));
+#ifdef S_IFLNK
+static_assert (!S_ISBLK (S_IFLNK));
+#endif
+#ifdef S_IFSOCK
+static_assert (!S_ISBLK (S_IFSOCK));
+#endif
+
+#ifdef S_IFBLK
+static_assert (!S_ISCHR (S_IFBLK));
+#endif
+static_assert (S_ISCHR (S_IFCHR));
+static_assert (!S_ISCHR (S_IFDIR));
+static_assert (!S_ISCHR (S_IFIFO));
+static_assert (!S_ISCHR (S_IFREG));
+#ifdef S_IFLNK
+static_assert (!S_ISCHR (S_IFLNK));
+#endif
+#ifdef S_IFSOCK
+static_assert (!S_ISCHR (S_IFSOCK));
+#endif
+
+#ifdef S_IFBLK
+static_assert (!S_ISDIR (S_IFBLK));
+#endif
+static_assert (!S_ISDIR (S_IFCHR));
+static_assert (S_ISDIR (S_IFDIR));
+static_assert (!S_ISDIR (S_IFIFO));
+static_assert (!S_ISDIR (S_IFREG));
+#ifdef S_IFLNK
+static_assert (!S_ISDIR (S_IFLNK));
+#endif
+#ifdef S_IFSOCK
+static_assert (!S_ISDIR (S_IFSOCK));
+#endif
+
+#ifdef S_IFBLK
+static_assert (!S_ISFIFO (S_IFBLK));
+#endif
+static_assert (!S_ISFIFO (S_IFCHR));
+static_assert (!S_ISFIFO (S_IFDIR));
+static_assert (S_ISFIFO (S_IFIFO));
+static_assert (!S_ISFIFO (S_IFREG));
+#ifdef S_IFLNK
+static_assert (!S_ISFIFO (S_IFLNK));
+#endif
+#ifdef S_IFSOCK
+static_assert (!S_ISFIFO (S_IFSOCK));
+#endif
+
+#ifdef S_IFBLK
+static_assert (!S_ISREG (S_IFBLK));
+#endif
+static_assert (!S_ISREG (S_IFCHR));
+static_assert (!S_ISREG (S_IFDIR));
+static_assert (!S_ISREG (S_IFIFO));
+static_assert (S_ISREG (S_IFREG));
+#ifdef S_IFLNK
+static_assert (!S_ISREG (S_IFLNK));
+#endif
+#ifdef S_IFSOCK
+static_assert (!S_ISREG (S_IFSOCK));
+#endif
+
+#ifdef S_IFBLK
+static_assert (!S_ISLNK (S_IFBLK));
+#endif
+static_assert (!S_ISLNK (S_IFCHR));
+static_assert (!S_ISLNK (S_IFDIR));
+static_assert (!S_ISLNK (S_IFIFO));
+static_assert (!S_ISLNK (S_IFREG));
+#ifdef S_IFLNK
+static_assert (S_ISLNK (S_IFLNK));
+#endif
+#ifdef S_IFSOCK
+static_assert (!S_ISLNK (S_IFSOCK));
+#endif
+
+#ifdef S_IFBLK
+static_assert (!S_ISSOCK (S_IFBLK));
+#endif
+static_assert (!S_ISSOCK (S_IFCHR));
+static_assert (!S_ISSOCK (S_IFDIR));
+static_assert (!S_ISSOCK (S_IFIFO));
+static_assert (!S_ISSOCK (S_IFREG));
+#ifdef S_IFLNK
+static_assert (!S_ISSOCK (S_IFLNK));
+#endif
+#ifdef S_IFSOCK
+static_assert (S_ISSOCK (S_IFSOCK));
+#endif
+
+#ifdef S_IFBLK
+static_assert (!S_ISDOOR (S_IFBLK));
+#endif
+static_assert (!S_ISDOOR (S_IFCHR));
+static_assert (!S_ISDOOR (S_IFDIR));
+static_assert (!S_ISDOOR (S_IFIFO));
+static_assert (!S_ISDOOR (S_IFREG));
+#ifdef S_IFLNK
+static_assert (!S_ISDOOR (S_IFLNK));
+#endif
+#ifdef S_IFSOCK
+static_assert (!S_ISDOOR (S_IFSOCK));
+#endif
+
+#ifdef S_IFBLK
+static_assert (!S_ISMPB (S_IFBLK));
+#endif
+static_assert (!S_ISMPB (S_IFCHR));
+static_assert (!S_ISMPB (S_IFDIR));
+static_assert (!S_ISMPB (S_IFIFO));
+static_assert (!S_ISMPB (S_IFREG));
+#ifdef S_IFLNK
+static_assert (!S_ISMPB (S_IFLNK));
+#endif
+#ifdef S_IFSOCK
+static_assert (!S_ISMPB (S_IFSOCK));
+#endif
+
+#ifdef S_IFBLK
+static_assert (!S_ISMPX (S_IFBLK));
+#endif
+static_assert (!S_ISMPX (S_IFCHR));
+static_assert (!S_ISMPX (S_IFDIR));
+static_assert (!S_ISMPX (S_IFIFO));
+static_assert (!S_ISMPX (S_IFREG));
+#ifdef S_IFLNK
+static_assert (!S_ISMPX (S_IFLNK));
+#endif
+#ifdef S_IFSOCK
+static_assert (!S_ISMPX (S_IFSOCK));
+#endif
+
+#ifdef S_IFBLK
+static_assert (!S_ISNAM (S_IFBLK));
+#endif
+static_assert (!S_ISNAM (S_IFCHR));
+static_assert (!S_ISNAM (S_IFDIR));
+static_assert (!S_ISNAM (S_IFIFO));
+static_assert (!S_ISNAM (S_IFREG));
+#ifdef S_IFLNK
+static_assert (!S_ISNAM (S_IFLNK));
+#endif
+#ifdef S_IFSOCK
+static_assert (!S_ISNAM (S_IFSOCK));
+#endif
+
+#ifdef S_IFBLK
+static_assert (!S_ISNWK (S_IFBLK));
+#endif
+static_assert (!S_ISNWK (S_IFCHR));
+static_assert (!S_ISNWK (S_IFDIR));
+static_assert (!S_ISNWK (S_IFIFO));
+static_assert (!S_ISNWK (S_IFREG));
+#ifdef S_IFLNK
+static_assert (!S_ISNWK (S_IFLNK));
+#endif
+#ifdef S_IFSOCK
+static_assert (!S_ISNWK (S_IFSOCK));
+#endif
+
+#ifdef S_IFBLK
+static_assert (!S_ISPORT (S_IFBLK));
+#endif
+static_assert (!S_ISPORT (S_IFCHR));
+static_assert (!S_ISPORT (S_IFDIR));
+static_assert (!S_ISPORT (S_IFIFO));
+static_assert (!S_ISPORT (S_IFREG));
+#ifdef S_IFLNK
+static_assert (!S_ISPORT (S_IFLNK));
+#endif
+#ifdef S_IFSOCK
+static_assert (!S_ISPORT (S_IFSOCK));
+#endif
+
+#ifdef S_IFBLK
+static_assert (!S_ISCTG (S_IFBLK));
+#endif
+static_assert (!S_ISCTG (S_IFCHR));
+static_assert (!S_ISCTG (S_IFDIR));
+static_assert (!S_ISCTG (S_IFIFO));
+static_assert (!S_ISCTG (S_IFREG));
+#ifdef S_IFLNK
+static_assert (!S_ISCTG (S_IFLNK));
+#endif
+#ifdef S_IFSOCK
+static_assert (!S_ISCTG (S_IFSOCK));
+#endif
+
+#ifdef S_IFBLK
+static_assert (!S_ISOFD (S_IFBLK));
+#endif
+static_assert (!S_ISOFD (S_IFCHR));
+static_assert (!S_ISOFD (S_IFDIR));
+static_assert (!S_ISOFD (S_IFIFO));
+static_assert (!S_ISOFD (S_IFREG));
+#ifdef S_IFLNK
+static_assert (!S_ISOFD (S_IFLNK));
+#endif
+#ifdef S_IFSOCK
+static_assert (!S_ISOFD (S_IFSOCK));
+#endif
+
+#ifdef S_IFBLK
+static_assert (!S_ISOFL (S_IFBLK));
+#endif
+static_assert (!S_ISOFL (S_IFCHR));
+static_assert (!S_ISOFL (S_IFDIR));
+static_assert (!S_ISOFL (S_IFIFO));
+static_assert (!S_ISOFL (S_IFREG));
+#ifdef S_IFLNK
+static_assert (!S_ISOFL (S_IFLNK));
+#endif
+#ifdef S_IFSOCK
+static_assert (!S_ISOFL (S_IFSOCK));
+#endif
+
+#ifdef S_IFBLK
+static_assert (!S_ISWHT (S_IFBLK));
+#endif
+static_assert (!S_ISWHT (S_IFCHR));
+static_assert (!S_ISWHT (S_IFDIR));
+static_assert (!S_ISWHT (S_IFIFO));
+static_assert (!S_ISWHT (S_IFREG));
+#ifdef S_IFLNK
+static_assert (!S_ISWHT (S_IFLNK));
+#endif
+#ifdef S_IFSOCK
+static_assert (!S_ISWHT (S_IFSOCK));
+#endif
+
+/* POSIX 2008 requires traditional encoding of permission constants. */
+static_assert (S_IRWXU == 00700);
+static_assert (S_IRUSR == 00400);
+static_assert (S_IWUSR == 00200);
+static_assert (S_IXUSR == 00100);
+static_assert (S_IRWXG == 00070);
+static_assert (S_IRGRP == 00040);
+static_assert (S_IWGRP == 00020);
+static_assert (S_IXGRP == 00010);
+static_assert (S_IRWXO == 00007);
+static_assert (S_IROTH == 00004);
+static_assert (S_IWOTH == 00002);
+static_assert (S_IXOTH == 00001);
+static_assert (S_ISUID == 04000);
+static_assert (S_ISGID == 02000);
+static_assert (S_ISVTX == 01000);
+
+#if ((0 <= UTIME_NOW && UTIME_NOW < 1000000000) \
+ || (0 <= UTIME_OMIT && UTIME_OMIT < 1000000000) \
+ || UTIME_NOW == UTIME_OMIT)
+invalid UTIME macros
+#endif
+
+/* Check the existence of some types. */
+nlink_t t1;
+off_t t2;
+mode_t t3;
+
+struct timespec st;
+
+int
+main (void)
+{
+ return 0;
+}
+++ /dev/null
-/* Test of <sys/stat.h> substitute.
- Copyright (C) 2007-2024 Free Software Foundation, Inc.
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <https://www.gnu.org/licenses/>. */
-
-/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
-
-#include <config.h>
-
-#include <sys/stat.h>
-
-/* Check the existence of some macros. */
-int a[] =
- {
- S_IFMT,
-#ifdef S_IFBLK /* missing on MSVC */
- S_IFBLK,
-#endif
- S_IFCHR, S_IFDIR, S_IFIFO, S_IFREG,
-#ifdef S_IFLNK /* missing on native Windows and DJGPP */
- S_IFLNK,
-#endif
-#ifdef S_IFSOCK /* missing on native Windows and DJGPP */
- S_IFSOCK,
-#endif
- S_IRWXU, S_IRUSR, S_IWUSR, S_IXUSR,
- S_IRWXG, S_IRGRP, S_IWGRP, S_IXGRP,
- S_IRWXO, S_IROTH, S_IWOTH, S_IXOTH,
- S_ISUID, S_ISGID, S_ISVTX,
- S_ISBLK (S_IFREG),
- S_ISCHR (S_IFREG),
- S_ISDIR (S_IFREG),
- S_ISFIFO (S_IFREG),
- S_ISREG (S_IFREG),
- S_ISLNK (S_IFREG),
- S_ISSOCK (S_IFREG),
- S_ISDOOR (S_IFREG),
- S_ISMPB (S_IFREG),
- S_ISMPX (S_IFREG),
- S_ISNAM (S_IFREG),
- S_ISNWK (S_IFREG),
- S_ISPORT (S_IFREG),
- S_ISCTG (S_IFREG),
- S_ISOFD (S_IFREG),
- S_ISOFL (S_IFREG),
- S_ISWHT (S_IFREG)
- };
-
-/* Sanity checks. */
-
-static_assert (S_IRWXU == (S_IRUSR | S_IWUSR | S_IXUSR));
-static_assert (S_IRWXG == (S_IRGRP | S_IWGRP | S_IXGRP));
-static_assert (S_IRWXO == (S_IROTH | S_IWOTH | S_IXOTH));
-
-#ifdef S_IFBLK
-static_assert (S_ISBLK (S_IFBLK));
-#endif
-static_assert (!S_ISBLK (S_IFCHR));
-static_assert (!S_ISBLK (S_IFDIR));
-static_assert (!S_ISBLK (S_IFIFO));
-static_assert (!S_ISBLK (S_IFREG));
-#ifdef S_IFLNK
-static_assert (!S_ISBLK (S_IFLNK));
-#endif
-#ifdef S_IFSOCK
-static_assert (!S_ISBLK (S_IFSOCK));
-#endif
-
-#ifdef S_IFBLK
-static_assert (!S_ISCHR (S_IFBLK));
-#endif
-static_assert (S_ISCHR (S_IFCHR));
-static_assert (!S_ISCHR (S_IFDIR));
-static_assert (!S_ISCHR (S_IFIFO));
-static_assert (!S_ISCHR (S_IFREG));
-#ifdef S_IFLNK
-static_assert (!S_ISCHR (S_IFLNK));
-#endif
-#ifdef S_IFSOCK
-static_assert (!S_ISCHR (S_IFSOCK));
-#endif
-
-#ifdef S_IFBLK
-static_assert (!S_ISDIR (S_IFBLK));
-#endif
-static_assert (!S_ISDIR (S_IFCHR));
-static_assert (S_ISDIR (S_IFDIR));
-static_assert (!S_ISDIR (S_IFIFO));
-static_assert (!S_ISDIR (S_IFREG));
-#ifdef S_IFLNK
-static_assert (!S_ISDIR (S_IFLNK));
-#endif
-#ifdef S_IFSOCK
-static_assert (!S_ISDIR (S_IFSOCK));
-#endif
-
-#ifdef S_IFBLK
-static_assert (!S_ISFIFO (S_IFBLK));
-#endif
-static_assert (!S_ISFIFO (S_IFCHR));
-static_assert (!S_ISFIFO (S_IFDIR));
-static_assert (S_ISFIFO (S_IFIFO));
-static_assert (!S_ISFIFO (S_IFREG));
-#ifdef S_IFLNK
-static_assert (!S_ISFIFO (S_IFLNK));
-#endif
-#ifdef S_IFSOCK
-static_assert (!S_ISFIFO (S_IFSOCK));
-#endif
-
-#ifdef S_IFBLK
-static_assert (!S_ISREG (S_IFBLK));
-#endif
-static_assert (!S_ISREG (S_IFCHR));
-static_assert (!S_ISREG (S_IFDIR));
-static_assert (!S_ISREG (S_IFIFO));
-static_assert (S_ISREG (S_IFREG));
-#ifdef S_IFLNK
-static_assert (!S_ISREG (S_IFLNK));
-#endif
-#ifdef S_IFSOCK
-static_assert (!S_ISREG (S_IFSOCK));
-#endif
-
-#ifdef S_IFBLK
-static_assert (!S_ISLNK (S_IFBLK));
-#endif
-static_assert (!S_ISLNK (S_IFCHR));
-static_assert (!S_ISLNK (S_IFDIR));
-static_assert (!S_ISLNK (S_IFIFO));
-static_assert (!S_ISLNK (S_IFREG));
-#ifdef S_IFLNK
-static_assert (S_ISLNK (S_IFLNK));
-#endif
-#ifdef S_IFSOCK
-static_assert (!S_ISLNK (S_IFSOCK));
-#endif
-
-#ifdef S_IFBLK
-static_assert (!S_ISSOCK (S_IFBLK));
-#endif
-static_assert (!S_ISSOCK (S_IFCHR));
-static_assert (!S_ISSOCK (S_IFDIR));
-static_assert (!S_ISSOCK (S_IFIFO));
-static_assert (!S_ISSOCK (S_IFREG));
-#ifdef S_IFLNK
-static_assert (!S_ISSOCK (S_IFLNK));
-#endif
-#ifdef S_IFSOCK
-static_assert (S_ISSOCK (S_IFSOCK));
-#endif
-
-#ifdef S_IFBLK
-static_assert (!S_ISDOOR (S_IFBLK));
-#endif
-static_assert (!S_ISDOOR (S_IFCHR));
-static_assert (!S_ISDOOR (S_IFDIR));
-static_assert (!S_ISDOOR (S_IFIFO));
-static_assert (!S_ISDOOR (S_IFREG));
-#ifdef S_IFLNK
-static_assert (!S_ISDOOR (S_IFLNK));
-#endif
-#ifdef S_IFSOCK
-static_assert (!S_ISDOOR (S_IFSOCK));
-#endif
-
-#ifdef S_IFBLK
-static_assert (!S_ISMPB (S_IFBLK));
-#endif
-static_assert (!S_ISMPB (S_IFCHR));
-static_assert (!S_ISMPB (S_IFDIR));
-static_assert (!S_ISMPB (S_IFIFO));
-static_assert (!S_ISMPB (S_IFREG));
-#ifdef S_IFLNK
-static_assert (!S_ISMPB (S_IFLNK));
-#endif
-#ifdef S_IFSOCK
-static_assert (!S_ISMPB (S_IFSOCK));
-#endif
-
-#ifdef S_IFBLK
-static_assert (!S_ISMPX (S_IFBLK));
-#endif
-static_assert (!S_ISMPX (S_IFCHR));
-static_assert (!S_ISMPX (S_IFDIR));
-static_assert (!S_ISMPX (S_IFIFO));
-static_assert (!S_ISMPX (S_IFREG));
-#ifdef S_IFLNK
-static_assert (!S_ISMPX (S_IFLNK));
-#endif
-#ifdef S_IFSOCK
-static_assert (!S_ISMPX (S_IFSOCK));
-#endif
-
-#ifdef S_IFBLK
-static_assert (!S_ISNAM (S_IFBLK));
-#endif
-static_assert (!S_ISNAM (S_IFCHR));
-static_assert (!S_ISNAM (S_IFDIR));
-static_assert (!S_ISNAM (S_IFIFO));
-static_assert (!S_ISNAM (S_IFREG));
-#ifdef S_IFLNK
-static_assert (!S_ISNAM (S_IFLNK));
-#endif
-#ifdef S_IFSOCK
-static_assert (!S_ISNAM (S_IFSOCK));
-#endif
-
-#ifdef S_IFBLK
-static_assert (!S_ISNWK (S_IFBLK));
-#endif
-static_assert (!S_ISNWK (S_IFCHR));
-static_assert (!S_ISNWK (S_IFDIR));
-static_assert (!S_ISNWK (S_IFIFO));
-static_assert (!S_ISNWK (S_IFREG));
-#ifdef S_IFLNK
-static_assert (!S_ISNWK (S_IFLNK));
-#endif
-#ifdef S_IFSOCK
-static_assert (!S_ISNWK (S_IFSOCK));
-#endif
-
-#ifdef S_IFBLK
-static_assert (!S_ISPORT (S_IFBLK));
-#endif
-static_assert (!S_ISPORT (S_IFCHR));
-static_assert (!S_ISPORT (S_IFDIR));
-static_assert (!S_ISPORT (S_IFIFO));
-static_assert (!S_ISPORT (S_IFREG));
-#ifdef S_IFLNK
-static_assert (!S_ISPORT (S_IFLNK));
-#endif
-#ifdef S_IFSOCK
-static_assert (!S_ISPORT (S_IFSOCK));
-#endif
-
-#ifdef S_IFBLK
-static_assert (!S_ISCTG (S_IFBLK));
-#endif
-static_assert (!S_ISCTG (S_IFCHR));
-static_assert (!S_ISCTG (S_IFDIR));
-static_assert (!S_ISCTG (S_IFIFO));
-static_assert (!S_ISCTG (S_IFREG));
-#ifdef S_IFLNK
-static_assert (!S_ISCTG (S_IFLNK));
-#endif
-#ifdef S_IFSOCK
-static_assert (!S_ISCTG (S_IFSOCK));
-#endif
-
-#ifdef S_IFBLK
-static_assert (!S_ISOFD (S_IFBLK));
-#endif
-static_assert (!S_ISOFD (S_IFCHR));
-static_assert (!S_ISOFD (S_IFDIR));
-static_assert (!S_ISOFD (S_IFIFO));
-static_assert (!S_ISOFD (S_IFREG));
-#ifdef S_IFLNK
-static_assert (!S_ISOFD (S_IFLNK));
-#endif
-#ifdef S_IFSOCK
-static_assert (!S_ISOFD (S_IFSOCK));
-#endif
-
-#ifdef S_IFBLK
-static_assert (!S_ISOFL (S_IFBLK));
-#endif
-static_assert (!S_ISOFL (S_IFCHR));
-static_assert (!S_ISOFL (S_IFDIR));
-static_assert (!S_ISOFL (S_IFIFO));
-static_assert (!S_ISOFL (S_IFREG));
-#ifdef S_IFLNK
-static_assert (!S_ISOFL (S_IFLNK));
-#endif
-#ifdef S_IFSOCK
-static_assert (!S_ISOFL (S_IFSOCK));
-#endif
-
-#ifdef S_IFBLK
-static_assert (!S_ISWHT (S_IFBLK));
-#endif
-static_assert (!S_ISWHT (S_IFCHR));
-static_assert (!S_ISWHT (S_IFDIR));
-static_assert (!S_ISWHT (S_IFIFO));
-static_assert (!S_ISWHT (S_IFREG));
-#ifdef S_IFLNK
-static_assert (!S_ISWHT (S_IFLNK));
-#endif
-#ifdef S_IFSOCK
-static_assert (!S_ISWHT (S_IFSOCK));
-#endif
-
-/* POSIX 2008 requires traditional encoding of permission constants. */
-static_assert (S_IRWXU == 00700);
-static_assert (S_IRUSR == 00400);
-static_assert (S_IWUSR == 00200);
-static_assert (S_IXUSR == 00100);
-static_assert (S_IRWXG == 00070);
-static_assert (S_IRGRP == 00040);
-static_assert (S_IWGRP == 00020);
-static_assert (S_IXGRP == 00010);
-static_assert (S_IRWXO == 00007);
-static_assert (S_IROTH == 00004);
-static_assert (S_IWOTH == 00002);
-static_assert (S_IXOTH == 00001);
-static_assert (S_ISUID == 04000);
-static_assert (S_ISGID == 02000);
-static_assert (S_ISVTX == 01000);
-
-#if ((0 <= UTIME_NOW && UTIME_NOW < 1000000000) \
- || (0 <= UTIME_OMIT && UTIME_OMIT < 1000000000) \
- || UTIME_NOW == UTIME_OMIT)
-invalid UTIME macros
-#endif
-
-/* Check the existence of some types. */
-nlink_t t1;
-off_t t2;
-mode_t t3;
-
-struct timespec st;
-
-int
-main (void)
-{
- return 0;
-}