From 5838f795dcf00e4e1a5d457b95b96e1244cf732b Mon Sep 17 00:00:00 2001 From: Thien-Thi Nguyen Date: Tue, 2 Mar 2021 22:58:33 -0500 Subject: [PATCH] [slog] No longer use TIME_WITH_SYS_TIME MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * configure.ac (struct tm.tm_gmtoff): Simplify conditional preproc expression to not use ‘TIME_WITH_SYS_TIME’, and instead #include unconditionally. * libguile/filesys.c: Simplify conditional preproc expression to not use ‘TIME_WITH_SYS_TIME’, and instead #include unconditionally. * libguile/posix.c: Likewise. * libguile/gen-scmconfig.c: Likewise, for generation code. --- configure.ac | 9 +-------- libguile/filesys.c | 10 ++-------- libguile/gen-scmconfig.c | 12 ++---------- libguile/posix.c | 10 ++-------- 4 files changed, 7 insertions(+), 34 deletions(-) diff --git a/configure.ac b/configure.ac index e8305fe0e..b2f623342 100644 --- a/configure.ac +++ b/configure.ac @@ -1214,15 +1214,8 @@ AC_CHECK_MEMBERS([struct stat.st_rdev, struct stat.st_blksize, struct stat.st_bl AC_STRUCT_TIMEZONE AC_CHECK_MEMBERS([struct tm.tm_gmtoff],,, [#include -#ifdef TIME_WITH_SYS_TIME +#if HAVE_SYS_TIME_H # include -# include -#else -# if HAVE_SYS_TIME_H -# include -# else -# include -# endif #endif ]) GUILE_STRUCT_UTIMBUF diff --git a/libguile/filesys.c b/libguile/filesys.c index c76f407c2..f420b9576 100644 --- a/libguile/filesys.c +++ b/libguile/filesys.c @@ -79,15 +79,9 @@ void *alloca (size_t); #include #endif -#ifdef TIME_WITH_SYS_TIME +#include +#if HAVE_SYS_TIME_H # include -# include -#else -# if HAVE_SYS_TIME_H -# include -# else -# include -# endif #endif #ifdef HAVE_UNISTD_H diff --git a/libguile/gen-scmconfig.c b/libguile/gen-scmconfig.c index c94f3904d..f02f91889 100644 --- a/libguile/gen-scmconfig.c +++ b/libguile/gen-scmconfig.c @@ -151,18 +151,10 @@ main (int argc, char *argv[]) pf ("/* limits.h not available */\n"); #endif -# ifdef TIME_WITH_SYS_TIME - pf ("#include \n"); pf ("#include \n"); -# else -# ifdef HAVE_SYS_TIME_H +#ifdef HAVE_SYS_TIME_H pf ("#include \n"); -# else -# ifdef HAVE_TIME_H - pf ("#include \n"); -# endif -# endif -# endif +#endif pf("\n"); #ifdef STDC_HEADERS diff --git a/libguile/posix.c b/libguile/posix.c index 9e32feb3a..7abc91cb0 100644 --- a/libguile/posix.c +++ b/libguile/posix.c @@ -46,15 +46,9 @@ #ifdef HAVE_STRING_H #include #endif -#ifdef TIME_WITH_SYS_TIME +#include +#if HAVE_SYS_TIME_H # include -# include -#else -# if HAVE_SYS_TIME_H -# include -# else -# include -# endif #endif #ifdef HAVE_UNISTD_H