]> Savannah Git Hosting - gnulib.git/commitdiff
time-h: Renamed from time.
authorBruno Haible <bruno@clisp.org>
Wed, 8 Mar 2023 09:41:00 +0000 (10:41 +0100)
committerBruno Haible <bruno@clisp.org>
Wed, 8 Mar 2023 09:41:00 +0000 (10:41 +0100)
* modules/time-h: Renamed from modules/time.
* tests/test-time-h.c: Renamed from tests/test-time.c.
* modules/time-h-tests: Renamed from modules/time-tests. Update.
* tests/test-time-h-c++.cc: Renamed from tests/test-time-c++.cc.
* tests/test-time-h-c++2.cc: Renamed from tests/test-time-c++2.cc.
* modules/time-h-c++-tests: Renamed from modules/time-c++-tests. Update.
* modules/cond (Depends-on): Update.
* modules/ctime (Depends-on): Likewise.
* modules/localtime (Depends-on): Likewise.
* modules/mktime (Depends-on): Likewise.
* modules/nanosleep (Depends-on): Likewise.
* modules/parse-datetime (Depends-on): Likewise.
* modules/posixcheck (Depends-on): Likewise.
* modules/pthread-h (Depends-on): Likewise.
* modules/stat-time (Depends-on): Likewise.
* modules/stat-time-tests (Depends-on): Likewise.
* modules/strftime-fixes (Depends-on): Likewise.
* modules/strptime (Depends-on): Likewise.
* modules/sys_stat (Depends-on): Likewise.
* modules/tempname (Depends-on): Likewise.
* modules/threads-h (Depends-on): Likewise.
* modules/time_r (Depends-on): Likewise.
* modules/time_rz (Depends-on): Likewise.
* modules/timegm (Depends-on): Likewise.
* modules/timespec (Depends-on): Likewise.
* modules/timespec_get (Depends-on): Likewise.
* modules/timespec_getres (Depends-on): Likewise.
* modules/tzset (Depends-on): Likewise.
* modules/usleep-tests (Depends-on): Likewise.
* modules/utime (Depends-on): Likewise.
* modules/utimecmp (Depends-on): Likewise.
* modules/utimens (Depends-on): Likewise.
* modules/windows-cond (Depends-on): Likewise.
* modules/windows-timedmutex (Depends-on): Likewise.
* modules/windows-timedrecmutex (Depends-on): Likewise.
* modules/windows-timedrwlock (Depends-on): Likewise.
* modules/xnanosleep (Depends-on): Likewise.
* doc/posix-headers/time.texi: Update.
* NEWS: Mention the change.

46 files changed:
ChangeLog
NEWS
doc/posix-headers/time.texi
modules/cond
modules/ctime
modules/localtime
modules/mktime
modules/nanosleep
modules/parse-datetime
modules/posixcheck
modules/pthread-h
modules/stat-time
modules/stat-time-tests
modules/strftime-fixes
modules/strptime
modules/sys_stat
modules/tempname
modules/threads-h
modules/time [deleted file]
modules/time-c++-tests [deleted file]
modules/time-h [new file with mode: 0644]
modules/time-h-c++-tests [new file with mode: 0644]
modules/time-h-tests [new file with mode: 0644]
modules/time-tests [deleted file]
modules/time_r
modules/time_rz
modules/timegm
modules/timespec
modules/timespec_get
modules/timespec_getres
modules/tzset
modules/usleep-tests
modules/utime
modules/utimecmp
modules/utimens
modules/windows-cond
modules/windows-timedmutex
modules/windows-timedrecmutex
modules/windows-timedrwlock
modules/xnanosleep
tests/test-time-c++.cc [deleted file]
tests/test-time-c++2.cc [deleted file]
tests/test-time-h-c++.cc [new file with mode: 0644]
tests/test-time-h-c++2.cc [new file with mode: 0644]
tests/test-time-h.c [new file with mode: 0644]
tests/test-time.c [deleted file]

index cec18435b21701e9e420dc12ffac0212b371fe08..aac31c31a58e4e9a3c115851203a87742f4e4d7a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,46 @@
+2023-03-08  Bruno Haible  <bruno@clisp.org>
+
+       time-h: Renamed from time.
+       * modules/time-h: Renamed from modules/time.
+       * tests/test-time-h.c: Renamed from tests/test-time.c.
+       * modules/time-h-tests: Renamed from modules/time-tests. Update.
+       * tests/test-time-h-c++.cc: Renamed from tests/test-time-c++.cc.
+       * tests/test-time-h-c++2.cc: Renamed from tests/test-time-c++2.cc.
+       * modules/time-h-c++-tests: Renamed from modules/time-c++-tests. Update.
+       * modules/cond (Depends-on): Update.
+       * modules/ctime (Depends-on): Likewise.
+       * modules/localtime (Depends-on): Likewise.
+       * modules/mktime (Depends-on): Likewise.
+       * modules/nanosleep (Depends-on): Likewise.
+       * modules/parse-datetime (Depends-on): Likewise.
+       * modules/posixcheck (Depends-on): Likewise.
+       * modules/pthread-h (Depends-on): Likewise.
+       * modules/stat-time (Depends-on): Likewise.
+       * modules/stat-time-tests (Depends-on): Likewise.
+       * modules/strftime-fixes (Depends-on): Likewise.
+       * modules/strptime (Depends-on): Likewise.
+       * modules/sys_stat (Depends-on): Likewise.
+       * modules/tempname (Depends-on): Likewise.
+       * modules/threads-h (Depends-on): Likewise.
+       * modules/time_r (Depends-on): Likewise.
+       * modules/time_rz (Depends-on): Likewise.
+       * modules/timegm (Depends-on): Likewise.
+       * modules/timespec (Depends-on): Likewise.
+       * modules/timespec_get (Depends-on): Likewise.
+       * modules/timespec_getres (Depends-on): Likewise.
+       * modules/tzset (Depends-on): Likewise.
+       * modules/usleep-tests (Depends-on): Likewise.
+       * modules/utime (Depends-on): Likewise.
+       * modules/utimecmp (Depends-on): Likewise.
+       * modules/utimens (Depends-on): Likewise.
+       * modules/windows-cond (Depends-on): Likewise.
+       * modules/windows-timedmutex (Depends-on): Likewise.
+       * modules/windows-timedrecmutex (Depends-on): Likewise.
+       * modules/windows-timedrwlock (Depends-on): Likewise.
+       * modules/xnanosleep (Depends-on): Likewise.
+       * doc/posix-headers/time.texi: Update.
+       * NEWS: Mention the change.
+
 2023-03-08  Bruno Haible  <bruno@clisp.org>
 
        gettimeofday tests: Enhance test.
diff --git a/NEWS b/NEWS
index 0ec377915c9912ca480148c8b3d12bd90e27a266..ad7e1e69f570cf65b2aadda714a84b886d03f9ac 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -74,6 +74,8 @@ User visible incompatible changes
 
 Date        Modules         Changes
 
+2023-03-08  time            This module is renamed to 'time-h'.
+
 2023-02-07  c-nullptr       Rename this module to nullptr.
 
 2023-01-21  getprogname     The include file is changed from "getprogname.h"
index 3d81646454ee587897d5ece669b8a4a5be49a6b5..5ecebbfdda53f312bcd59c80d2723734fe5ae4ff 100644 (file)
@@ -3,7 +3,7 @@
 
 POSIX specification:@* @url{https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/time.h.html}
 
-Gnulib module: time
+Gnulib module: time-h
 
 Portability problems fixed by Gnulib:
 @itemize
index 43b2bd67deb6836e957eb2398d8d5f247f81933e..5f2ea4edecf44d14e64b0c1d82dd28f206a18fcd 100644 (file)
@@ -12,7 +12,7 @@ lock
 errno
 extern-inline
 stdbool
-time
+time-h
 windows-cond    [test $gl_threads_api = windows]
 
 configure.ac:
index 08cc532986b924ad86f361ef396a80be2ea3fea0..11de22f2d98f6823e97c69a9da6c397770e41984 100644 (file)
@@ -10,7 +10,7 @@ lib/ctime.c
 m4/ctime.m4
 
 Depends-on:
-time
+time-h
 
 configure.ac:
 gl_FUNC_CTIME
index 99a2d00dcd915121b08666ec23a495ba094bd005..788077532878cafdd8e1f764910ed2f09ab067fe 100644 (file)
@@ -6,7 +6,7 @@ lib/localtime.c
 m4/localtime.m4
 
 Depends-on:
-time
+time-h
 
 configure.ac:
 gl_FUNC_LOCALTIME
index 7594043e6d9dcc0fa8b47ef3145ff7acee1301c1..b3ba650a93accdc0f68aa97b32414901e6a1824b 100644 (file)
@@ -7,7 +7,7 @@ lib/mktime.c
 m4/mktime.m4
 
 Depends-on:
-time
+time-h
 c99
 multiarch
 intprops        [test $REPLACE_MKTIME = 1]
index 8fa659b752eae22ecd9527a6b2c7aac72880b663..270bfd46d3e56eb04e74df6c881f86f6c630cf34 100644 (file)
@@ -6,7 +6,7 @@ lib/nanosleep.c
 m4/nanosleep.m4
 
 Depends-on:
-time
+time-h
 extensions
 multiarch
 assert-h        [test $HAVE_NANOSLEEP = 0 || test $REPLACE_NANOSLEEP = 1]
index 72aa6af659deda7ccd7f72ea484adf4d26f19dd7..ef281dcf30ecce21f830b86dcd8ba01b577c56a2 100644 (file)
@@ -23,7 +23,7 @@ mktime
 nstrftime
 setenv
 unsetenv
-time
+time-h
 time_r
 time_rz
 timegm
index fac9fea75b506fc14914db523ec53a633ad040f9..2615c8597b4a6e58e0fbff2ae2e2ee4e548128dd 100644 (file)
@@ -40,7 +40,7 @@ sys_times
 sys_utsname
 sys_wait
 termios
-time
+time-h
 unistd
 utime-h
 wchar
index a505f8a88700c79932478564b19ca2e643ec632f..2771f44151f8c93d0a50d7236163716d6d94db3b 100644 (file)
@@ -11,7 +11,7 @@ extensions
 extern-inline
 gen-header
 sched
-time
+time-h
 snippet/c++defs
 snippet/_Noreturn
 snippet/arg-nonnull
index 92120ace8c9d9dc1cd6bab30d40e843b8ec44fc7..d4c0378dbaea5d854c8ed6fe8a1945341be65568 100644 (file)
@@ -7,7 +7,7 @@ lib/stat-time.c
 m4/stat-time.m4
 
 Depends-on:
-time
+time-h
 errno
 extensions
 extern-inline
index aa4e31c35c4c2b8d8b2bc9418f5fc26e7f7c7b88..0a8193783d7c99579c7ddc371ace32a6552c38b5 100644 (file)
@@ -6,7 +6,7 @@ tests/nap.h
 Depends-on:
 nanosleep
 stdckdint
-time
+time-h
 unistd
 
 configure.ac:
index 38a17fcfc371db13f65eba3a4afffb7dd5029ab5..626ab04268885b18108fc8428677e3f467eab100 100644 (file)
@@ -6,7 +6,7 @@ lib/strftime-fixes.c
 m4/strftime-fixes.m4
 
 Depends-on:
-time
+time-h
 
 configure.ac:
 gl_FUNC_STRFTIME
index bcbfa277823b046d5ef3895181d7cc400128dd5f..4fe2c5ef693f6f541839db1a2edf3db336a33df8 100644 (file)
@@ -7,7 +7,7 @@ m4/strptime.m4
 m4/tm_gmtoff.m4
 
 Depends-on:
-time
+time-h
 extensions
 sys_time        [test $HAVE_STRPTIME = 0]
 string          [test $HAVE_STRPTIME = 0]
index d5ab15415740e9f35b1c0155b17991999f1f878d..233224e835d143c4864558ffe88a6083c00226fb 100644 (file)
@@ -14,7 +14,7 @@ snippet/arg-nonnull
 snippet/c++defs
 snippet/warn-on-use
 sys_types
-time
+time-h
 
 configure.ac:
 gl_SYS_STAT_H
index 292c990deac334f49d6ac42aae903877af9fbec9..25d27f3e5692dba48d4b1cb881105598214c7a9c 100644 (file)
@@ -19,7 +19,7 @@ mkdir
 stdbool
 stdint
 sys_stat
-time
+time-h
 
 configure.ac:
 gl_FUNC_GEN_TEMPNAME
index e35a5e265bd20c58eeee16de8b11c3183f0ce4a9..50a60dfdabaa47a24ac5a2d6e1a2620416bc1894 100644 (file)
@@ -23,7 +23,7 @@ snippet/c++defs
 snippet/_Noreturn
 snippet/arg-nonnull
 snippet/warn-on-use
-time
+time-h
 havelib
 
 configure.ac-early:
diff --git a/modules/time b/modules/time
deleted file mode 100644 (file)
index 75ff3a4..0000000
+++ /dev/null
@@ -1,84 +0,0 @@
-Description:
-A more-standard <time.h>.
-
-Files:
-lib/time.in.h
-m4/time_h.m4
-
-Depends-on:
-extensions
-gen-header
-include_next
-snippet/arg-nonnull
-snippet/c++defs
-snippet/warn-on-use
-stddef
-
-configure.ac:
-gl_TIME_H
-gl_TIME_H_REQUIRE_DEFAULTS
-AC_PROG_MKDIR_P
-
-Makefile.am:
-BUILT_SOURCES += time.h
-
-# We need the following in order to create <time.h> when the system
-# doesn't have one that works with the given compiler.
-time.h: time.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
-@NMD@  $(AM_V_GEN)$(MKDIR_P) '%reldir%'
-       $(gl_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_TIME_H''@|$(NEXT_TIME_H)|g' \
-             -e 's/@''GNULIB_CTIME''@/$(GNULIB_CTIME)/g' \
-             -e 's/@''GNULIB_LOCALTIME''@/$(GNULIB_LOCALTIME)/g' \
-             -e 's/@''GNULIB_MKTIME''@/$(GNULIB_MKTIME)/g' \
-             -e 's/@''GNULIB_NANOSLEEP''@/$(GNULIB_NANOSLEEP)/g' \
-             -e 's/@''GNULIB_STRFTIME''@/$(GNULIB_STRFTIME)/g' \
-             -e 's/@''GNULIB_STRPTIME''@/$(GNULIB_STRPTIME)/g' \
-             -e 's/@''GNULIB_TIMEGM''@/$(GNULIB_TIMEGM)/g' \
-             -e 's/@''GNULIB_TIMESPEC_GET''@/$(GNULIB_TIMESPEC_GET)/g' \
-             -e 's/@''GNULIB_TIMESPEC_GETRES''@/$(GNULIB_TIMESPEC_GETRES)/g' \
-             -e 's/@''GNULIB_TIME_R''@/$(GNULIB_TIME_R)/g' \
-             -e 's/@''GNULIB_TIME_RZ''@/$(GNULIB_TIME_RZ)/g' \
-             -e 's/@''GNULIB_TZSET''@/$(GNULIB_TZSET)/g' \
-             -e 's/@''GNULIB_MDA_TZSET''@/$(GNULIB_MDA_TZSET)/g' \
-             -e 's|@''HAVE_DECL_LOCALTIME_R''@|$(HAVE_DECL_LOCALTIME_R)|g' \
-             -e 's|@''HAVE_NANOSLEEP''@|$(HAVE_NANOSLEEP)|g' \
-             -e 's|@''HAVE_STRPTIME''@|$(HAVE_STRPTIME)|g' \
-             -e 's|@''HAVE_TIMEGM''@|$(HAVE_TIMEGM)|g' \
-             -e 's|@''HAVE_TIMESPEC_GET''@|$(HAVE_TIMESPEC_GET)|g' \
-             -e 's|@''HAVE_TIMESPEC_GETRES''@|$(HAVE_TIMESPEC_GETRES)|g' \
-             -e 's|@''HAVE_TIMEZONE_T''@|$(HAVE_TIMEZONE_T)|g' \
-             -e 's|@''REPLACE_CTIME''@|$(REPLACE_CTIME)|g' \
-             -e 's|@''REPLACE_GMTIME''@|$(REPLACE_GMTIME)|g' \
-             -e 's|@''REPLACE_LOCALTIME''@|$(REPLACE_LOCALTIME)|g' \
-             -e 's|@''REPLACE_LOCALTIME_R''@|$(REPLACE_LOCALTIME_R)|g' \
-             -e 's|@''REPLACE_MKTIME''@|$(REPLACE_MKTIME)|g' \
-             -e 's|@''REPLACE_NANOSLEEP''@|$(REPLACE_NANOSLEEP)|g' \
-             -e 's|@''REPLACE_STRFTIME''@|$(REPLACE_STRFTIME)|g' \
-             -e 's|@''REPLACE_TIMEGM''@|$(REPLACE_TIMEGM)|g' \
-             -e 's|@''REPLACE_TIMESPEC_GET''@|$(REPLACE_TIMESPEC_GET)|g' \
-             -e 's|@''REPLACE_TZSET''@|$(REPLACE_TZSET)|g' \
-             -e 's|@''PTHREAD_H_DEFINES_STRUCT_TIMESPEC''@|$(PTHREAD_H_DEFINES_STRUCT_TIMESPEC)|g' \
-             -e 's|@''SYS_TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(SYS_TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \
-             -e 's|@''TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \
-             -e 's|@''UNISTD_H_DEFINES_STRUCT_TIMESPEC''@|$(UNISTD_H_DEFINES_STRUCT_TIMESPEC)|g' \
-             -e 's|@''TIME_H_DEFINES_TIME_UTC''@|$(TIME_H_DEFINES_TIME_UTC)|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)/time.in.h > $@-t
-       $(AM_V_at)mv $@-t $@
-MOSTLYCLEANFILES += time.h time.h-t
-
-Include:
-<time.h>
-
-License:
-LGPLv2+
-
-Maintainer:
-all
diff --git a/modules/time-c++-tests b/modules/time-c++-tests
deleted file mode 100644 (file)
index 7a22d92..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-Files:
-tests/test-time-c++.cc
-tests/test-time-c++2.cc
-tests/signature.h
-
-Status:
-c++-test
-
-Depends-on:
-ansi-c++-opt
-
-configure.ac:
-
-Makefile.am:
-if ANSICXX
-TESTS += test-time-c++
-check_PROGRAMS += test-time-c++
-test_time_c___SOURCES = test-time-c++.cc test-time-c++2.cc
-test_time_c___LDADD = $(LDADD) $(LIBINTL) $(NANOSLEEP_LIB) $(CLOCK_TIME_LIB)
-endif
diff --git a/modules/time-h b/modules/time-h
new file mode 100644 (file)
index 0000000..75ff3a4
--- /dev/null
@@ -0,0 +1,84 @@
+Description:
+A more-standard <time.h>.
+
+Files:
+lib/time.in.h
+m4/time_h.m4
+
+Depends-on:
+extensions
+gen-header
+include_next
+snippet/arg-nonnull
+snippet/c++defs
+snippet/warn-on-use
+stddef
+
+configure.ac:
+gl_TIME_H
+gl_TIME_H_REQUIRE_DEFAULTS
+AC_PROG_MKDIR_P
+
+Makefile.am:
+BUILT_SOURCES += time.h
+
+# We need the following in order to create <time.h> when the system
+# doesn't have one that works with the given compiler.
+time.h: time.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
+@NMD@  $(AM_V_GEN)$(MKDIR_P) '%reldir%'
+       $(gl_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_TIME_H''@|$(NEXT_TIME_H)|g' \
+             -e 's/@''GNULIB_CTIME''@/$(GNULIB_CTIME)/g' \
+             -e 's/@''GNULIB_LOCALTIME''@/$(GNULIB_LOCALTIME)/g' \
+             -e 's/@''GNULIB_MKTIME''@/$(GNULIB_MKTIME)/g' \
+             -e 's/@''GNULIB_NANOSLEEP''@/$(GNULIB_NANOSLEEP)/g' \
+             -e 's/@''GNULIB_STRFTIME''@/$(GNULIB_STRFTIME)/g' \
+             -e 's/@''GNULIB_STRPTIME''@/$(GNULIB_STRPTIME)/g' \
+             -e 's/@''GNULIB_TIMEGM''@/$(GNULIB_TIMEGM)/g' \
+             -e 's/@''GNULIB_TIMESPEC_GET''@/$(GNULIB_TIMESPEC_GET)/g' \
+             -e 's/@''GNULIB_TIMESPEC_GETRES''@/$(GNULIB_TIMESPEC_GETRES)/g' \
+             -e 's/@''GNULIB_TIME_R''@/$(GNULIB_TIME_R)/g' \
+             -e 's/@''GNULIB_TIME_RZ''@/$(GNULIB_TIME_RZ)/g' \
+             -e 's/@''GNULIB_TZSET''@/$(GNULIB_TZSET)/g' \
+             -e 's/@''GNULIB_MDA_TZSET''@/$(GNULIB_MDA_TZSET)/g' \
+             -e 's|@''HAVE_DECL_LOCALTIME_R''@|$(HAVE_DECL_LOCALTIME_R)|g' \
+             -e 's|@''HAVE_NANOSLEEP''@|$(HAVE_NANOSLEEP)|g' \
+             -e 's|@''HAVE_STRPTIME''@|$(HAVE_STRPTIME)|g' \
+             -e 's|@''HAVE_TIMEGM''@|$(HAVE_TIMEGM)|g' \
+             -e 's|@''HAVE_TIMESPEC_GET''@|$(HAVE_TIMESPEC_GET)|g' \
+             -e 's|@''HAVE_TIMESPEC_GETRES''@|$(HAVE_TIMESPEC_GETRES)|g' \
+             -e 's|@''HAVE_TIMEZONE_T''@|$(HAVE_TIMEZONE_T)|g' \
+             -e 's|@''REPLACE_CTIME''@|$(REPLACE_CTIME)|g' \
+             -e 's|@''REPLACE_GMTIME''@|$(REPLACE_GMTIME)|g' \
+             -e 's|@''REPLACE_LOCALTIME''@|$(REPLACE_LOCALTIME)|g' \
+             -e 's|@''REPLACE_LOCALTIME_R''@|$(REPLACE_LOCALTIME_R)|g' \
+             -e 's|@''REPLACE_MKTIME''@|$(REPLACE_MKTIME)|g' \
+             -e 's|@''REPLACE_NANOSLEEP''@|$(REPLACE_NANOSLEEP)|g' \
+             -e 's|@''REPLACE_STRFTIME''@|$(REPLACE_STRFTIME)|g' \
+             -e 's|@''REPLACE_TIMEGM''@|$(REPLACE_TIMEGM)|g' \
+             -e 's|@''REPLACE_TIMESPEC_GET''@|$(REPLACE_TIMESPEC_GET)|g' \
+             -e 's|@''REPLACE_TZSET''@|$(REPLACE_TZSET)|g' \
+             -e 's|@''PTHREAD_H_DEFINES_STRUCT_TIMESPEC''@|$(PTHREAD_H_DEFINES_STRUCT_TIMESPEC)|g' \
+             -e 's|@''SYS_TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(SYS_TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \
+             -e 's|@''TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \
+             -e 's|@''UNISTD_H_DEFINES_STRUCT_TIMESPEC''@|$(UNISTD_H_DEFINES_STRUCT_TIMESPEC)|g' \
+             -e 's|@''TIME_H_DEFINES_TIME_UTC''@|$(TIME_H_DEFINES_TIME_UTC)|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)/time.in.h > $@-t
+       $(AM_V_at)mv $@-t $@
+MOSTLYCLEANFILES += time.h time.h-t
+
+Include:
+<time.h>
+
+License:
+LGPLv2+
+
+Maintainer:
+all
diff --git a/modules/time-h-c++-tests b/modules/time-h-c++-tests
new file mode 100644 (file)
index 0000000..814556b
--- /dev/null
@@ -0,0 +1,20 @@
+Files:
+tests/test-time-h-c++.cc
+tests/test-time-h-c++2.cc
+tests/signature.h
+
+Status:
+c++-test
+
+Depends-on:
+ansi-c++-opt
+
+configure.ac:
+
+Makefile.am:
+if ANSICXX
+TESTS += test-time-h-c++
+check_PROGRAMS += test-time-h-c++
+test_time_h_c___SOURCES = test-time-h-c++.cc test-time-h-c++2.cc
+test_time_h_c___LDADD = $(LDADD) $(LIBINTL) $(NANOSLEEP_LIB) $(CLOCK_TIME_LIB)
+endif
diff --git a/modules/time-h-tests b/modules/time-h-tests
new file mode 100644 (file)
index 0000000..d7bf897
--- /dev/null
@@ -0,0 +1,12 @@
+Files:
+tests/test-time-h.c
+
+Depends-on:
+assert-h
+time-h-c++-tests
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-time-h
+check_PROGRAMS += test-time-h
diff --git a/modules/time-tests b/modules/time-tests
deleted file mode 100644 (file)
index e367565..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-Files:
-tests/test-time.c
-
-Depends-on:
-assert-h
-time-c++-tests
-
-configure.ac:
-
-Makefile.am:
-TESTS += test-time
-check_PROGRAMS += test-time
index 6f11b65c955735b4205336972925432de12831cc..7d5fddd1f22505a7f8867ef8a2306f1d1f965571 100644 (file)
@@ -7,7 +7,7 @@ m4/time_r.m4
 
 Depends-on:
 extensions
-time
+time-h
 
 configure.ac:
 gl_TIME_R
index fe8a33e6991da5c91ca373ba81f2bc07ae7f1293..f487e24c6b3d4fa275ce2b2de650932584164b9b 100644 (file)
@@ -9,7 +9,7 @@ m4/time_rz.m4
 Depends-on:
 c99
 extensions
-time
+time-h
 flexmember     [test $HAVE_TIMEZONE_T = 0]
 idx            [test $HAVE_TIMEZONE_T = 0]
 setenv         [test $HAVE_TIMEZONE_T = 0]
index 3d8771e58d42fb586e7fc5a6994d419ea1708312..738eb40bdbd083c5b891a84eb05b84dd3af7c549 100644 (file)
@@ -7,7 +7,7 @@ lib/timegm.c
 m4/timegm.m4
 
 Depends-on:
-time
+time-h
 mktime-internal [test $HAVE_TIMEGM = 0 || test $REPLACE_TIMEGM = 1]
 time_r          [test $HAVE_TIMEGM = 0 || test $REPLACE_TIMEGM = 1]
 
index 6fac24c0220b8d3ae11ff386098b90fbc2843dcc..642d2010e708094e6d3714bb0d20732f82421515 100644 (file)
@@ -9,7 +9,7 @@ m4/timespec.m4
 Depends-on:
 extern-inline
 snippet/arg-nonnull
-time
+time-h
 
 configure.ac:
 gl_TIMESPEC
index 7b3dc3b01dda198f5002ae01b0248a7e4f77d55c..b0c5e008f99cff8102ddfb802a871919f1169e82 100644 (file)
@@ -6,7 +6,7 @@ lib/timespec_get.c
 m4/timespec_get.m4
 
 Depends-on:
-time
+time-h
 extensions
 gettime         [test $HAVE_TIMESPEC_GET = 0 || test $REPLACE_TIMESPEC_GET = 1]
 
index 7dc67bab783414ad03243aabd54e3643e9940917..07920a414e98be01b2a6415748e8305f850fce33 100644 (file)
@@ -7,7 +7,7 @@ m4/timespec_getres.m4
 
 Depends-on:
 extensions
-time
+time-h
 gettime-res     [test $HAVE_TIMESPEC_GETRES = 0]
 
 configure.ac:
index 4997bf099251ea5955930d2408bf5cbf9eafe319..ade021195c7c1743b44b4ef2afdb57891dac4ae7 100644 (file)
@@ -6,7 +6,7 @@ lib/tzset.c
 m4/tzset.m4
 
 Depends-on:
-time
+time-h
 
 configure.ac:
 gl_FUNC_TZSET
index 43241f4b8648faebb71bf3946aa1e3bcd9ffdc7a..531c685eb5188880599f425ad5903dc4442e4600 100644 (file)
@@ -4,7 +4,7 @@ tests/signature.h
 tests/macros.h
 
 Depends-on:
-time
+time-h
 
 configure.ac:
 
index b61c26a0f88dad1e82f6d4d11b70384995158e9e..319b5281e72b31e0ce3751b1af0d1dd917571821 100644 (file)
@@ -7,7 +7,7 @@ m4/utime.m4
 
 Depends-on:
 utime-h
-time
+time-h
 filename        [test $HAVE_UTIME = 0 || test $REPLACE_UTIME = 1]
 malloca         [test $HAVE_UTIME = 0 || test $REPLACE_UTIME = 1]
 stat            [test $HAVE_UTIME = 0 || test $REPLACE_UTIME = 1]
index af6b8c2898d72f6bc29f7f0bdadfd7c59d764bb9..7dd9548a27d0b4ed3709354c2b20cb8e879f9d2a 100644 (file)
@@ -11,7 +11,7 @@ dirname-lgpl
 fstatat
 hash
 stat-time
-time
+time-h
 utimensat
 intprops
 stdbool
index 73f757021eb7a00334baf5ccb8c9e75765f38e1e..49e15f61273de83f856cc250129d65acfd3fd435 100644 (file)
@@ -20,7 +20,7 @@ stat-time
 stdbool
 sys_stat
 sys_time
-time
+time-h
 utime
 utime-h
 
index b370bf989aacb6e986b9e22d9aec77fe8b85ac2d..d9c1aa6605fe327c300abbd77a026be60b3e83d3 100644 (file)
@@ -9,7 +9,7 @@ lib/windows-initguard.h
 Depends-on:
 stdbool
 errno
-time
+time-h
 gettimeofday
 
 configure.ac:
index 6c3868c49819cbccf2a38ffc984617c4e9ab0d36..c3ed4420b16d65e2bcf913edbfa9dcc283cb2b16 100644 (file)
@@ -8,7 +8,7 @@ lib/windows-initguard.h
 
 Depends-on:
 errno
-time
+time-h
 gettimeofday
 
 configure.ac:
index b17113457f077ee0162a8609b745ea4f9f2c93b6..f61c9e1d0f2dd58cf49e46a3e48f03787ad9d052 100644 (file)
@@ -8,7 +8,7 @@ lib/windows-initguard.h
 
 Depends-on:
 errno
-time
+time-h
 gettimeofday
 
 configure.ac:
index 466e7339b1c1983bba651749e9732720403e33be..bd7775603334b2a5b4e94b2410f4677f1c3bb7ab 100644 (file)
@@ -9,7 +9,7 @@ lib/windows-initguard.h
 Depends-on:
 errno
 stdbool
-time
+time-h
 gettimeofday
 
 configure.ac:
index 034eab9f2d9fe1e2ad0cd4ce5becec3e2017fc8a..80e6a3aa159ed600fe50310ffce45f435e475b54 100644 (file)
@@ -11,7 +11,7 @@ c99
 dtotimespec
 intprops
 nanosleep
-time
+time-h
 unistd
 
 configure.ac:
diff --git a/tests/test-time-c++.cc b/tests/test-time-c++.cc
deleted file mode 100644 (file)
index 70b2a0f..0000000
+++ /dev/null
@@ -1,90 +0,0 @@
-/* Test of <time.h> substitute in C++ mode.
-   Copyright (C) 2010-2023 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 <time.h>
-
-#include "signature.h"
-
-
-#if GNULIB_TEST_TIMESPEC_GET
-SIGNATURE_CHECK (GNULIB_NAMESPACE::timespec_get, int, (struct timespec *, int));
-#endif
-
-#if GNULIB_TEST_NANOSLEEP
-SIGNATURE_CHECK (GNULIB_NAMESPACE::nanosleep, int,
-                 (struct timespec const *, struct timespec *));
-#endif
-
-#if GNULIB_TEST_TZSET
-SIGNATURE_CHECK (GNULIB_NAMESPACE::tzset, void, (void));
-#endif
-
-#if GNULIB_TEST_MKTIME
-SIGNATURE_CHECK (GNULIB_NAMESPACE::mktime, time_t, (struct tm *));
-#endif
-
-#if GNULIB_TEST_TIME_R
-SIGNATURE_CHECK (GNULIB_NAMESPACE::localtime_r, struct tm *,
-                 (time_t const *, struct tm *));
-
-SIGNATURE_CHECK (GNULIB_NAMESPACE::gmtime_r, struct tm *,
-                 (time_t const *, struct tm *));
-#endif
-
-#if GNULIB_TEST_LOCALTIME
-SIGNATURE_CHECK (GNULIB_NAMESPACE::localtime, struct tm *, (time_t const *));
-#endif
-
-#if 0
-SIGNATURE_CHECK (GNULIB_NAMESPACE::gmtime, struct tm *, (time_t const *));
-#endif
-
-#if GNULIB_TEST_STRPTIME
-SIGNATURE_CHECK (GNULIB_NAMESPACE::strptime, char *,
-                 (char const *, char const *, struct tm *));
-#endif
-
-#if GNULIB_TEST_CTIME
-SIGNATURE_CHECK (GNULIB_NAMESPACE::ctime, char *, (time_t const *));
-#endif
-
-#if GNULIB_TEST_STRFTIME
-SIGNATURE_CHECK (GNULIB_NAMESPACE::strftime, size_t,
-                 (char *, size_t, const char *, const struct tm *));
-#endif
-
-#if GNULIB_TEST_TIMERZ
-SIGNATURE_CHECK (GNULIB_NAMESPACE::tzalloc, timezone_t, (char const *));
-SIGNATURE_CHECK (GNULIB_NAMESPACE::tzfree, void, (timezone_t));
-SIGNATURE_CHECK (GNULIB_NAMESPACE::localtime_rz, struct tm *,
-                 (timezone_t, time_t const *, struct tm *));
-SIGNATURE_CHECK (GNULIB_NAMESPACE::mktime_z, time_t, (timezone_t, struct tm *));
-#endif
-
-#if GNULIB_TEST_TIMEGM
-SIGNATURE_CHECK (GNULIB_NAMESPACE::timegm, time_t, (struct tm *));
-#endif
-
-
-int
-main ()
-{
-}
diff --git a/tests/test-time-c++2.cc b/tests/test-time-c++2.cc
deleted file mode 100644 (file)
index 7c4dceb..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-/* Test of <time.h> substitute in C++ mode.
-   Copyright (C) 2010-2023 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/>.  */
-
-#define GNULIB_NAMESPACE gnulib
-#include <config.h>
-
-#include <ctime>
diff --git a/tests/test-time-h-c++.cc b/tests/test-time-h-c++.cc
new file mode 100644 (file)
index 0000000..70b2a0f
--- /dev/null
@@ -0,0 +1,90 @@
+/* Test of <time.h> substitute in C++ mode.
+   Copyright (C) 2010-2023 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 <time.h>
+
+#include "signature.h"
+
+
+#if GNULIB_TEST_TIMESPEC_GET
+SIGNATURE_CHECK (GNULIB_NAMESPACE::timespec_get, int, (struct timespec *, int));
+#endif
+
+#if GNULIB_TEST_NANOSLEEP
+SIGNATURE_CHECK (GNULIB_NAMESPACE::nanosleep, int,
+                 (struct timespec const *, struct timespec *));
+#endif
+
+#if GNULIB_TEST_TZSET
+SIGNATURE_CHECK (GNULIB_NAMESPACE::tzset, void, (void));
+#endif
+
+#if GNULIB_TEST_MKTIME
+SIGNATURE_CHECK (GNULIB_NAMESPACE::mktime, time_t, (struct tm *));
+#endif
+
+#if GNULIB_TEST_TIME_R
+SIGNATURE_CHECK (GNULIB_NAMESPACE::localtime_r, struct tm *,
+                 (time_t const *, struct tm *));
+
+SIGNATURE_CHECK (GNULIB_NAMESPACE::gmtime_r, struct tm *,
+                 (time_t const *, struct tm *));
+#endif
+
+#if GNULIB_TEST_LOCALTIME
+SIGNATURE_CHECK (GNULIB_NAMESPACE::localtime, struct tm *, (time_t const *));
+#endif
+
+#if 0
+SIGNATURE_CHECK (GNULIB_NAMESPACE::gmtime, struct tm *, (time_t const *));
+#endif
+
+#if GNULIB_TEST_STRPTIME
+SIGNATURE_CHECK (GNULIB_NAMESPACE::strptime, char *,
+                 (char const *, char const *, struct tm *));
+#endif
+
+#if GNULIB_TEST_CTIME
+SIGNATURE_CHECK (GNULIB_NAMESPACE::ctime, char *, (time_t const *));
+#endif
+
+#if GNULIB_TEST_STRFTIME
+SIGNATURE_CHECK (GNULIB_NAMESPACE::strftime, size_t,
+                 (char *, size_t, const char *, const struct tm *));
+#endif
+
+#if GNULIB_TEST_TIMERZ
+SIGNATURE_CHECK (GNULIB_NAMESPACE::tzalloc, timezone_t, (char const *));
+SIGNATURE_CHECK (GNULIB_NAMESPACE::tzfree, void, (timezone_t));
+SIGNATURE_CHECK (GNULIB_NAMESPACE::localtime_rz, struct tm *,
+                 (timezone_t, time_t const *, struct tm *));
+SIGNATURE_CHECK (GNULIB_NAMESPACE::mktime_z, time_t, (timezone_t, struct tm *));
+#endif
+
+#if GNULIB_TEST_TIMEGM
+SIGNATURE_CHECK (GNULIB_NAMESPACE::timegm, time_t, (struct tm *));
+#endif
+
+
+int
+main ()
+{
+}
diff --git a/tests/test-time-h-c++2.cc b/tests/test-time-h-c++2.cc
new file mode 100644 (file)
index 0000000..7c4dceb
--- /dev/null
@@ -0,0 +1,20 @@
+/* Test of <time.h> substitute in C++ mode.
+   Copyright (C) 2010-2023 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/>.  */
+
+#define GNULIB_NAMESPACE gnulib
+#include <config.h>
+
+#include <ctime>
diff --git a/tests/test-time-h.c b/tests/test-time-h.c
new file mode 100644 (file)
index 0000000..2240705
--- /dev/null
@@ -0,0 +1,43 @@
+/* Test of <time.h> substitute.
+   Copyright (C) 2007, 2009-2023 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 <time.h>
+
+/* Check that the types are all defined.  */
+struct timespec t1;
+#if 0
+/* POSIX:2008 does not require pid_t in <time.h> unconditionally, and indeed
+   it's missing on Mac OS X 10.5, FreeBSD 6.4, OpenBSD 4.9, mingw.  */
+pid_t t2;
+#endif
+
+/* Check that NULL can be passed through varargs as a pointer type,
+   per POSIX 2008.  */
+static_assert (sizeof NULL == sizeof (void *));
+
+/* Check that TIME_UTC is defined and a positive integer.  */
+int t3 = TIME_UTC;
+static_assert (TIME_UTC > 0);
+
+int
+main (void)
+{
+  return 0;
+}
diff --git a/tests/test-time.c b/tests/test-time.c
deleted file mode 100644 (file)
index 2240705..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-/* Test of <time.h> substitute.
-   Copyright (C) 2007, 2009-2023 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 <time.h>
-
-/* Check that the types are all defined.  */
-struct timespec t1;
-#if 0
-/* POSIX:2008 does not require pid_t in <time.h> unconditionally, and indeed
-   it's missing on Mac OS X 10.5, FreeBSD 6.4, OpenBSD 4.9, mingw.  */
-pid_t t2;
-#endif
-
-/* Check that NULL can be passed through varargs as a pointer type,
-   per POSIX 2008.  */
-static_assert (sizeof NULL == sizeof (void *));
-
-/* Check that TIME_UTC is defined and a positive integer.  */
-int t3 = TIME_UTC;
-static_assert (TIME_UTC > 0);
-
-int
-main (void)
-{
-  return 0;
-}