diff options
author | Joel Brobecker <brobecker@adacore.com> | 2008-07-07 17:09:31 +0000 |
---|---|---|
committer | Joel Brobecker <brobecker@adacore.com> | 2008-07-07 17:09:31 +0000 |
commit | d68240794e70b956e48501ff4aa503cbd198fe43 (patch) | |
tree | 75f21456964f557228272679e4b7ea1b10bd7bf2 | |
parent | 2adedff8b325c10f7efe8a3f4881ed92751eb939 (diff) | |
download | cygnal-d68240794e70b956e48501ff4aa503cbd198fe43.tar.gz cygnal-d68240794e70b956e48501ff4aa503cbd198fe43.tar.bz2 cygnal-d68240794e70b956e48501ff4aa503cbd198fe43.zip |
* safe-ctype.h: Add #include of ctype.h before redefining
the ctype.h macros.
-rw-r--r-- | include/ChangeLog | 5 | ||||
-rw-r--r-- | include/safe-ctype.h | 5 |
2 files changed, 9 insertions, 1 deletions
diff --git a/include/ChangeLog b/include/ChangeLog index 97aca3775..ded2069b8 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 b3e911e07..0266bf1aa 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 |