summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2007-10-22 00:44:42 +0000
committerNick Mathewson <nickm@torproject.org>2007-10-22 00:44:42 +0000
commit42172829ce7b4538ab3f79201378f1ea5256bfdb (patch)
tree44fc386eb6d2f2abfe901dad6b85a1592f060db1
parentb481036266d699e9fb57f6fe4dab8ef329ca3702 (diff)
downloadtor-42172829ce7b4538ab3f79201378f1ea5256bfdb.tar.gz
tor-42172829ce7b4538ab3f79201378f1ea5256bfdb.zip
r16016@catbus: nickm | 2007-10-21 20:44:19 -0400
Check a platform assumption we have made without checking for too long: "Characters are represented in ascii." svn:r12088
-rw-r--r--ChangeLog4
-rw-r--r--src/common/compat.h4
2 files changed, 8 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index dfea491beb..7e679724bb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -46,6 +46,10 @@ Changes in version 0.2.0.9-alpha - 2007-10-??
- Don't try to launch descriptor downloads quite so often when we
have enough directory information.
+ o Minor features (compilation):
+ - Detect non-ASCII platforms (if any still exist) and refuse to
+ build there. Some of our code assumes that 'A' is 65 and so on.
+
o Minor bugfixes (directory authorities):
- Correct the implementation of "download votes by digest." Bugfix on
0.2.0.8-alpha.
diff --git a/src/common/compat.h b/src/common/compat.h
index 113399719b..3107727df3 100644
--- a/src/common/compat.h
+++ b/src/common/compat.h
@@ -50,6 +50,10 @@
#error "It seems your platform does not represent NULL as zero. We can't cope."
#endif
+#if 'a'!=97 || 'z'!=122 || 'A'!=65 || ' '!=32
+#error "It seems that you encode characters in something other than ASCII."
+#endif
+
/* ===== Compiler compatibility */
/* GCC can check printf types on arbitrary functions. */