OSDN Git Service

* safe-ctype.h: Add #include of ctype.h before redefining
authorbrobecke <brobecke@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 7 Jul 2008 17:08:21 +0000 (17:08 +0000)
committerbrobecke <brobecke@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 7 Jul 2008 17:08:21 +0000 (17:08 +0000)
        the ctype.h macros.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@137580 138bc75d-0d04-0410-961f-82ee72b054a4

include/ChangeLog
include/safe-ctype.h

index 66f6249..1636e98 100644 (file)
@@ -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
index b3e911e..0266bf1 100644 (file)
@@ -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