aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2006-10-02 21:00:20 +0000
committerNick Mathewson <nickm@torproject.org>2006-10-02 21:00:20 +0000
commit36adc7cdd90f195013eb8e24a90ef40348787212 (patch)
treee91fc5837efd4ee879f3a22f80ff206629970059 /src
parent14f9b537d124866bf67befc473ac5be04f457db4 (diff)
downloadtor-36adc7cdd90f195013eb8e24a90ef40348787212.tar
tor-36adc7cdd90f195013eb8e24a90ef40348787212.tar.gz
r8844@totoro: nickm | 2006-10-02 16:32:44 -0400
Resolve an XXXX: make sure that we are actually on 2s-complement hardware. svn:r8576
Diffstat (limited to 'src')
-rw-r--r--src/common/torint.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/common/torint.h b/src/common/torint.h
index b69af3eea..6ec53ed12 100644
--- a/src/common/torint.h
+++ b/src/common/torint.h
@@ -220,9 +220,12 @@ typedef uint32_t uintptr_t;
#error "Missing type uint64_t"
#endif
-/* XXXX This assumes a sane (2's-complement) representation. But if you
- * aren't 2's complement, and you don't define LONG_MAX, then you're so
- * bizarre that I want nothing to do with you. */
+/* This assumes a sane (2's-complement) representation. But if you
+ * aren't 2's complement, and you don't define LONG_MAX, then you're so
+ * bizarre that I want nothing to do with you. */
+#ifndef USING_TWOS_COMPLEMENT
+#error "Seems that your platform doesn't use 2's complement arithmetic. Argh."
+#endif
#ifndef LONG_MAX
#if (SIZEOF_LONG == 4)
#define LONG_MAX 0x7fffffffL