]> Savannah Git Hosting - gnulib.git/commitdiff
Rename module sys_time to sys_time-h.
authorBruno Haible <bruno@clisp.org>
Fri, 27 Dec 2024 22:41:36 +0000 (23:41 +0100)
committerBruno Haible <bruno@clisp.org>
Fri, 27 Dec 2024 22:41:36 +0000 (23:41 +0100)
* 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.

26 files changed:
ChangeLog
doc/posix-headers/sys_time.texi
modules/gethrxtime
modules/getsockopt
modules/gettime
modules/gettimeofday
modules/poll
modules/posixcheck
modules/select
modules/setsockopt
modules/settime
modules/strptime
modules/sys_resource-h
modules/sys_select-h
modules/sys_time
modules/sys_time-c++-tests [deleted file]
modules/sys_time-h [new file with mode: 0644]
modules/sys_time-h-c++-tests [new file with mode: 0644]
modules/sys_time-h-tests [new file with mode: 0644]
modules/sys_time-tests [deleted file]
modules/timevar
modules/utimens
tests/test-sys_time-c++.cc [deleted file]
tests/test-sys_time-h-c++.cc [new file with mode: 0644]
tests/test-sys_time-h.c [new file with mode: 0644]
tests/test-sys_time.c [deleted file]

index b4a8cf5df02ebcd36718a4cd3ac966c1085c14d5..4388a592b4d1c19f80bc463be9c5f74caeca8472 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2024-12-27  Bruno Haible  <bruno@clisp.org>
+
+       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  <bruno@clisp.org>
 
        Rename module sys_stat to sys_stat-h.
index 51004a471c361b8e89932e83f61bf75d7fab49f7..7f1f5d1535ef5632eae05c9ebe1f79eeecb5c111 100644 (file)
@@ -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
index 6bb274cf3edf5718b48f2c72ff45e0c64966b86c..bde10d16b72fea5e2c4003b543734647c21ba4b3 100644 (file)
@@ -13,7 +13,7 @@ clock-time
 extensions
 extern-inline
 gettime
-sys_time
+sys_time-h
 
 configure.ac:
 gl_GETHRXTIME
index 9bbc6685fb29ed8c3509f12038bebe4e2c4f6cd8..9b9e84dca0c2eb302ea88a30d9fccbe06b81ff00 100644 (file)
@@ -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]
 
index 78a49f1f7f7df5ab8db83df5737213fbfe34c70b..a3322dab7264008fa5828a6b0a1bdb504c2a1dae 100644 (file)
@@ -8,7 +8,7 @@ m4/gettime.m4
 Depends-on:
 clock-time
 gettimeofday
-sys_time
+sys_time-h
 timespec
 extensions
 
index 56ad938755d4afa5e119c816fba9a2ce010f8ed6..e1865d0ce563d562cdc307ebd7ee66e1d0e1af13 100644 (file)
@@ -6,7 +6,7 @@ lib/gettimeofday.c
 m4/gettimeofday.m4
 
 Depends-on:
-sys_time
+sys_time-h
 
 configure.ac:
 gl_FUNC_GETTIMEOFDAY
index 917242b6b49d0a79d48c9e199a872b231d7f805b..de765c2353c478cf875a452fae7cb7bc253a96e0 100644 (file)
@@ -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]
 
index d302ee3252ccfa73ca58f5567b86e3fa6d412456..e3f9bc22c204451a434520aa01fffd5a5be6beb0 100644 (file)
@@ -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
index 7082f72eac934d7563538af3d4b5d3687e9cba08..b19bd442f8720f56d1f334ccf7fd21eebff6cdd3 100644 (file)
@@ -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:
index 59a5a2f40c1d479323a99cca9ffafcb1c299ce03..360d94ffdd742f83838d4ef48ac58e65a0f36e74 100644 (file)
@@ -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]
 
index 94b858478d7448c2aa2d9c97164c9a039b7c348e..871e585ba4c7fa4c4b1e5f9a53d0aba93ce5ae27 100644 (file)
@@ -9,7 +9,7 @@ Depends-on:
 clock-time
 errno-h
 extensions
-sys_time
+sys_time-h
 timespec
 
 configure.ac:
index 37cd9b6541eb2057329772023d16c25f4d559931..f6b70ce3002295d6f368cdb1e00120663fe37cee 100644 (file)
@@ -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]
index 3cdac75a18326a8832f61e0e273d602ac2b3d41c..c1410bacc13ceb024c2dd3be36eef21a44be75d9 100644 (file)
@@ -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
index 5c8934ec290952a79d29aaab44104c86070896fe..ad947f6be4cb0a7eebccb86cc9ca413620c9e64e 100644 (file)
@@ -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
index 08bc2a23d1cacc97995bdf0e3409072512d181ff..8c356d17d3c39a108224fa3ce2cd9841eadf1d19 100644 (file)
@@ -1,50 +1,20 @@
 Description:
 A <sys/time.h> 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 <sys/time.h> 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:
 <sys/time.h>
@@ -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 (file)
index 6cb9df8..0000000
+++ /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 (file)
index 0000000..08bc2a2
--- /dev/null
@@ -0,0 +1,56 @@
+Description:
+A <sys/time.h> 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 <sys/time.h> 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:
+<sys/time.h>
+
+License:
+LGPLv2+
+
+Maintainer:
+all
diff --git a/modules/sys_time-h-c++-tests b/modules/sys_time-h-c++-tests
new file mode 100644 (file)
index 0000000..92be4bc
--- /dev/null
@@ -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 (file)
index 0000000..4662772
--- /dev/null
@@ -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 (file)
index 7834c6f..0000000
+++ /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
index efd82010584ed3815cc7e94afacb8209c7a14cb7..7e966531fc3e72fa730f350e0e2b3a12ad46c57f 100644 (file)
@@ -16,7 +16,7 @@ getrusage
 gettext-h
 gnulib-i18n
 stdlib-h
-sys_time
+sys_time-h
 sys_times
 xalloc
 
index 580639dc2606136e11c370d403718a0f607cf333..5e8cd2325fc0d178391990916a8e26968e75bc8c 100644 (file)
@@ -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-c++.cc
deleted file mode 100644 (file)
index be24f73..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-/* Test of <sys/time.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/time.h>
-
-#include "signature.h"
-
-
-#if GNULIB_TEST_GETTIMEOFDAY
-SIGNATURE_CHECK (GNULIB_NAMESPACE::gettimeofday, int,
-                 (struct timeval *, void *));
-#endif
-
-
-int
-main ()
-{
-}
diff --git a/tests/test-sys_time-h-c++.cc b/tests/test-sys_time-h-c++.cc
new file mode 100644 (file)
index 0000000..be24f73
--- /dev/null
@@ -0,0 +1,36 @@
+/* Test of <sys/time.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/time.h>
+
+#include "signature.h"
+
+
+#if GNULIB_TEST_GETTIMEOFDAY
+SIGNATURE_CHECK (GNULIB_NAMESPACE::gettimeofday, int,
+                 (struct timeval *, void *));
+#endif
+
+
+int
+main ()
+{
+}
diff --git a/tests/test-sys_time-h.c b/tests/test-sys_time-h.c
new file mode 100644 (file)
index 0000000..5db5c2c
--- /dev/null
@@ -0,0 +1,34 @@
+/* Test of <sys/time.h> substitute.
+   Copyright (C) 2007, 2009-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/time.h>
+
+/* Check that the 'struct timeval' type is defined.  */
+struct timeval a;
+
+/* Check that a.tv_sec is wide enough to hold a time_t, ignoring
+   signedness issues.  */
+typedef int verify_tv_sec_type[sizeof (time_t) <= sizeof (a.tv_sec) ? 1 : -1];
+
+int
+main (void)
+{
+  return 0;
+}
diff --git a/tests/test-sys_time.c b/tests/test-sys_time.c
deleted file mode 100644 (file)
index 5db5c2c..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-/* Test of <sys/time.h> substitute.
-   Copyright (C) 2007, 2009-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/time.h>
-
-/* Check that the 'struct timeval' type is defined.  */
-struct timeval a;
-
-/* Check that a.tv_sec is wide enough to hold a time_t, ignoring
-   signedness issues.  */
-typedef int verify_tv_sec_type[sizeof (time_t) <= sizeof (a.tv_sec) ? 1 : -1];
-
-int
-main (void)
-{
-  return 0;
-}