summaryrefslogtreecommitdiff
path: root/lib/sys_select.in.h
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2023-04-14 12:52:25 +0200
committerBruno Haible <bruno@clisp.org>2023-04-14 12:52:25 +0200
commit97c4d3318909ba49003e12cac208ac40581dd4ae (patch)
tree960d6cc4c9e3704af5e7085f725b91a23b386ef7 /lib/sys_select.in.h
parent09596027f260ff0de0e9932b88b90e0d06c71b6f (diff)
downloadgnulib-97c4d3318909ba49003e12cac208ac40581dd4ae.tar.gz
year2038: Add reminder to include <config.h> before time_t gets defined.
* lib/sched.in.h: Check that config.h was already included before the * lib/sys_select.in.h: Likewise. * lib/sys_stat.in.h: Likewise. * lib/sys_time.in.h: Likewise. * lib/sys_types.in.h: Likewise. * lib/time.in.h: Likewise. * lib/utime.in.h: Likewise. * modules/year2038 (Depends-on): Add sched, sys_msg, sys_select, sys_sem, sys_shm, sys_stat, sys_time, sys_types, time-h, utime-h.
Diffstat (limited to 'lib/sys_select.in.h')
-rw-r--r--lib/sys_select.in.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/sys_select.in.h b/lib/sys_select.in.h
index ce57c7573a..3abfc48af0 100644
--- a/lib/sys_select.in.h
+++ b/lib/sys_select.in.h
@@ -19,6 +19,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 OSF/1 and Solaris 2.6, <sys/types.h> and <sys/time.h>
both include <sys/select.h>.
On Cygwin and OpenBSD, <sys/time.h> includes <sys/select.h>.