aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Brobecker <brobecker@adacore.com>2008-07-07 17:08:21 +0000
committerJoel Brobecker <brobecke@gcc.gnu.org>2008-07-07 17:08:21 +0000
commit622c36c90db25a2e801536a7f5d11da4e5f14366 (patch)
tree293c401d6c211bf4b1d4850068b2a5ee9d0225df
parentdd7b73c0a62547c49ee83f17cbdbef98c2738000 (diff)
downloadgcc-622c36c90db25a2e801536a7f5d11da4e5f14366.zip
gcc-622c36c90db25a2e801536a7f5d11da4e5f14366.tar.gz
gcc-622c36c90db25a2e801536a7f5d11da4e5f14366.tar.bz2
safe-ctype.h: Add #include of ctype.h before redefining the ctype.h macros.
* safe-ctype.h: Add #include of ctype.h before redefining the ctype.h macros. From-SVN: r137580
-rw-r--r--include/ChangeLog5
-rw-r--r--include/safe-ctype.h5
2 files changed, 9 insertions, 1 deletions
diff --git a/include/ChangeLog b/include/ChangeLog
index 66f6249..1636e98 100644
--- a/include/ChangeLog
+++ b/include/ChangeLog
@@ -1,3 +1,8 @@
+2008-07-07 Joel Brobecker <brobecker@adacore.com>
+
+ * safe-ctype.h: Add #include of ctype.h before redefining
+ the ctype.h macros.
+
2008-07-04 Joel Brobecker <brobecker@adacore.com>
* safe-ctype.h: Remove #error when detecting that ctype.h has been
diff --git a/include/safe-ctype.h b/include/safe-ctype.h
index b3e911e..0266bf1 100644
--- a/include/safe-ctype.h
+++ b/include/safe-ctype.h
@@ -116,7 +116,10 @@ extern const unsigned char _sch_tolower[256];
from ctype.h. Initially, the approach was to produce an error when
detecting that ctype.h has been included. But this was causing
trouble as ctype.h might get indirectly included as a result of
- including another system header (for instance gnulib's stdint.h). */
+ including another system header (for instance gnulib's stdint.h).
+ So we include ctype.h here and then immediately redefine its macros. */
+
+#include <ctype.h>
#undef isalpha
#define isalpha(c) do_not_use_isalpha_with_safe_ctype
#undef isalnum