aboutsummaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2005-07-25 18:10:08 +0000
committerNick Mathewson <nickm@torproject.org>2005-07-25 18:10:08 +0000
commit48787c839e394d3c543d847e0173b988ca319cba (patch)
tree1982c14ed079cc8204e4b9a839a8b664a6aec566 /configure.in
parenta32f93634697895633de860841d8858e27d79cf9 (diff)
downloadtor-48787c839e394d3c543d847e0173b988ca319cba.tar
tor-48787c839e394d3c543d847e0173b988ca319cba.tar.gz
Fix logic to set TIME_T_MAX; apparently, everybody had thought of the prospect of a signed time_t but me.
svn:r4675
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in11
1 files changed, 11 insertions, 0 deletions
diff --git a/configure.in b/configure.in
index fb6a02859..6c82d10c8 100644
--- a/configure.in
+++ b/configure.in
@@ -335,6 +335,17 @@ AC_CHECK_SIZEOF(long long)
AC_CHECK_SIZEOF(__int64)
AC_CHECK_SIZEOF(void *)
AC_CHECK_SIZEOF(time_t)
+AC_CACHE_CHECK([whether time_t is signed], tor_cv_time_t_signed, [
+AC_TRY_RUN([
+int main(int c, char**v) { if (((time_t)-1)<0) return 1; else return 0; }],
+ tor_cv_time_t_signed=no, tor_cv_time_t_signed=yes)
+])
+
+if test $tor_cv_time_t_signed = yes; then
+ AC_DEFINE([TIME_T_IS_SIGNED], 1,
+ [Define to 1 iff time_t is signed])
+fi
+
AC_CHECK_SIZEOF(socklen_t, , [AC_INCLUDES_DEFAULT()
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>