summaryrefslogtreecommitdiff
path: root/lib/sys_time.in.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sys_time.in.h')
-rw-r--r--lib/sys_time.in.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/sys_time.in.h b/lib/sys_time.in.h
index fda89d7b904..4a301c48ba1 100644
--- a/lib/sys_time.in.h
+++ b/lib/sys_time.in.h
@@ -24,6 +24,13 @@
#endif
@PRAGMA_COLUMNS@
+/* This file uses #include_next of a system file that defines time_t.
+ For the 'year2038' module to work right, <config.h> needs to have been
+ included before. */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
/* On Cygwin and on many BSDish systems, <sys/time.h> includes itself
recursively via <sys/select.h>.
Simply delegate to the system's header in this case; it is a no-op.
@@ -41,6 +48,11 @@
#ifndef _@GUARD_PREFIX@_SYS_TIME_H
#define _@GUARD_PREFIX@_SYS_TIME_H
+/* This file uses GNULIB_POSIXCHECK, HAVE_RAW_DECL_*. */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
#if ! @HAVE_SYS_TIME_H@
# include <time.h>
#endif