summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2018-01-18 20:24:05 +0100
committerDaniel Stenberg <daniel@haxx.se>2018-01-25 22:20:52 +0100
commit1c39128d974666107fc6d9ea15f294036851f224 (patch)
treec3a81a69310c7561f6bec4336abc80d6afa6d3ca /configure.ac
parent1433e4645b51a4ccb0b5e23a889ac9bd6093e3e2 (diff)
downloadcurl-1c39128d974666107fc6d9ea15f294036851f224.tar.gz
parsedate: fix date parsing for systems with 32 bit long
Make curl_getdate() handle dates before 1970 as well (returning negative values). Make test 517 test dates for 64 bit time_t. This fixes bug (3) mentioned in #2238 Closes #2250
Diffstat (limited to 'configure.ac')
-rwxr-xr-xconfigure.ac19
1 files changed, 18 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index c223a0436..76fa93d1b 100755
--- a/configure.ac
+++ b/configure.ac
@@ -5,7 +5,7 @@
# | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____|
#
-# Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
@@ -3483,6 +3483,23 @@ AC_CHECK_TYPE([bool],[
#endif
])
+AC_MSG_CHECKING([if time_t is unsigned])
+AC_RUN_IFELSE([
+ AC_LANG_SOURCE([[
+ #include <time.h>
+ #include <limits.h>
+ time_t t = ULONG_MAX;
+ return (t > 0);
+ ]])] ,[
+ AC_MSG_RESULT([yes])
+ AC_DEFINE(HAVE_TIME_T_UNSIGNED, 1, [Define this if time_t is unsigned])
+],[
+ AC_MSG_RESULT([no])
+],[
+ dnl cross-compiling, most systems are unsigned
+ AC_MSG_RESULT([no])
+])
+
CURL_CONFIGURE_CURL_SOCKLEN_T
CURL_CONFIGURE_PULL_SYS_POLL