Code

ctype.c: protect tiny C preprocessor constants
authorJunio C Hamano <gitster@pobox.com>
Wed, 27 Aug 2008 23:14:22 +0000 (16:14 -0700)
committerJunio C Hamano <gitster@pobox.com>
Wed, 27 Aug 2008 23:14:22 +0000 (16:14 -0700)
Some platforms contaminate the preprocessor token namespace with their own
definition of SS without being asked.  Avoid getting hit by redefinition
warning messages by explicitly undef SS, AA and DD shorthand we use in this
table definition.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
ctype.c

diff --git a/ctype.c b/ctype.c
index ee06eb7f48f1d3e818b3037369b4e056fe7e5be7..d2bd38e9013cdf5c4ab15dbb1770e94e5d6ed2cb 100644 (file)
--- a/ctype.c
+++ b/ctype.c
@@ -5,6 +5,11 @@
  */
 #include "cache.h"
 
+/* Just so that no insane platform contaminate namespace with these symbols */
+#undef SS
+#undef AA
+#undef DD
+
 #define SS GIT_SPACE
 #define AA GIT_ALPHA
 #define DD GIT_DIGIT