]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Warn at configure time when time_t is unsigned
authorNick Mathewson <nickm@torproject.org>
Mon, 11 Mar 2013 19:33:44 +0000 (15:33 -0400)
committerNick Mathewson <nickm@torproject.org>
Mon, 11 Mar 2013 19:33:44 +0000 (15:33 -0400)
Inspired by #8042.

As far as I know, OpenVMS is the only place you're likely to hit an
unsigned time_t these days, and Tor's VMS support
is... lacking. Still worth letting people know about it, though.

changes/warn-unsigned-time_t [new file with mode: 0644]
configure.ac

diff --git a/changes/warn-unsigned-time_t b/changes/warn-unsigned-time_t
new file mode 100644 (file)
index 0000000..5f0c36d
--- /dev/null
@@ -0,0 +1,5 @@
+  o Build improvements:
+    - Warn if building on a platform with an unsigned time_t: there
+      are too many places where Tor currently assumes that time_t can
+      hold negative values. We'd like to fix them all, but probably
+      some will remain.
index 864477b8fc8485f6deeb30e940bbaa3e6a0757de..21a83bc4c151ca379b1ad3e5a6cacd52cb9181b0 100644 (file)
@@ -972,6 +972,10 @@ AX_CHECK_SIGN([time_t],
 #endif
 ])
 
+if test "$ax_cv_decl_time_t_signed" = no; then
+  AC_MSG_WARN([You have an unsigned time_t; some things will probably break. Please tell the Tor developers about your interesting platform.])
+fi
+
 AX_CHECK_SIGN([size_t],
        [ tor_cv_size_t_signed=yes ],
        [ tor_cv_size_t_signed=no ], [