Skip to content
Snippets Groups Projects
Commit 622c36c9 authored by Joel Brobecker's avatar Joel Brobecker Committed by Joel Brobecker
Browse files

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
parent dd7b73c0
No related branches found
No related tags found
No related merge requests found
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> 2008-07-04 Joel Brobecker <brobecker@adacore.com>
* safe-ctype.h: Remove #error when detecting that ctype.h has been * safe-ctype.h: Remove #error when detecting that ctype.h has been
......
...@@ -116,7 +116,10 @@ extern const unsigned char _sch_tolower[256]; ...@@ -116,7 +116,10 @@ extern const unsigned char _sch_tolower[256];
from ctype.h. Initially, the approach was to produce an error when from ctype.h. Initially, the approach was to produce an error when
detecting that ctype.h has been included. But this was causing detecting that ctype.h has been included. But this was causing
trouble as ctype.h might get indirectly included as a result of 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 #undef isalpha
#define isalpha(c) do_not_use_isalpha_with_safe_ctype #define isalpha(c) do_not_use_isalpha_with_safe_ctype
#undef isalnum #undef isalnum
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment