diff options
author | Nicolas Trangez <ikke@nicolast.be> | 2022-09-21 13:49:58 +0200 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2022-10-21 02:58:39 -0400 |
commit | a2af7c4c59ef24a71cc6cab7bd6b07d12f02aad1 (patch) | |
tree | 08e881fc1d61ca41c5f9297cbcb0b2bbb545c181 /libraries | |
parent | 8cd6f435e60f9dd14ad55a0002ff833536e9ccb2 (diff) | |
download | haskell-a2af7c4c59ef24a71cc6cab7bd6b07d12f02aad1.tar.gz |
build: get rid of `HAVE_TIME_H`
As advertized by `autoreconf`:
> All current systems provide time.h; it need not be checked for.
Hence, remove the check for it in `configure.ac` and remove conditional
inclusion of the header in `HAVE_TIME_H` blocks where applicable.
The `time.h` header was being included in various source files without a
`HAVE_TIME_H` guard already anyway.
Diffstat (limited to 'libraries')
-rw-r--r-- | libraries/base/System/CPUTime/Posix/ClockGetTime.hsc | 2 | ||||
-rw-r--r-- | libraries/base/aclocal.m4 | 4 | ||||
-rw-r--r-- | libraries/base/cbits/sysconf.c | 2 | ||||
-rw-r--r-- | libraries/base/include/HsBase.h | 2 |
4 files changed, 1 insertions, 9 deletions
diff --git a/libraries/base/System/CPUTime/Posix/ClockGetTime.hsc b/libraries/base/System/CPUTime/Posix/ClockGetTime.hsc index f24dec3b14..259cee8226 100644 --- a/libraries/base/System/CPUTime/Posix/ClockGetTime.hsc +++ b/libraries/base/System/CPUTime/Posix/ClockGetTime.hsc @@ -2,10 +2,8 @@ #include "HsFFI.h" #include "HsBaseConfig.h" -#if HAVE_TIME_H #include <unistd.h> #include <time.h> -#endif module System.CPUTime.Posix.ClockGetTime ( getCPUTime diff --git a/libraries/base/aclocal.m4 b/libraries/base/aclocal.m4 index 083a427fc7..da1ee301ec 100644 --- a/libraries/base/aclocal.m4 +++ b/libraries/base/aclocal.m4 @@ -78,9 +78,7 @@ AC_DEFUN([FPTOOLS_HTYPE_INCLUDES], # include <signal.h> #endif -#if HAVE_TIME_H -# include <time.h> -#endif +#include <time.h> #if HAVE_TERMIOS_H # include <termios.h> diff --git a/libraries/base/cbits/sysconf.c b/libraries/base/cbits/sysconf.c index bbf785326a..1bce685296 100644 --- a/libraries/base/cbits/sysconf.c +++ b/libraries/base/cbits/sysconf.c @@ -6,9 +6,7 @@ #endif /* for CLK_TCK */ -#if HAVE_TIME_H #include <time.h> -#endif long clk_tck(void) { #if defined(CLK_TCK) diff --git a/libraries/base/include/HsBase.h b/libraries/base/include/HsBase.h index 1880f28d86..d55ec0747a 100644 --- a/libraries/base/include/HsBase.h +++ b/libraries/base/include/HsBase.h @@ -74,9 +74,7 @@ # include <sys/timers.h> # endif #endif -#if HAVE_TIME_H #include <time.h> -#endif #if HAVE_SYS_TIMEB_H && !defined(__FreeBSD__) #include <sys/timeb.h> #endif |