gettimeofday: port recent C++ fix to Emacs
[gnulib.git] / modules / time
1 Description:
2 A more-standard <time.h>.
3
4 Files:
5 lib/time.in.h
6 m4/time_h.m4
7
8 Depends-on:
9 extensions
10 gettimeofday
11 include_next
12 snippet/arg-nonnull
13 snippet/c++defs
14 snippet/warn-on-use
15 stddef
16
17 configure.ac:
18 gl_HEADER_TIME_H
19
20 Makefile.am:
21 BUILT_SOURCES += time.h
22
23 # We need the following in order to create <time.h> when the system
24 # doesn't have one that works with the given compiler.
25 time.h: time.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
26         $(AM_V_GEN)rm -f $@-t $@ && \
27         { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
28           sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \
29               -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
30               -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
31               -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
32               -e 's|@''NEXT_TIME_H''@|$(NEXT_TIME_H)|g' \
33               -e 's/@''GNULIB_GETTIMEOFDAY''@/$(GNULIB_GETTIMEOFDAY)/g' \
34               -e 's/@''GNULIB_MKTIME''@/$(GNULIB_MKTIME)/g' \
35               -e 's/@''GNULIB_NANOSLEEP''@/$(GNULIB_NANOSLEEP)/g' \
36               -e 's/@''GNULIB_STRPTIME''@/$(GNULIB_STRPTIME)/g' \
37               -e 's/@''GNULIB_TIMEGM''@/$(GNULIB_TIMEGM)/g' \
38               -e 's/@''GNULIB_TIME_R''@/$(GNULIB_TIME_R)/g' \
39               -e 's|@''HAVE_DECL_LOCALTIME_R''@|$(HAVE_DECL_LOCALTIME_R)|g' \
40               -e 's|@''HAVE_NANOSLEEP''@|$(HAVE_NANOSLEEP)|g' \
41               -e 's|@''HAVE_STRPTIME''@|$(HAVE_STRPTIME)|g' \
42               -e 's|@''HAVE_TIMEGM''@|$(HAVE_TIMEGM)|g' \
43               -e 's|@''REPLACE_GMTIME''@|$(REPLACE_GMTIME)|g' \
44               -e 's|@''REPLACE_LOCALTIME''@|$(REPLACE_LOCALTIME)|g' \
45               -e 's|@''REPLACE_LOCALTIME_R''@|$(REPLACE_LOCALTIME_R)|g' \
46               -e 's|@''REPLACE_MKTIME''@|$(REPLACE_MKTIME)|g' \
47               -e 's|@''REPLACE_NANOSLEEP''@|$(REPLACE_NANOSLEEP)|g' \
48               -e 's|@''REPLACE_TIMEGM''@|$(REPLACE_TIMEGM)|g' \
49               -e 's|@''PTHREAD_H_DEFINES_STRUCT_TIMESPEC''@|$(PTHREAD_H_DEFINES_STRUCT_TIMESPEC)|g' \
50               -e 's|@''SYS_TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(SYS_TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \
51               -e 's|@''TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \
52               -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
53               -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
54               -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
55               < $(srcdir)/time.in.h; \
56         } > $@-t && \
57         mv $@-t $@
58 MOSTLYCLEANFILES += time.h time.h-t
59
60 Include:
61 <time.h>
62
63 License:
64 LGPLv2+
65
66 Maintainer:
67 all