[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 08/13: Presume time.h and sys/time.h don't conflict when
From: |
Mike Gran |
Subject: |
[Guile-commits] 08/13: Presume time.h and sys/time.h don't conflict when included |
Date: |
Sat, 15 Oct 2022 15:16:32 -0400 (EDT) |
mike121 pushed a commit to branch main
in repository guile.
commit df8e772f3c5f8c998b074a2821320544da8fb088
Author: Mike Gran <spk121@yahoo.com>
AuthorDate: Thu Sep 15 03:55:17 2022 -0700
Presume time.h and sys/time.h don't conflict when included
Systems on which time.h and sys/time.h conflicted are obsolescent.
* configure.ac: remove AC_HEADER_TIME. remove conditional
in tm.tm_gmtoff test.
* libguile/filesys.c [TIME_WITH_SYS_TIME]: remove conditional
* libguile/posix.c [TIME_WITH_SYS_TIME]: remove conditional
# Conflicts:
# libguile/filesys.c
---
configure.ac | 10 +---------
libguile/filesys.c | 10 ++--------
libguile/posix.c | 10 ++--------
3 files changed, 5 insertions(+), 25 deletions(-)
diff --git a/configure.ac b/configure.ac
index ac2f91f57..adeb12f7b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -376,7 +376,6 @@ esac
AC_MSG_RESULT($SCM_PREBUILT_BINARIES)
AC_SUBST([SCM_PREBUILT_BINARIES])
-AC_HEADER_TIME
AC_HEADER_SYS_WAIT
AC_HEADER_DIRENT
@@ -1013,15 +1012,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 <time.h>
-#ifdef TIME_WITH_SYS_TIME
+#if HAVE_SYS_TIME_H
# include <sys/time.h>
-# include <time.h>
-#else
-# if HAVE_SYS_TIME_H
-# include <sys/time.h>
-# else
-# include <time.h>
-# endif
#endif
])
GUILE_STRUCT_UTIMBUF
diff --git a/libguile/filesys.c b/libguile/filesys.c
index f182f6c79..234f70f77 100644
--- a/libguile/filesys.c
+++ b/libguile/filesys.c
@@ -53,16 +53,10 @@
#include <io.h>
#endif
-#ifdef TIME_WITH_SYS_TIME
+#if HAVE_SYS_TIME_H
# include <sys/time.h>
-# include <time.h>
-#else
-# if HAVE_SYS_TIME_H
-# include <sys/time.h>
-# else
-# include <time.h>
-# endif
#endif
+#include <time.h>
#ifdef LIBC_H_WITH_UNISTD_H
#include <libc.h>
diff --git a/libguile/posix.c b/libguile/posix.c
index 8471818ad..1b8dbd0e4 100644
--- a/libguile/posix.c
+++ b/libguile/posix.c
@@ -37,16 +37,10 @@
# include <sched.h>
#endif
-#ifdef TIME_WITH_SYS_TIME
+#if HAVE_SYS_TIME_H
# include <sys/time.h>
-# include <time.h>
-#else
-# if HAVE_SYS_TIME_H
-# include <sys/time.h>
-# else
-# include <time.h>
-# endif
#endif
+#include <time.h>
#ifdef LIBC_H_WITH_UNISTD_H
# include <libc.h>
- [Guile-commits] branch main updated (bc3b1a4e2 -> 1ddc4eb96), Mike Gran, 2022/10/15
- [Guile-commits] 01/13: Update libtool initialization in configure script, Mike Gran, 2022/10/15
- [Guile-commits] 02/13: Presume const is always available, Mike Gran, 2022/10/15
- [Guile-commits] 05/13: Remove AC_HEADER_STDC from configure.ac, Mike Gran, 2022/10/15
- [Guile-commits] 06/13: Presume ISO C90 headers are always available, Mike Gran, 2022/10/15
- [Guile-commits] 13/13: Fixes arg type for scm_integer_from_mpz, Mike Gran, 2022/10/15
- [Guile-commits] 10/13: Modernizes labels-as-values.m4, Mike Gran, 2022/10/15
- [Guile-commits] 11/13: Presumes signal handler return void, Mike Gran, 2022/10/15
- [Guile-commits] 08/13: Presume time.h and sys/time.h don't conflict when included,
Mike Gran <=
- [Guile-commits] 03/13: Use autoconf's ability to choose the latest version of C, Mike Gran, 2022/10/15
- [Guile-commits] 07/13: Presume ISO C90 functions are always available, Mike Gran, 2022/10/15
- [Guile-commits] 04/13: Remove obsolete macro AM_PROG_CC_C_O in configure script, Mike Gran, 2022/10/15
- [Guile-commits] 09/13: Remove special logic for the obscure CMU C library's libc.h, Mike Gran, 2022/10/15
- [Guile-commits] 12/13: autoupdate acinclude.m4, Mike Gran, 2022/10/15