summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2010-03-08 01:45:46 +0100
committerBruno Haible <bruno@clisp.org>2010-03-08 03:11:14 +0100
commit5f04866f4c867e67b1c5573b86a7e20ef890e535 (patch)
tree1da652bef0e3d088d712f1a8d9e0800a22f695df /modules
parente650136cc4a199e64a3b3401cf7e2195b0f3a3ac (diff)
downloadgnulib-5f04866f4c867e67b1c5573b86a7e20ef890e535.tar.gz
time: Avoid #define replacements in C++ mode.
Diffstat (limited to 'modules')
-rw-r--r--modules/mktime1
-rw-r--r--modules/nanosleep1
-rw-r--r--modules/strptime1
-rw-r--r--modules/time26
-rw-r--r--modules/timegm1
5 files changed, 21 insertions, 9 deletions
diff --git a/modules/mktime b/modules/mktime
index 037f4e475d..d5b0ee7954 100644
--- a/modules/mktime
+++ b/modules/mktime
@@ -12,6 +12,7 @@ time_r
configure.ac:
gl_FUNC_MKTIME
+gl_TIME_MODULE_INDICATOR([mktime])
Makefile.am:
diff --git a/modules/nanosleep b/modules/nanosleep
index d457b6f049..dfe1c7acbe 100644
--- a/modules/nanosleep
+++ b/modules/nanosleep
@@ -19,6 +19,7 @@ verify
configure.ac:
gl_FUNC_NANOSLEEP
+gl_TIME_MODULE_INDICATOR([nanosleep])
Makefile.am:
diff --git a/modules/strptime b/modules/strptime
index 74570f5a89..667d55245c 100644
--- a/modules/strptime
+++ b/modules/strptime
@@ -17,6 +17,7 @@ time_r
configure.ac:
gl_FUNC_STRPTIME
+gl_TIME_MODULE_INDICATOR([strptime])
Makefile.am:
diff --git a/modules/time b/modules/time
index ed89cf9bd9..02c7a20b26 100644
--- a/modules/time
+++ b/modules/time
@@ -9,6 +9,8 @@ Depends-on:
extensions
include_next
arg-nonnull
+c++defs
+warn-on-use
stddef
configure.ac:
@@ -19,20 +21,26 @@ 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 $(ARG_NONNULL_H)
+time.h: time.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
$(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
- -e 's|@NEXT_TIME_H''@|$(NEXT_TIME_H)|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_STRPTIME''@|$(REPLACE_STRPTIME)|g' \
- -e 's|@REPLACE_TIMEGM''@|$(REPLACE_TIMEGM)|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|@''NEXT_TIME_H''@|$(NEXT_TIME_H)|g' \
+ -e 's|@''GNULIB_MKTIME''@|$(GNULIB_MKTIME)|g' \
+ -e 's|@''GNULIB_NANOSLEEP''@|$(GNULIB_NANOSLEEP)|g' \
+ -e 's|@''GNULIB_STRPTIME''@|$(GNULIB_STRPTIME)|g' \
+ -e 's|@''GNULIB_TIMEGM''@|$(GNULIB_TIMEGM)|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_STRPTIME''@|$(REPLACE_STRPTIME)|g' \
+ -e 's|@''REPLACE_TIMEGM''@|$(REPLACE_TIMEGM)|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 '/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 && \
mv $@-t $@
diff --git a/modules/timegm b/modules/timegm
index f1de726435..91623cf75b 100644
--- a/modules/timegm
+++ b/modules/timegm
@@ -13,6 +13,7 @@ time_r
configure.ac:
gl_FUNC_TIMEGM
+gl_TIME_MODULE_INDICATOR([timegm])
Makefile.am: