1
0
mirror of https://github.com/moparisthebest/curl synced 2024-11-16 22:45:03 -05:00
curl/m4
Michael Forney eaa1d73229
configure: include <time.h> unconditionally
In 2682e5f5, several instances of AC_HEADER_TIME were removed since
it is a deprecated autoconf macro. However, this was the macro that
defined TIME_WITH_SYS_TIME, which was used to indicate that <time.h>
can be included alongside <sys/time.h>. TIME_WITH_SYS_TIME is still
used in the configure test body and since it is no longer defined,
<time.h> is *not* included on systems that have <sys/time.h>.

In particular, at least on musl libc and glibc, <sys/time.h> does
not implicitly include <time.h> and does not declare clock_gettime,
gmtime_r, or localtime_r. This causes configure to fail to detect
those functions.

The AC_HEADER_TIME macro deprecation text says

> All current systems provide time.h; it need not be checked for.
> Not all systems provide sys/time.h, but those that do, all allow
> you to include it and time.h simultaneously.

So, to fix this issue, simply include <time.h> unconditionally when
testing for time-related functions and in libcurl, and don't bother
checking for it.

Closes #6859
2021-04-07 16:08:01 +02:00
..
.gitignore configure: libtool 1.5 tweaks 2011-12-15 18:01:00 +01:00
ax_compile_check_sizeof.m4 configure: add missing m4/ax_compile_check_sizeof.m4 2018-05-22 08:37:10 +02:00
curl-compilers.m4 configure: set -Wextra-semi-stmt for clang with --enable-debug 2020-12-29 23:02:43 +01:00
curl-confopts.m4 configure: s/AC_HELP_STRING/AS_HELP_STRING 2021-03-16 23:01:53 +01:00
curl-functions.m4 configure: include <time.h> unconditionally 2021-04-07 16:08:01 +02:00
curl-openssl.m4 curl.se: new home 2020-11-04 23:59:47 +01:00
curl-override.m4 curl.se: new home 2020-11-04 23:59:47 +01:00
curl-reentrant.m4 curl.se: new home 2020-11-04 23:59:47 +01:00
xc-am-iface.m4 copyright: fix out-of-date copyright ranges and missing headers 2020-03-24 15:05:59 +01:00
xc-cc-check.m4 copyright: fix out-of-date copyright ranges and missing headers 2020-03-24 15:05:59 +01:00
xc-lt-iface.m4 copyright: fix out-of-date copyright ranges and missing headers 2020-03-24 15:05:59 +01:00
xc-translit.m4 copyright: fix out-of-date copyright ranges and missing headers 2020-03-24 15:05:59 +01:00
xc-val-flgs.m4 copyright: fix out-of-date copyright ranges and missing headers 2020-03-24 15:05:59 +01:00
zz40-xc-ovr.m4 whitespace fixes 2018-09-23 22:24:02 +00:00
zz50-xc-ovr.m4 copyright: fix out-of-date copyright ranges and missing headers 2020-03-24 15:05:59 +01:00
zz60-xc-ovr.m4 copyright: fix out-of-date copyright ranges and missing headers 2020-03-24 15:05:59 +01:00