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

[or-cvs] r18203: {tor} Fix warning on panther compile, and bug 913. Backport candid (in tor/trunk: . src/common)



Author: nickm
Date: 2009-01-20 22:51:14 -0500 (Tue, 20 Jan 2009)
New Revision: 18203

Modified:
   tor/trunk/ChangeLog
   tor/trunk/src/common/compat.c
   tor/trunk/src/common/compat.h
Log:
Fix warning on panther compile, and bug 913.  Backport candidate.

Modified: tor/trunk/ChangeLog
===================================================================
--- tor/trunk/ChangeLog	2009-01-21 03:43:07 UTC (rev 18202)
+++ tor/trunk/ChangeLog	2009-01-21 03:51:14 UTC (rev 18203)
@@ -2,6 +2,8 @@
   o Minor bugfixes:
     - Let controllers actually ask for the "clients_seen" event. Bugfix
       on 0.2.1.10-alpha; reported by Matt Edman.
+    - Fix a compile warning on OSX Panther.  Fixes bug 913; bugfix against
+      0.2.1.11-alpha.
 
 
 Changes in version 0.2.1.11-alpha - 2009-01-20

Modified: tor/trunk/src/common/compat.c
===================================================================
--- tor/trunk/src/common/compat.c	2009-01-21 03:43:07 UTC (rev 18202)
+++ tor/trunk/src/common/compat.c	2009-01-21 03:51:14 UTC (rev 18203)
@@ -349,21 +349,21 @@
  * has 256 bits to look up whether a character is in some set or not.  This
  * fails on non-ASCII platforms, but it is hard to find a platform whose
  * character set is not a superset of ASCII nowadays. */
-const uint32_t const TOR_ISALPHA_TABLE[8] =
+const uint32_t TOR_ISALPHA_TABLE[8] =
   { 0, 0, 0x7fffffe, 0x7fffffe, 0, 0, 0, 0 };
-const uint32_t const TOR_ISALNUM_TABLE[8] =
+const uint32_t TOR_ISALNUM_TABLE[8] =
   { 0, 0x3ff0000, 0x7fffffe, 0x7fffffe, 0, 0, 0, 0 };
-const uint32_t const TOR_ISSPACE_TABLE[8] = { 0x3e00, 0x1, 0, 0, 0, 0, 0, 0 };
-const uint32_t const TOR_ISXDIGIT_TABLE[8] =
+const uint32_t TOR_ISSPACE_TABLE[8] = { 0x3e00, 0x1, 0, 0, 0, 0, 0, 0 };
+const uint32_t TOR_ISXDIGIT_TABLE[8] =
   { 0, 0x3ff0000, 0x7e, 0x7e, 0, 0, 0, 0 };
-const uint32_t const TOR_ISDIGIT_TABLE[8] = { 0, 0x3ff0000, 0, 0, 0, 0, 0, 0 };
-const uint32_t const TOR_ISPRINT_TABLE[8] =
+const uint32_t TOR_ISDIGIT_TABLE[8] = { 0, 0x3ff0000, 0, 0, 0, 0, 0, 0 };
+const uint32_t TOR_ISPRINT_TABLE[8] =
   { 0, 0xffffffff, 0xffffffff, 0x7fffffff, 0, 0, 0, 0x0 };
-const uint32_t const TOR_ISUPPER_TABLE[8] = { 0, 0, 0x7fffffe, 0, 0, 0, 0, 0 };
-const uint32_t const TOR_ISLOWER_TABLE[8] = { 0, 0, 0, 0x7fffffe, 0, 0, 0, 0 };
+const uint32_t TOR_ISUPPER_TABLE[8] = { 0, 0, 0x7fffffe, 0, 0, 0, 0, 0 };
+const uint32_t TOR_ISLOWER_TABLE[8] = { 0, 0, 0, 0x7fffffe, 0, 0, 0, 0 };
 /* Upper-casing and lowercasing tables to map characters to upper/lowercase
  * equivalents. */
-const char const TOR_TOUPPER_TABLE[256] = {
+const char TOR_TOUPPER_TABLE[256] = {
   0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,
   16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,
   32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,
@@ -381,7 +381,7 @@
   224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,
   240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,
 };
-const char const TOR_TOLOWER_TABLE[256] = {
+const char TOR_TOLOWER_TABLE[256] = {
   0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,
   16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,
   32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,

Modified: tor/trunk/src/common/compat.h
===================================================================
--- tor/trunk/src/common/compat.h	2009-01-21 03:43:07 UTC (rev 18202)
+++ tor/trunk/src/common/compat.h	2009-01-21 03:51:14 UTC (rev 18203)
@@ -249,7 +249,7 @@
  * which all assumes we're doing ASCII. */
 #define DECLARE_CTYPE_FN(name)                                          \
   static int TOR_##name(char c);                                        \
-  extern const uint32_t const TOR_##name##_TABLE[];                     \
+  extern const uint32_t TOR_##name##_TABLE[];                           \
   static INLINE int TOR_##name(char c) {                                \
     uint8_t u = c;                                                      \
     return !!(TOR_##name##_TABLE[(u >> 5) & 7] & (1 << (u & 31)));      \
@@ -262,8 +262,8 @@
 DECLARE_CTYPE_FN(ISPRINT)
 DECLARE_CTYPE_FN(ISLOWER)
 DECLARE_CTYPE_FN(ISUPPER)
-extern const char const TOR_TOUPPER_TABLE[];
-extern const char const TOR_TOLOWER_TABLE[];
+extern const char TOR_TOUPPER_TABLE[];
+extern const char TOR_TOLOWER_TABLE[];
 #define TOR_TOLOWER(c) (TOR_TOLOWER_TABLE[(uint8_t)c])
 #define TOR_TOUPPER(c) (TOR_TOUPPER_TABLE[(uint8_t)c])