From 074fcd0ab17a87cf8dafdf39aa5493a9d67c2eaa Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Fri, 27 Dec 2024 23:41:36 +0100 Subject: [PATCH] Rename module sys_time to sys_time-h. * modules/sys_time-h: Renamed from modules/sys_time. * modules/sys_time-h-tests: Renamed from modules/sys_time-tests. * modules/sys_time-h-c++-tests: Renamed from modules/sys_time-c++-tests. * tests/test-sys_time-h.c: Renamed from tests/test-sys_time.c. * tests/test-sys_time-h-c++.cc: Renamed from tests/test-sys_time-c++.cc. * doc/posix-headers/sys_time.texi: Update. * modules/* (Depends-on): Update. * modules/sys_time: New file. --- ChangeLog | 12 ++++ doc/posix-headers/sys_time.texi | 4 +- modules/gethrxtime | 2 +- modules/getsockopt | 2 +- modules/gettime | 2 +- modules/gettimeofday | 2 +- modules/poll | 2 +- modules/posixcheck | 2 +- modules/select | 2 +- modules/setsockopt | 2 +- modules/settime | 2 +- modules/strptime | 2 +- modules/sys_resource-h | 2 +- modules/sys_select-h | 2 +- modules/sys_time | 45 +++------------ modules/sys_time-c++-tests | 19 ------- modules/sys_time-h | 56 +++++++++++++++++++ modules/sys_time-h-c++-tests | 19 +++++++ modules/sys_time-h-tests | 11 ++++ modules/sys_time-tests | 11 ---- modules/timevar | 2 +- modules/utimens | 2 +- ...sys_time-c++.cc => test-sys_time-h-c++.cc} | 0 tests/{test-sys_time.c => test-sys_time-h.c} | 0 24 files changed, 121 insertions(+), 84 deletions(-) delete mode 100644 modules/sys_time-c++-tests create mode 100644 modules/sys_time-h create mode 100644 modules/sys_time-h-c++-tests create mode 100644 modules/sys_time-h-tests delete mode 100644 modules/sys_time-tests rename tests/{test-sys_time-c++.cc => test-sys_time-h-c++.cc} (100%) rename tests/{test-sys_time.c => test-sys_time-h.c} (100%) diff --git a/ChangeLog b/ChangeLog index b4a8cf5df0..4388a592b4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2024-12-27 Bruno Haible + + Rename module sys_time to sys_time-h. + * modules/sys_time-h: Renamed from modules/sys_time. + * modules/sys_time-h-tests: Renamed from modules/sys_time-tests. + * modules/sys_time-h-c++-tests: Renamed from modules/sys_time-c++-tests. + * tests/test-sys_time-h.c: Renamed from tests/test-sys_time.c. + * tests/test-sys_time-h-c++.cc: Renamed from tests/test-sys_time-c++.cc. + * doc/posix-headers/sys_time.texi: Update. + * modules/* (Depends-on): Update. + * modules/sys_time: New file. + 2024-12-27 Bruno Haible Rename module sys_stat to sys_stat-h. diff --git a/doc/posix-headers/sys_time.texi b/doc/posix-headers/sys_time.texi index 51004a471c..7f1f5d1535 100644 --- a/doc/posix-headers/sys_time.texi +++ b/doc/posix-headers/sys_time.texi @@ -3,8 +3,8 @@ POSIX specification:@* @url{https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/sys_time.h.html} -Gnulib module: sys_time -@mindex sys_time +Gnulib module: sys_time-h +@mindex sys_time-h Portability problems fixed by Gnulib: @itemize diff --git a/modules/gethrxtime b/modules/gethrxtime index 6bb274cf3e..bde10d16b7 100644 --- a/modules/gethrxtime +++ b/modules/gethrxtime @@ -13,7 +13,7 @@ clock-time extensions extern-inline gettime -sys_time +sys_time-h configure.ac: gl_GETHRXTIME diff --git a/modules/getsockopt b/modules/getsockopt index 9bbc6685fb..9b9e84dca0 100644 --- a/modules/getsockopt +++ b/modules/getsockopt @@ -9,7 +9,7 @@ Depends-on: extensions sys_socket-h socketlib -sys_time [test "$ac_cv_header_winsock2_h" = yes] +sys_time-h [test "$ac_cv_header_winsock2_h" = yes] errno-h [test "$ac_cv_header_winsock2_h" = yes] msvc-nothrow [test "$ac_cv_header_winsock2_h" = yes] diff --git a/modules/gettime b/modules/gettime index 78a49f1f7f..a3322dab72 100644 --- a/modules/gettime +++ b/modules/gettime @@ -8,7 +8,7 @@ m4/gettime.m4 Depends-on: clock-time gettimeofday -sys_time +sys_time-h timespec extensions diff --git a/modules/gettimeofday b/modules/gettimeofday index 56ad938755..e1865d0ce5 100644 --- a/modules/gettimeofday +++ b/modules/gettimeofday @@ -6,7 +6,7 @@ lib/gettimeofday.c m4/gettimeofday.m4 Depends-on: -sys_time +sys_time-h configure.ac: gl_FUNC_GETTIMEOFDAY diff --git a/modules/poll b/modules/poll index 917242b6b4..de765c2353 100644 --- a/modules/poll +++ b/modules/poll @@ -13,7 +13,7 @@ select [test $HAVE_POLL = 0 || test $REPLACE_POLL = 1] sockets [test $HAVE_POLL = 0 || test $REPLACE_POLL = 1] sys_select-h [test $HAVE_POLL = 0 || test $REPLACE_POLL = 1] sys_socket-h [test $HAVE_POLL = 0 || test $REPLACE_POLL = 1] -sys_time [test $HAVE_POLL = 0 || test $REPLACE_POLL = 1] +sys_time-h [test $HAVE_POLL = 0 || test $REPLACE_POLL = 1] errno-h [test $HAVE_POLL = 0 || test $REPLACE_POLL = 1] msvc-nothrow [test $HAVE_POLL = 0 || test $REPLACE_POLL = 1] diff --git a/modules/posixcheck b/modules/posixcheck index d302ee3252..e3f9bc22c2 100644 --- a/modules/posixcheck +++ b/modules/posixcheck @@ -39,7 +39,7 @@ sys_resource-h sys_select-h sys_socket-h sys_stat-h -sys_time +sys_time-h sys_times sys_utsname sys_wait diff --git a/modules/select b/modules/select index 7082f72eac..b19bd442f8 100644 --- a/modules/select +++ b/modules/select @@ -10,7 +10,7 @@ sys_select-h alloca [test $REPLACE_SELECT = 1] dup2 [test $REPLACE_SELECT = 1] sockets [test $REPLACE_SELECT = 1] -sys_time [test $REPLACE_SELECT = 1] +sys_time-h [test $REPLACE_SELECT = 1] msvc-nothrow [test $REPLACE_SELECT = 1] configure.ac: diff --git a/modules/setsockopt b/modules/setsockopt index 59a5a2f40c..360d94ffdd 100644 --- a/modules/setsockopt +++ b/modules/setsockopt @@ -8,7 +8,7 @@ lib/w32sock.h Depends-on: sys_socket-h socketlib -sys_time [test "$ac_cv_header_winsock2_h" = yes] +sys_time-h [test "$ac_cv_header_winsock2_h" = yes] errno-h [test "$ac_cv_header_winsock2_h" = yes] msvc-nothrow [test "$ac_cv_header_winsock2_h" = yes] diff --git a/modules/settime b/modules/settime index 94b858478d..871e585ba4 100644 --- a/modules/settime +++ b/modules/settime @@ -9,7 +9,7 @@ Depends-on: clock-time errno-h extensions -sys_time +sys_time-h timespec configure.ac: diff --git a/modules/strptime b/modules/strptime index 37cd9b6541..f6b70ce300 100644 --- a/modules/strptime +++ b/modules/strptime @@ -9,7 +9,7 @@ m4/tm_gmtoff.m4 Depends-on: time-h extensions -sys_time [test $HAVE_STRPTIME = 0] +sys_time-h [test $HAVE_STRPTIME = 0] string-h [test $HAVE_STRPTIME = 0] strcase [test $HAVE_STRPTIME = 0] stdbool-h [test $HAVE_STRPTIME = 0] diff --git a/modules/sys_resource-h b/modules/sys_resource-h index 3cdac75a18..c1410bacc1 100644 --- a/modules/sys_resource-h +++ b/modules/sys_resource-h @@ -11,7 +11,7 @@ include_next snippet/arg-nonnull snippet/c++defs snippet/warn-on-use -sys_time +sys_time-h configure.ac: gl_SYS_RESOURCE_H diff --git a/modules/sys_select-h b/modules/sys_select-h index 5c8934ec29..ad947f6be4 100644 --- a/modules/sys_select-h +++ b/modules/sys_select-h @@ -12,7 +12,7 @@ include_next signal-h snippet/c++defs snippet/warn-on-use -sys_time +sys_time-h configure.ac: gl_SYS_SELECT_H diff --git a/modules/sys_time b/modules/sys_time index 08bc2a23d1..8c356d17d3 100644 --- a/modules/sys_time +++ b/modules/sys_time @@ -1,50 +1,20 @@ Description: A that conforms better to POSIX. +Status: +deprecated + +Notice: +This module is deprecated. Use the module 'sys_time-h' instead. + Files: -lib/sys_time.in.h -m4/sys_time_h.m4 -m4/sys_socket_h.m4 Depends-on: -gen-header -include_next -snippet/arg-nonnull -snippet/c++defs -snippet/warn-on-use +sys_time-h configure.ac: -gl_SYS_TIME_H -gl_SYS_TIME_H_REQUIRE_DEFAULTS -AC_PROG_MKDIR_P Makefile.am: -BUILT_SOURCES += sys/time.h - -# We need the following in order to create when the system -# doesn't have one that works with the given compiler. -sys/time.h: sys_time.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/@''HAVE_SYS_TIME_H''@/$(HAVE_SYS_TIME_H)/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_TIME_H''@|$(NEXT_SYS_TIME_H)|g' \ - -e 's/@''GNULIB_GETTIMEOFDAY''@/$(GNULIB_GETTIMEOFDAY)/g' \ - -e 's|@''HAVE_WINSOCK2_H''@|$(HAVE_WINSOCK2_H)|g' \ - -e 's/@''HAVE_GETTIMEOFDAY''@/$(HAVE_GETTIMEOFDAY)/g' \ - -e 's/@''HAVE_STRUCT_TIMEVAL''@/$(HAVE_STRUCT_TIMEVAL)/g' \ - -e 's/@''REPLACE_GETTIMEOFDAY''@/$(REPLACE_GETTIMEOFDAY)/g' \ - -e 's/@''REPLACE_STRUCT_TIMEVAL''@/$(REPLACE_STRUCT_TIMEVAL)/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_time.in.h > $@-t - $(AM_V_at)mv $@-t $@ -MOSTLYCLEANFILES += sys/time.h sys/time.h-t -MOSTLYCLEANDIRS += sys Include: @@ -53,4 +23,3 @@ License: LGPLv2+ Maintainer: -all diff --git a/modules/sys_time-c++-tests b/modules/sys_time-c++-tests deleted file mode 100644 index 6cb9df826f..0000000000 --- a/modules/sys_time-c++-tests +++ /dev/null @@ -1,19 +0,0 @@ -Files: -tests/test-sys_time-c++.cc -tests/signature.h - -Status: -c++-test - -Depends-on: -ansi-c++-opt - -configure.ac: - -Makefile.am: -if ANSICXX -TESTS += test-sys_time-c++ -check_PROGRAMS += test-sys_time-c++ -test_sys_time_c___SOURCES = test-sys_time-c++.cc -test_sys_time_c___LDADD = $(LDADD) $(LIBINTL) $(NANOSLEEP_LIB) -endif diff --git a/modules/sys_time-h b/modules/sys_time-h new file mode 100644 index 0000000000..08bc2a23d1 --- /dev/null +++ b/modules/sys_time-h @@ -0,0 +1,56 @@ +Description: +A that conforms better to POSIX. + +Files: +lib/sys_time.in.h +m4/sys_time_h.m4 +m4/sys_socket_h.m4 + +Depends-on: +gen-header +include_next +snippet/arg-nonnull +snippet/c++defs +snippet/warn-on-use + +configure.ac: +gl_SYS_TIME_H +gl_SYS_TIME_H_REQUIRE_DEFAULTS +AC_PROG_MKDIR_P + +Makefile.am: +BUILT_SOURCES += sys/time.h + +# We need the following in order to create when the system +# doesn't have one that works with the given compiler. +sys/time.h: sys_time.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/@''HAVE_SYS_TIME_H''@/$(HAVE_SYS_TIME_H)/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_TIME_H''@|$(NEXT_SYS_TIME_H)|g' \ + -e 's/@''GNULIB_GETTIMEOFDAY''@/$(GNULIB_GETTIMEOFDAY)/g' \ + -e 's|@''HAVE_WINSOCK2_H''@|$(HAVE_WINSOCK2_H)|g' \ + -e 's/@''HAVE_GETTIMEOFDAY''@/$(HAVE_GETTIMEOFDAY)/g' \ + -e 's/@''HAVE_STRUCT_TIMEVAL''@/$(HAVE_STRUCT_TIMEVAL)/g' \ + -e 's/@''REPLACE_GETTIMEOFDAY''@/$(REPLACE_GETTIMEOFDAY)/g' \ + -e 's/@''REPLACE_STRUCT_TIMEVAL''@/$(REPLACE_STRUCT_TIMEVAL)/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_time.in.h > $@-t + $(AM_V_at)mv $@-t $@ +MOSTLYCLEANFILES += sys/time.h sys/time.h-t +MOSTLYCLEANDIRS += sys + +Include: + + +License: +LGPLv2+ + +Maintainer: +all diff --git a/modules/sys_time-h-c++-tests b/modules/sys_time-h-c++-tests new file mode 100644 index 0000000000..92be4bc631 --- /dev/null +++ b/modules/sys_time-h-c++-tests @@ -0,0 +1,19 @@ +Files: +tests/test-sys_time-h-c++.cc +tests/signature.h + +Status: +c++-test + +Depends-on: +ansi-c++-opt + +configure.ac: + +Makefile.am: +if ANSICXX +TESTS += test-sys_time-h-c++ +check_PROGRAMS += test-sys_time-h-c++ +test_sys_time_h_c___SOURCES = test-sys_time-h-c++.cc +test_sys_time_h_c___LDADD = $(LDADD) $(LIBINTL) $(NANOSLEEP_LIB) +endif diff --git a/modules/sys_time-h-tests b/modules/sys_time-h-tests new file mode 100644 index 0000000000..4662772245 --- /dev/null +++ b/modules/sys_time-h-tests @@ -0,0 +1,11 @@ +Files: +tests/test-sys_time-h.c + +Depends-on: +sys_time-h-c++-tests + +configure.ac: + +Makefile.am: +TESTS += test-sys_time-h +check_PROGRAMS += test-sys_time-h diff --git a/modules/sys_time-tests b/modules/sys_time-tests deleted file mode 100644 index 7834c6fefd..0000000000 --- a/modules/sys_time-tests +++ /dev/null @@ -1,11 +0,0 @@ -Files: -tests/test-sys_time.c - -Depends-on: -sys_time-c++-tests - -configure.ac: - -Makefile.am: -TESTS += test-sys_time -check_PROGRAMS += test-sys_time diff --git a/modules/timevar b/modules/timevar index efd8201058..7e966531fc 100644 --- a/modules/timevar +++ b/modules/timevar @@ -16,7 +16,7 @@ getrusage gettext-h gnulib-i18n stdlib-h -sys_time +sys_time-h sys_times xalloc diff --git a/modules/utimens b/modules/utimens index 580639dc26..5e8cd2325f 100644 --- a/modules/utimens +++ b/modules/utimens @@ -19,7 +19,7 @@ stat stat-time stdbool-h sys_stat-h -sys_time +sys_time-h time-h utime utime-h diff --git a/tests/test-sys_time-c++.cc b/tests/test-sys_time-h-c++.cc similarity index 100% rename from tests/test-sys_time-c++.cc rename to tests/test-sys_time-h-c++.cc diff --git a/tests/test-sys_time.c b/tests/test-sys_time-h.c similarity index 100% rename from tests/test-sys_time.c rename to tests/test-sys_time-h.c