[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor/maint-0.2.4] Warn at configure time when time_t is unsigned



commit 2f98bf5c9fac4dfd1bb07564ce08b13d1e330252
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date:   Mon Mar 11 15:33:44 2013 -0400

    Warn at configure time when time_t is unsigned
    
    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 |    5 +++++
 configure.ac                 |    4 ++++
 2 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/changes/warn-unsigned-time_t b/changes/warn-unsigned-time_t
new file mode 100644
index 0000000..5f0c36d
--- /dev/null
+++ b/changes/warn-unsigned-time_t
@@ -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.
diff --git a/configure.ac b/configure.ac
index 864477b..21a83bc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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 ], [



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits