diff options
author | zack <zack@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-06-21 23:22:30 +0000 |
---|---|---|
committer | zack <zack@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-06-21 23:22:30 +0000 |
commit | 05b93640030b8202a5c8e6d19a048e501b4f5b60 (patch) | |
tree | a51893fa5517a7ec2b7577959cf98aa24df8727c /libiberty/safe-ctype.c | |
parent | 1e06725af950e15306cca1db67d1939ad9d99fa4 (diff) |
include:
* safe-ctype.h (HC_UNKNOWN, HC_ASCII, HC_EBCDIC, HOST_CHARSET):
New #defines.
libiberty:
* safe-ctype.c: Separate out EOF==-1 check. Use HOST_CHARSET
for charset determination.
gcc:
* aclocal.m4 (gcc_AC_C_CHARSET): Delete.
* configure.in: Don't use gcc_AC_C_CHARSET.
* configure, config.in: Regenerate.
* config/i370/i370.c, config/i370/i370.h: Use
(HOST_CHARSET == HC_EBCDIC) or (HOST_CHARSET == HC_ASCII)
instead of HOST_EBCDIC or !HOST_EBCDIC. Clarify comments a tad.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@68317 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libiberty/safe-ctype.c')
-rw-r--r-- | libiberty/safe-ctype.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/libiberty/safe-ctype.c b/libiberty/safe-ctype.c index 3bac84bf68a..12d52d3bd88 100644 --- a/libiberty/safe-ctype.c +++ b/libiberty/safe-ctype.c @@ -33,6 +33,10 @@ Boston, MA 02111-1307, USA. */ #include <safe-ctype.h> #include <stdio.h> /* for EOF */ +#if EOF != -1 + #error "<safe-ctype.h> requires EOF == -1" +#endif + /* Shorthand */ #define bl _sch_isblank #define cn _sch_iscntrl @@ -64,9 +68,7 @@ Boston, MA 02111-1307, USA. */ #define S (const unsigned short) (nv|sp|bl|pr) /* space */ /* Are we ASCII? */ -#if '\n' == 0x0A && ' ' == 0x20 && '0' == 0x30 \ - && 'A' == 0x41 && 'a' == 0x61 && '!' == 0x21 \ - && EOF == -1 +#if HOST_CHARSET == HC_ASCII const unsigned short _sch_istable[256] = { @@ -159,5 +161,9 @@ const unsigned char _sch_toupper[256] = }; #else - #error "Unsupported host character set" -#endif /* not ASCII */ +# if HOST_CHARSET == HC_EBCDIC + #error "FIXME: write tables for EBCDIC" +# else + #error "Unrecognized host character set" +# endif +#endif |