bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

time-h: Renamed from time


From: Bruno Haible
Subject: time-h: Renamed from time
Date: Wed, 08 Mar 2023 11:02:11 +0100

I'm going to add a workaround for the time() function, as a module 'time'.

Like for fcntl, fnmatch, glob, iconv, malloc, poll, signal, utime, wctype, we
need to distinguish the module which provides/fixes the function and the module
which provides the header file.

So, to keep the usual conventions, the module 'time' must be renamed to 
'time-h'.

This is not likely to disturb the Gnulib users much, since most Gnulib using
packages request modules for function substitutes, not for header file
substitutes.


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.

diff --git a/NEWS b/NEWS
index 0ec377915c..ad7e1e69f5 100644
--- 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"
diff --git a/doc/posix-headers/time.texi b/doc/posix-headers/time.texi
index 3d81646454..5ecebbfdda 100644
--- a/doc/posix-headers/time.texi
+++ b/doc/posix-headers/time.texi
@@ -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
diff --git a/modules/cond b/modules/cond
index 43b2bd67de..5f2ea4edec 100644
--- a/modules/cond
+++ b/modules/cond
@@ -12,7 +12,7 @@ lock
 errno
 extern-inline
 stdbool
-time
+time-h
 windows-cond    [test $gl_threads_api = windows]
 
 configure.ac:
diff --git a/modules/ctime b/modules/ctime
index 08cc532986..11de22f2d9 100644
--- a/modules/ctime
+++ b/modules/ctime
@@ -10,7 +10,7 @@ lib/ctime.c
 m4/ctime.m4
 
 Depends-on:
-time
+time-h
 
 configure.ac:
 gl_FUNC_CTIME
diff --git a/modules/localtime b/modules/localtime
index 99a2d00dcd..7880775328 100644
--- a/modules/localtime
+++ b/modules/localtime
@@ -6,7 +6,7 @@ lib/localtime.c
 m4/localtime.m4
 
 Depends-on:
-time
+time-h
 
 configure.ac:
 gl_FUNC_LOCALTIME
diff --git a/modules/mktime b/modules/mktime
index 7594043e6d..b3ba650a93 100644
--- a/modules/mktime
+++ b/modules/mktime
@@ -7,7 +7,7 @@ lib/mktime.c
 m4/mktime.m4
 
 Depends-on:
-time
+time-h
 c99
 multiarch
 intprops        [test $REPLACE_MKTIME = 1]
diff --git a/modules/nanosleep b/modules/nanosleep
index 8fa659b752..270bfd46d3 100644
--- a/modules/nanosleep
+++ b/modules/nanosleep
@@ -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]
diff --git a/modules/parse-datetime b/modules/parse-datetime
index 72aa6af659..ef281dcf30 100644
--- a/modules/parse-datetime
+++ b/modules/parse-datetime
@@ -23,7 +23,7 @@ mktime
 nstrftime
 setenv
 unsetenv
-time
+time-h
 time_r
 time_rz
 timegm
diff --git a/modules/posixcheck b/modules/posixcheck
index fac9fea75b..2615c8597b 100644
--- a/modules/posixcheck
+++ b/modules/posixcheck
@@ -40,7 +40,7 @@ sys_times
 sys_utsname
 sys_wait
 termios
-time
+time-h
 unistd
 utime-h
 wchar
diff --git a/modules/pthread-h b/modules/pthread-h
index a505f8a887..2771f44151 100644
--- a/modules/pthread-h
+++ b/modules/pthread-h
@@ -11,7 +11,7 @@ extensions
 extern-inline
 gen-header
 sched
-time
+time-h
 snippet/c++defs
 snippet/_Noreturn
 snippet/arg-nonnull
diff --git a/modules/stat-time b/modules/stat-time
index 92120ace8c..d4c0378dba 100644
--- a/modules/stat-time
+++ b/modules/stat-time
@@ -7,7 +7,7 @@ lib/stat-time.c
 m4/stat-time.m4
 
 Depends-on:
-time
+time-h
 errno
 extensions
 extern-inline
diff --git a/modules/stat-time-tests b/modules/stat-time-tests
index aa4e31c35c..0a8193783d 100644
--- a/modules/stat-time-tests
+++ b/modules/stat-time-tests
@@ -6,7 +6,7 @@ tests/nap.h
 Depends-on:
 nanosleep
 stdckdint
-time
+time-h
 unistd
 
 configure.ac:
diff --git a/modules/strftime-fixes b/modules/strftime-fixes
index 38a17fcfc3..626ab04268 100644
--- a/modules/strftime-fixes
+++ b/modules/strftime-fixes
@@ -6,7 +6,7 @@ lib/strftime-fixes.c
 m4/strftime-fixes.m4
 
 Depends-on:
-time
+time-h
 
 configure.ac:
 gl_FUNC_STRFTIME
diff --git a/modules/strptime b/modules/strptime
index bcbfa27782..4fe2c5ef69 100644
--- a/modules/strptime
+++ b/modules/strptime
@@ -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]
diff --git a/modules/sys_stat b/modules/sys_stat
index d5ab154157..233224e835 100644
--- a/modules/sys_stat
+++ b/modules/sys_stat
@@ -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
diff --git a/modules/tempname b/modules/tempname
index 292c990dea..25d27f3e56 100644
--- a/modules/tempname
+++ b/modules/tempname
@@ -19,7 +19,7 @@ mkdir
 stdbool
 stdint
 sys_stat
-time
+time-h
 
 configure.ac:
 gl_FUNC_GEN_TEMPNAME
diff --git a/modules/threads-h b/modules/threads-h
index e35a5e265b..50a60dfdab 100644
--- a/modules/threads-h
+++ b/modules/threads-h
@@ -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-h-c++-tests b/modules/time-h-c++-tests
index 7a22d92cdc..814556be60 100644
--- a/modules/time-h-c++-tests
+++ b/modules/time-h-c++-tests
@@ -1,6 +1,6 @@
 Files:
-tests/test-time-c++.cc
-tests/test-time-c++2.cc
+tests/test-time-h-c++.cc
+tests/test-time-h-c++2.cc
 tests/signature.h
 
 Status:
@@ -13,8 +13,8 @@ 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)
+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
index e367565ece..d7bf897c41 100644
--- a/modules/time-h-tests
+++ b/modules/time-h-tests
@@ -1,12 +1,12 @@
 Files:
-tests/test-time.c
+tests/test-time-h.c
 
 Depends-on:
 assert-h
-time-c++-tests
+time-h-c++-tests
 
 configure.ac:
 
 Makefile.am:
-TESTS += test-time
-check_PROGRAMS += test-time
+TESTS += test-time-h
+check_PROGRAMS += test-time-h
diff --git a/modules/time_r b/modules/time_r
index 6f11b65c95..7d5fddd1f2 100644
--- a/modules/time_r
+++ b/modules/time_r
@@ -7,7 +7,7 @@ m4/time_r.m4
 
 Depends-on:
 extensions
-time
+time-h
 
 configure.ac:
 gl_TIME_R
diff --git a/modules/time_rz b/modules/time_rz
index fe8a33e699..f487e24c6b 100644
--- a/modules/time_rz
+++ b/modules/time_rz
@@ -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]
diff --git a/modules/timegm b/modules/timegm
index 3d8771e58d..738eb40bdb 100644
--- a/modules/timegm
+++ b/modules/timegm
@@ -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]
 
diff --git a/modules/timespec b/modules/timespec
index 6fac24c022..642d2010e7 100644
--- a/modules/timespec
+++ b/modules/timespec
@@ -9,7 +9,7 @@ m4/timespec.m4
 Depends-on:
 extern-inline
 snippet/arg-nonnull
-time
+time-h
 
 configure.ac:
 gl_TIMESPEC
diff --git a/modules/timespec_get b/modules/timespec_get
index 7b3dc3b01d..b0c5e008f9 100644
--- a/modules/timespec_get
+++ b/modules/timespec_get
@@ -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]
 
diff --git a/modules/timespec_getres b/modules/timespec_getres
index 7dc67bab78..07920a414e 100644
--- a/modules/timespec_getres
+++ b/modules/timespec_getres
@@ -7,7 +7,7 @@ m4/timespec_getres.m4
 
 Depends-on:
 extensions
-time
+time-h
 gettime-res     [test $HAVE_TIMESPEC_GETRES = 0]
 
 configure.ac:
diff --git a/modules/tzset b/modules/tzset
index 4997bf0992..ade021195c 100644
--- a/modules/tzset
+++ b/modules/tzset
@@ -6,7 +6,7 @@ lib/tzset.c
 m4/tzset.m4
 
 Depends-on:
-time
+time-h
 
 configure.ac:
 gl_FUNC_TZSET
diff --git a/modules/usleep-tests b/modules/usleep-tests
index 43241f4b86..531c685eb5 100644
--- a/modules/usleep-tests
+++ b/modules/usleep-tests
@@ -4,7 +4,7 @@ tests/signature.h
 tests/macros.h
 
 Depends-on:
-time
+time-h
 
 configure.ac:
 
diff --git a/modules/utime b/modules/utime
index b61c26a0f8..319b5281e7 100644
--- a/modules/utime
+++ b/modules/utime
@@ -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]
diff --git a/modules/utimecmp b/modules/utimecmp
index af6b8c2898..7dd9548a27 100644
--- a/modules/utimecmp
+++ b/modules/utimecmp
@@ -11,7 +11,7 @@ dirname-lgpl
 fstatat
 hash
 stat-time
-time
+time-h
 utimensat
 intprops
 stdbool
diff --git a/modules/utimens b/modules/utimens
index 73f757021e..49e15f6127 100644
--- a/modules/utimens
+++ b/modules/utimens
@@ -20,7 +20,7 @@ stat-time
 stdbool
 sys_stat
 sys_time
-time
+time-h
 utime
 utime-h
 
diff --git a/modules/windows-cond b/modules/windows-cond
index b370bf989a..d9c1aa6605 100644
--- a/modules/windows-cond
+++ b/modules/windows-cond
@@ -9,7 +9,7 @@ lib/windows-initguard.h
 Depends-on:
 stdbool
 errno
-time
+time-h
 gettimeofday
 
 configure.ac:
diff --git a/modules/windows-timedmutex b/modules/windows-timedmutex
index 6c3868c498..c3ed4420b1 100644
--- a/modules/windows-timedmutex
+++ b/modules/windows-timedmutex
@@ -8,7 +8,7 @@ lib/windows-initguard.h
 
 Depends-on:
 errno
-time
+time-h
 gettimeofday
 
 configure.ac:
diff --git a/modules/windows-timedrecmutex b/modules/windows-timedrecmutex
index b17113457f..f61c9e1d0f 100644
--- a/modules/windows-timedrecmutex
+++ b/modules/windows-timedrecmutex
@@ -8,7 +8,7 @@ lib/windows-initguard.h
 
 Depends-on:
 errno
-time
+time-h
 gettimeofday
 
 configure.ac:
diff --git a/modules/windows-timedrwlock b/modules/windows-timedrwlock
index 466e7339b1..bd77756033 100644
--- a/modules/windows-timedrwlock
+++ b/modules/windows-timedrwlock
@@ -9,7 +9,7 @@ lib/windows-initguard.h
 Depends-on:
 errno
 stdbool
-time
+time-h
 gettimeofday
 
 configure.ac:
diff --git a/modules/xnanosleep b/modules/xnanosleep
index 034eab9f2d..80e6a3aa15 100644
--- a/modules/xnanosleep
+++ b/modules/xnanosleep
@@ -11,7 +11,7 @@ c99
 dtotimespec
 intprops
 nanosleep
-time
+time-h
 unistd
 
 configure.ac:






reply via email to

[Prev in Thread] Current Thread [Next in Thread]