From 984cbda2aef42ad9256ebbd3b335d7ca9e46773f Mon Sep 17 00:00:00 2001 From: Bruno Haible <bruno@clisp.org> Date: Fri, 27 Dec 2024 23:40:10 +0100 Subject: [PATCH] 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. --- ChangeLog | 13 +++ doc/posix-functions/mkdir.texi | 6 +- doc/posix-headers/sys_stat.texi | 8 +- modules/acl-permissions | 2 +- modules/at-internal | 2 +- modules/c-file-type | 2 +- modules/canonicalize | 2 +- modules/canonicalize-lgpl | 2 +- modules/chmod | 2 +- modules/chown | 2 +- modules/crypto/af_alg | 2 +- modules/euidaccess | 2 +- modules/fchdir | 2 +- modules/fchmodat | 2 +- modules/file-type | 2 +- modules/filemode | 2 +- modules/findprog | 2 +- modules/findprog-in | 2 +- modules/findprog-lgpl | 2 +- modules/fstat | 2 +- modules/fstatat | 2 +- modules/futimens | 2 +- modules/getcwd-tests | 2 +- modules/getumask | 2 +- modules/glob-h | 2 +- modules/isapipe | 2 +- modules/largefile-tests | 2 +- modules/lchmod | 2 +- modules/lchown | 2 +- modules/link | 2 +- modules/link-tests | 2 +- modules/lstat | 2 +- modules/mkancesdirs | 2 +- modules/mkdir | 2 +- modules/mkdir-p | 2 +- modules/mkdirat | 2 +- modules/mkfifo | 2 +- modules/mkfifoat | 2 +- modules/mknod | 2 +- modules/modechange | 2 +- modules/openat | 2 +- modules/openat-h | 2 +- modules/posixcheck | 2 +- modules/read-file | 2 +- modules/relocatable-prog-wrapper | 2 +- modules/remove-tests | 2 +- modules/rename-tests | 2 +- modules/rmdir | 2 +- modules/stat | 2 +- modules/stat-size | 2 +- modules/supersede | 2 +- modules/sys_stat | 88 ++--------------- modules/sys_stat-c++-tests | 19 ---- modules/sys_stat-h | 99 +++++++++++++++++++ modules/sys_stat-h-c++-tests | 19 ++++ modules/sys_stat-h-tests | 12 +++ modules/sys_stat-tests | 12 --- modules/tempname | 2 +- modules/tmpdir | 2 +- modules/truncate | 2 +- modules/unlinkat | 2 +- modules/utimens | 2 +- modules/utimensat | 2 +- modules/windows-stat-override | 2 +- ...sys_stat-c++.cc => test-sys_stat-h-c++.cc} | 0 tests/{test-sys_stat.c => test-sys_stat-h.c} | 0 66 files changed, 212 insertions(+), 174 deletions(-) delete mode 100644 modules/sys_stat-c++-tests create mode 100644 modules/sys_stat-h create mode 100644 modules/sys_stat-h-c++-tests create mode 100644 modules/sys_stat-h-tests delete mode 100644 modules/sys_stat-tests rename tests/{test-sys_stat-c++.cc => test-sys_stat-h-c++.cc} (100%) rename tests/{test-sys_stat.c => test-sys_stat-h.c} (100%) diff --git a/ChangeLog b/ChangeLog index c3e2732271..b4a8cf5df0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +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. diff --git a/doc/posix-functions/mkdir.texi b/doc/posix-functions/mkdir.texi index 74d4cee69b..b239acf4ca 100644 --- a/doc/posix-functions/mkdir.texi +++ b/doc/posix-functions/mkdir.texi @@ -4,11 +4,11 @@ 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 diff --git a/doc/posix-headers/sys_stat.texi b/doc/posix-headers/sys_stat.texi index 48ff6e77c2..bc889e986f 100644 --- a/doc/posix-headers/sys_stat.texi +++ b/doc/posix-headers/sys_stat.texi @@ -3,10 +3,10 @@ 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: @@ -35,7 +35,7 @@ Use the gnulib module @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. diff --git a/modules/acl-permissions b/modules/acl-permissions index 08dcea466d..2221292c34 100644 --- a/modules/acl-permissions +++ b/modules/acl-permissions @@ -17,7 +17,7 @@ fstat minmax stat stdbool-h -sys_stat +sys_stat-h configure.ac: gl_FUNC_ACL diff --git a/modules/at-internal b/modules/at-internal index 60627dbdeb..4b70b1f61a 100644 --- a/modules/at-internal +++ b/modules/at-internal @@ -10,7 +10,7 @@ errno-h fcntl-h intprops open [case $host_os in mingw* | windows*) false;; *) :;; esac] -sys_stat +sys_stat-h unistd configure.ac: diff --git a/modules/c-file-type b/modules/c-file-type index 2abc601ed8..bfc57b9c8d 100644 --- a/modules/c-file-type +++ b/modules/c-file-type @@ -6,7 +6,7 @@ lib/file-type.h lib/c-file-type.c Depends-on: -sys_stat +sys_stat-h configure.ac: diff --git a/modules/canonicalize b/modules/canonicalize index 39dcf64f69..6abcde32cb 100644 --- a/modules/canonicalize +++ b/modules/canonicalize @@ -27,7 +27,7 @@ readlink glibc-internal/scratch_buffer stat stdbool-h -sys_stat +sys_stat-h unistd xalloc-die diff --git a/modules/canonicalize-lgpl b/modules/canonicalize-lgpl index b05312a4a8..04d68e5563 100644 --- a/modules/canonicalize-lgpl +++ b/modules/canonicalize-lgpl @@ -27,7 +27,7 @@ readlink [test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $RE 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: diff --git a/modules/chmod b/modules/chmod index 0efe7b0019..bd81bba2e3 100644 --- a/modules/chmod +++ b/modules/chmod @@ -6,7 +6,7 @@ lib/chmod.c m4/chmod.m4 Depends-on: -sys_stat +sys_stat-h lstat [test $REPLACE_CHMOD = 1] configure.ac: diff --git a/modules/chown b/modules/chown index 348ae35a0e..2ab3c3fd97 100644 --- a/modules/chown +++ b/modules/chown @@ -12,7 +12,7 @@ fstat [test $HAVE_CHOWN = 0 || test $REPLACE_CHOWN = 1] 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 diff --git a/modules/crypto/af_alg b/modules/crypto/af_alg index ffb452056c..86384c4775 100644 --- a/modules/crypto/af_alg +++ b/modules/crypto/af_alg @@ -14,7 +14,7 @@ fseeko [test $USE_AF_ALG = 1] 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 diff --git a/modules/euidaccess b/modules/euidaccess index 627f2de96d..5fa0e3dc4a 100644 --- a/modules/euidaccess +++ b/modules/euidaccess @@ -13,7 +13,7 @@ fcntl-h 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 diff --git a/modules/fchdir b/modules/fchdir index 708922b044..e9430bcc72 100644 --- a/modules/fchdir +++ b/modules/fchdir @@ -26,7 +26,7 @@ realloc-posix [test $HAVE_FCHDIR = 0 || test $REPLACE_FCHDIR = 1] 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 diff --git a/modules/fchmodat b/modules/fchmodat index d7698cd391..c99baf63c3 100644 --- a/modules/fchmodat +++ b/modules/fchmodat @@ -7,7 +7,7 @@ lib/at-func.c 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] diff --git a/modules/file-type b/modules/file-type index 5f472e3c1a..42ed51a606 100644 --- a/modules/file-type +++ b/modules/file-type @@ -9,7 +9,7 @@ Depends-on: c-file-type gettext-h gnulib-i18n -sys_stat +sys_stat-h configure.ac: diff --git a/modules/filemode b/modules/filemode index 95d3e0f714..4ddd2c174c 100644 --- a/modules/filemode +++ b/modules/filemode @@ -8,7 +8,7 @@ lib/filemode.c m4/filemode.m4 Depends-on: -sys_stat +sys_stat-h configure.ac: gl_FILEMODE diff --git a/modules/findprog b/modules/findprog index 5839935d3a..dd35034b75 100644 --- a/modules/findprog +++ b/modules/findprog @@ -9,7 +9,7 @@ m4/eaccess.m4 Depends-on: stdbool-h -sys_stat +sys_stat-h xalloc xconcat-filename access diff --git a/modules/findprog-in b/modules/findprog-in index 87efc31eb5..9710899134 100644 --- a/modules/findprog-in +++ b/modules/findprog-in @@ -9,7 +9,7 @@ m4/eaccess.m4 Depends-on: stdbool-h -sys_stat +sys_stat-h filename concat-filename access diff --git a/modules/findprog-lgpl b/modules/findprog-lgpl index d96bb0e13e..98301787ba 100644 --- a/modules/findprog-lgpl +++ b/modules/findprog-lgpl @@ -10,7 +10,7 @@ m4/eaccess.m4 Depends-on: stdbool-h -sys_stat +sys_stat-h strdup concat-filename access diff --git a/modules/fstat b/modules/fstat index 0c168a7bcd..f7468dbc1b 100644 --- a/modules/fstat +++ b/modules/fstat @@ -8,7 +8,7 @@ lib/stat-w32.c m4/fstat.m4 Depends-on: -sys_stat +sys_stat-h largefile pathmax [test $REPLACE_FSTAT = 1] stat [test $REPLACE_FSTAT = 1] diff --git a/modules/fstatat b/modules/fstatat index aa129072e3..93abb34043 100644 --- a/modules/fstatat +++ b/modules/fstatat @@ -8,7 +8,7 @@ m4/fstatat.m4 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] diff --git a/modules/futimens b/modules/futimens index e63ff78b78..34dfe4ab13 100644 --- a/modules/futimens +++ b/modules/futimens @@ -6,7 +6,7 @@ lib/futimens.c m4/futimens.m4 Depends-on: -sys_stat +sys_stat-h extensions utimens [test $HAVE_FUTIMENS = 0 || test $REPLACE_FUTIMENS = 1] diff --git a/modules/getcwd-tests b/modules/getcwd-tests index 60404049a0..fa63aab42a 100644 --- a/modules/getcwd-tests +++ b/modules/getcwd-tests @@ -10,7 +10,7 @@ fcntl-h getcwd-lgpl pathmax stdbool-h -sys_stat +sys_stat-h test-framework-sh configure.ac: diff --git a/modules/getumask b/modules/getumask index 5e6cc2f211..8484c4b15d 100644 --- a/modules/getumask +++ b/modules/getumask @@ -6,7 +6,7 @@ lib/getumask.c m4/getumask.m4 Depends-on: -sys_stat +sys_stat-h extensions c99 [test $HAVE_GETUMASK = 0] unistd [test $HAVE_GETUMASK = 0] diff --git a/modules/glob-h b/modules/glob-h index 60d7cde096..4290d9ffcc 100644 --- a/modules/glob-h +++ b/modules/glob-h @@ -15,7 +15,7 @@ snippet/c++defs snippet/warn-on-use libc-config lstat -sys_stat +sys_stat-h configure.ac: gl_GLOB_H diff --git a/modules/isapipe b/modules/isapipe index 0f144b7a44..5e401bfcf0 100644 --- a/modules/isapipe +++ b/modules/isapipe @@ -8,7 +8,7 @@ m4/isapipe.m4 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] diff --git a/modules/largefile-tests b/modules/largefile-tests index bc55b3db63..b94f02c4c5 100644 --- a/modules/largefile-tests +++ b/modules/largefile-tests @@ -4,7 +4,7 @@ tests/test-largefile.c Depends-on: intprops sys_types -sys_stat +sys_stat-h configure.ac: diff --git a/modules/lchmod b/modules/lchmod index b55b86675f..c6a529b8dc 100644 --- a/modules/lchmod +++ b/modules/lchmod @@ -13,7 +13,7 @@ fcntl-h [test $HAVE_LCHMOD = 0] 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: diff --git a/modules/lchown b/modules/lchown index 710d7bc6d3..e0d20324d0 100644 --- a/modules/lchown +++ b/modules/lchown @@ -11,7 +11,7 @@ readlink [test $HAVE_LCHOWN = 0] 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: diff --git a/modules/link b/modules/link index 32c438ce63..a0aaf1bf4e 100644 --- a/modules/link +++ b/modules/link @@ -10,7 +10,7 @@ unistd 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 diff --git a/modules/link-tests b/modules/link-tests index 051030577d..45db35d0f2 100644 --- a/modules/link-tests +++ b/modules/link-tests @@ -8,7 +8,7 @@ Depends-on: ignore-value errno-h stdbool-h -sys_stat +sys_stat-h configure.ac: diff --git a/modules/lstat b/modules/lstat index e89d158fc1..1ccaf52514 100644 --- a/modules/lstat +++ b/modules/lstat @@ -6,7 +6,7 @@ lib/lstat.c m4/lstat.m4 Depends-on: -sys_stat +sys_stat-h largefile stat [test $REPLACE_LSTAT = 1] stat-time [test $REPLACE_LSTAT = 1] diff --git a/modules/mkancesdirs b/modules/mkancesdirs index c4cb3db345..e11fea6e4e 100644 --- a/modules/mkancesdirs +++ b/modules/mkancesdirs @@ -11,7 +11,7 @@ fcntl-h filename savewd stat-macros -sys_stat +sys_stat-h configure.ac: gl_MKANCESDIRS diff --git a/modules/mkdir b/modules/mkdir index 8570a4a7e4..c57d40ea55 100644 --- a/modules/mkdir +++ b/modules/mkdir @@ -6,7 +6,7 @@ lib/mkdir.c m4/mkdir.m4 Depends-on: -sys_stat +sys_stat-h dirname-lgpl [test $REPLACE_MKDIR = 1] stat [test $REPLACE_MKDIR = 1] diff --git a/modules/mkdir-p b/modules/mkdir-p index ad37a64c87..62f8e6d328 100644 --- a/modules/mkdir-p +++ b/modules/mkdir-p @@ -23,7 +23,7 @@ savewd stat stat-macros stdbool-h -sys_stat +sys_stat-h configure.ac: gl_MKDIR_PARENTS diff --git a/modules/mkdirat b/modules/mkdirat index c553e18d7a..71be95ce36 100644 --- a/modules/mkdirat +++ b/modules/mkdirat @@ -7,7 +7,7 @@ lib/at-func.c m4/mkdirat.m4 Depends-on: -sys_stat +sys_stat-h extensions at-internal [test $HAVE_MKDIRAT = 0] errno-h [test $HAVE_MKDIRAT = 0] diff --git a/modules/mkfifo b/modules/mkfifo index 4015f2cfea..6ca5fe8c0f 100644 --- a/modules/mkfifo +++ b/modules/mkfifo @@ -6,7 +6,7 @@ lib/mkfifo.c m4/mkfifo.m4 Depends-on: -sys_stat +sys_stat-h stat [test $HAVE_MKFIFO = 0 || test $REPLACE_MKFIFO = 1] configure.ac: diff --git a/modules/mkfifoat b/modules/mkfifoat index 8c31cc2aaf..17de90fe81 100644 --- a/modules/mkfifoat +++ b/modules/mkfifoat @@ -9,7 +9,7 @@ lib/at-func.c 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] diff --git a/modules/mknod b/modules/mknod index 683df1c298..ae9d99d1f2 100644 --- a/modules/mknod +++ b/modules/mknod @@ -6,7 +6,7 @@ lib/mknod.c 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] diff --git a/modules/modechange b/modules/modechange index 3ee6d45b70..0f980f04d1 100644 --- a/modules/modechange +++ b/modules/modechange @@ -11,7 +11,7 @@ Depends-on: stat stat-macros stdbool-h -sys_stat +sys_stat-h xalloc configure.ac: diff --git a/modules/openat b/modules/openat index 02a2bb99a9..396056f485 100644 --- a/modules/openat +++ b/modules/openat @@ -14,7 +14,7 @@ extensions 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] diff --git a/modules/openat-h b/modules/openat-h index 8741064db8..e2b58ddbb3 100644 --- a/modules/openat-h +++ b/modules/openat-h @@ -8,7 +8,7 @@ Depends-on: extern-inline fcntl-h stdbool-h -sys_stat +sys_stat-h unistd configure.ac: diff --git a/modules/posixcheck b/modules/posixcheck index a07960fa3a..d302ee3252 100644 --- a/modules/posixcheck +++ b/modules/posixcheck @@ -38,7 +38,7 @@ sys_random-h sys_resource-h sys_select-h sys_socket-h -sys_stat +sys_stat-h sys_time sys_times sys_utsname diff --git a/modules/read-file b/modules/read-file index 7f65ae1c61..125409a033 100644 --- a/modules/read-file +++ b/modules/read-file @@ -15,7 +15,7 @@ malloc-posix memset_explicit realloc-posix stdint-h -sys_stat +sys_stat-h configure.ac: gl_PREREQ_READ_FILE diff --git a/modules/relocatable-prog-wrapper b/modules/relocatable-prog-wrapper index cfd1719a9f..66f385df31 100644 --- a/modules/relocatable-prog-wrapper +++ b/modules/relocatable-prog-wrapper @@ -75,7 +75,7 @@ stdckdint-h stdint-h stdlib-h string-h -sys_stat +sys_stat-h unistd xalloc-oversized diff --git a/modules/remove-tests b/modules/remove-tests index 498c7d6e49..5f7e3a8e19 100644 --- a/modules/remove-tests +++ b/modules/remove-tests @@ -6,7 +6,7 @@ tests/macros.h Depends-on: ignore-value symlink -sys_stat +sys_stat-h configure.ac: diff --git a/modules/rename-tests b/modules/rename-tests index 3e6dc3e1c4..6ee2d76ac2 100644 --- a/modules/rename-tests +++ b/modules/rename-tests @@ -10,7 +10,7 @@ errno-h link stdbool-h symlink -sys_stat +sys_stat-h opendir readdir closedir diff --git a/modules/rmdir b/modules/rmdir index 426587560e..66557f34b9 100644 --- a/modules/rmdir +++ b/modules/rmdir @@ -8,7 +8,7 @@ m4/rmdir.m4 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 diff --git a/modules/stat b/modules/stat index 7b0f8d991f..9db4f2e860 100644 --- a/modules/stat +++ b/modules/stat @@ -8,7 +8,7 @@ lib/stat-w32.c m4/stat.m4 Depends-on: -sys_stat +sys_stat-h largefile assert-h [test $REPLACE_STAT = 1] filename [test $REPLACE_STAT = 1] diff --git a/modules/stat-size b/modules/stat-size index 77279707c8..56a085d65b 100644 --- a/modules/stat-size +++ b/modules/stat-size @@ -7,7 +7,7 @@ m4/stat-size.m4 Depends-on: fileblocks -sys_stat +sys_stat-h configure.ac: gl_STAT_SIZE diff --git a/modules/supersede b/modules/supersede index 7d1520992c..da5c746552 100644 --- a/modules/supersede +++ b/modules/supersede @@ -10,7 +10,7 @@ Depends-on: c99 fcntl-h stdbool-h -sys_stat +sys_stat-h clean-temp tempname canonicalize diff --git a/modules/sys_stat b/modules/sys_stat index 233224e835..badc250b5a 100644 --- a/modules/sys_stat +++ b/modules/sys_stat @@ -1,93 +1,20 @@ 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> @@ -96,4 +23,3 @@ License: LGPLv2+ Maintainer: -all diff --git a/modules/sys_stat-c++-tests b/modules/sys_stat-c++-tests deleted file mode 100644 index f5b3f28c90..0000000000 --- a/modules/sys_stat-c++-tests +++ /dev/null @@ -1,19 +0,0 @@ -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 diff --git a/modules/sys_stat-h b/modules/sys_stat-h new file mode 100644 index 0000000000..233224e835 --- /dev/null +++ b/modules/sys_stat-h @@ -0,0 +1,99 @@ +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 diff --git a/modules/sys_stat-h-c++-tests b/modules/sys_stat-h-c++-tests new file mode 100644 index 0000000000..58b3363107 --- /dev/null +++ b/modules/sys_stat-h-c++-tests @@ -0,0 +1,19 @@ +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 diff --git a/modules/sys_stat-h-tests b/modules/sys_stat-h-tests new file mode 100644 index 0000000000..a13ea11e45 --- /dev/null +++ b/modules/sys_stat-h-tests @@ -0,0 +1,12 @@ +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 diff --git a/modules/sys_stat-tests b/modules/sys_stat-tests deleted file mode 100644 index 7d4091bd75..0000000000 --- a/modules/sys_stat-tests +++ /dev/null @@ -1,12 +0,0 @@ -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 diff --git a/modules/tempname b/modules/tempname index 4031c523a7..0045d7c49b 100644 --- a/modules/tempname +++ b/modules/tempname @@ -18,7 +18,7 @@ lstat mkdir stdbool-h stdint-h -sys_stat +sys_stat-h time-h configure.ac: diff --git a/modules/tmpdir b/modules/tmpdir index be47108cd8..00ab1a3228 100644 --- a/modules/tmpdir +++ b/modules/tmpdir @@ -10,7 +10,7 @@ Depends-on: secure_getenv stat stdbool-h -sys_stat +sys_stat-h pathmax configure.ac: diff --git a/modules/truncate b/modules/truncate index c6a108720b..7aa986cf35 100644 --- a/modules/truncate +++ b/modules/truncate @@ -9,7 +9,7 @@ Depends-on: 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] diff --git a/modules/unlinkat b/modules/unlinkat index 905d748902..8bae1c2263 100644 --- a/modules/unlinkat +++ b/modules/unlinkat @@ -12,7 +12,7 @@ unistd 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] diff --git a/modules/utimens b/modules/utimens index 77e90ff09e..580639dc26 100644 --- a/modules/utimens +++ b/modules/utimens @@ -18,7 +18,7 @@ msvc-nothrow stat stat-time stdbool-h -sys_stat +sys_stat-h sys_time time-h utime diff --git a/modules/utimensat b/modules/utimensat index d07fcc86fb..32d5f105c0 100644 --- a/modules/utimensat +++ b/modules/utimensat @@ -7,7 +7,7 @@ lib/at-func.c 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] diff --git a/modules/windows-stat-override b/modules/windows-stat-override index 5507bb8d93..3a7042754e 100644 --- a/modules/windows-stat-override +++ b/modules/windows-stat-override @@ -9,7 +9,7 @@ have side effects on the compilation of the main modules in lib/. Files: Depends-on: -sys_stat +sys_stat-h configure.ac: gl_SYS_STAT_H_REQUIRE_DEFAULTS diff --git a/tests/test-sys_stat-c++.cc b/tests/test-sys_stat-h-c++.cc similarity index 100% rename from tests/test-sys_stat-c++.cc rename to tests/test-sys_stat-h-c++.cc diff --git a/tests/test-sys_stat.c b/tests/test-sys_stat-h.c similarity index 100% rename from tests/test-sys_stat.c rename to tests/test-sys_stat-h.c -- 2.39.5