]> Savannah Git Hosting - gnulib.git/commitdiff
year2038: Add reminder to include <config.h> before time_t gets defined.
authorBruno Haible <bruno@clisp.org>
Fri, 14 Apr 2023 10:52:25 +0000 (12:52 +0200)
committerBruno Haible <bruno@clisp.org>
Fri, 14 Apr 2023 10:52:25 +0000 (12:52 +0200)
* 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.

ChangeLog
lib/sched.in.h
lib/sys_select.in.h
lib/sys_stat.in.h
lib/sys_time.in.h
lib/sys_types.in.h
lib/time.in.h
lib/utime.in.h
modules/year2038

index 58a28aef689b018dcd09bd775927b9e962ef9dab..d547837fe16082223b6cff5b2c62521fcf2617e4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,17 @@
 2023-04-14  Bruno Haible  <bruno@clisp.org>
 
+       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
+       #include_next.
+       * 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.
+
        sys_shm: New module.
        * lib/sys_shm.in.h: New file.
        * m4/sys_shm_h.m4: New file.
index 1f9d0d219ab217efadfc50b5bb414274825acc96..21aab5193809d061eed88b4e860a8a8965850940 100644 (file)
 #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
+
 /* The include_next requires a split double-inclusion guard.  */
 #if @HAVE_SCHED_H@
 # if @HAVE_SYS_CDEFS_H@
index ce57c7573ae672d3bed31914f87300cbf7e762cb..3abfc48af09ec32cd743f9c928db317624ea20d8 100644 (file)
 # 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>.
index 96bad04e3f08b614c542ad0a30c889378ece2247..ad4da17fa46d21e1da50ea4e3c58f4d6adbfac05 100644 (file)
 #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
+
 #if defined __need_system_sys_stat_h
 /* Special invocation convention.  */
 
index 5eb6173267c40a89f05f5edd87bbed85772f781d..59cce1440da93077355a858c3807e9d899f18fd6 100644 (file)
 #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.
index 082a6c674de0c0871a48f048548ae160c97947cd..ea77e140be90c23b730e78fabdec0c6bd3d6d308 100644 (file)
 #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
+
 #if defined _WIN32 && !defined __CYGWIN__ \
     && (defined __need_off_t || defined __need___off64_t \
         || defined __need_ssize_t || defined __need_time_t)
index 60e31897e4e8dc792f0712b4611cfdd350c3c8f6..84cb1fa9338b9a943e4ac7ab1f4589e111975018 100644 (file)
 #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
+
 /* Don't get in the way of glibc when it includes time.h merely to
    declare a few standard symbols, rather than to declare all the
    symbols.  (However, skip this for MinGW as it treats __need_time_t
index eeb485d495217b3adc5d8d29e444275544739cb7..da491697487d7ecf17f4bca20399974f7c6daa77 100644 (file)
 #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
+
 /* The include_next requires a split double-inclusion guard.  */
 #if @HAVE_UTIME_H@
 # @INCLUDE_NEXT@ @NEXT_UTIME_H@
index 5e6cc7c58becf97684f1674a4cb8f3a5e2a3874c..7a7b5d4eb55a33fae86513cf3aa3509a88072ac8 100644 (file)
@@ -10,6 +10,16 @@ Files:
 
 Depends-on:
 largefile
+sched
+sys_msg
+sys_select
+sys_sem
+sys_shm
+sys_stat
+sys_time
+sys_types
+time-h
+utime-h
 
 configure.ac-early:
 AC_REQUIRE([AC_SYS_YEAR2038])