summaryrefslogtreecommitdiff
path: root/modules/time
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2023-03-08 17:00:48 +0100
committerBruno Haible <bruno@clisp.org>2023-03-08 17:01:54 +0100
commitcbc0c1cda32bbcfab3ed0391cb9cfde444323571 (patch)
treee0a312f54ebc5cfad764e3a869fcf4b23f4563bc /modules/time
parent3ef8e9910ae8f0e5d63cff8f37e22bb5aa9109ae (diff)
downloadgnulib-cbc0c1cda32bbcfab3ed0391cb9cfde444323571.tar.gz
time: New module.
* lib/time.in.h (time): New declaration. * lib/time.c: New file. * m4/time_h.m4 (gl_TIME_H_REQUIRE_DEFAULTS): Initialize GNULIB_TIME. (gl_TIME_H_DEFAULTS): Initialize REPLACE_TIME. * m4/time.m4: New file. * modules/time-h (Makefile.am): Substitute GNULIB_TIME, REPLACE_TIME. * modules/time: New file. * tests/test-time-h-c++.cc: Check the signature of GNULIB_NAMESPACE::time. * doc/posix-functions/time.texi: Mention the glibc problem and the 'time' module.
Diffstat (limited to 'modules/time')
-rw-r--r--modules/time31
1 files changed, 31 insertions, 0 deletions
diff --git a/modules/time b/modules/time
new file mode 100644
index 0000000000..45f5ffd35f
--- /dev/null
+++ b/modules/time
@@ -0,0 +1,31 @@
+Description:
+time() function: return current time.
+
+Files:
+lib/time.c
+m4/time.m4
+
+Depends-on:
+time-h
+
+configure.ac:
+gl_FUNC_TIME
+gl_CONDITIONAL([GL_COND_OBJ_TIME], [test $REPLACE_TIME = 1])
+AM_COND_IF([GL_COND_OBJ_TIME], [
+ gl_PREREQ_TIME
+])
+gl_TIME_MODULE_INDICATOR([time])
+
+Makefile.am:
+if GL_COND_OBJ_TIME
+lib_SOURCES += time.c
+endif
+
+Include:
+<time.h>
+
+License:
+LGPLv2+
+
+Maintainer:
+all