From cbc0188bd642a04bcb1db12db8a2a8af248725b3 Mon Sep 17 00:00:00 2001 From: DJ Delorie Date: Sun, 22 Jun 2003 00:06:14 +0000 Subject: merge from gcc --- include/safe-ctype.h | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'include/safe-ctype.h') diff --git a/include/safe-ctype.h b/include/safe-ctype.h index b2ad849..c3e154c 100644 --- a/include/safe-ctype.h +++ b/include/safe-ctype.h @@ -37,7 +37,24 @@ Boston, MA 02111-1307, USA. */ #ifdef isalpha #error "safe-ctype.h and ctype.h may not be used simultaneously" +#endif + +/* Determine host character set. */ +#define HC_UNKNOWN 0 +#define HC_ASCII 1 +#define HC_EBCDIC 2 + +#if '\n' == 0x0A && ' ' == 0x20 && '0' == 0x30 \ + && 'A' == 0x41 && 'a' == 0x61 && '!' == 0x21 +# define HOST_CHARSET HC_ASCII #else +# if '\n' == 0x15 && ' ' == 0x40 && '0' == 0xF0 \ + && 'A' == 0xC1 && 'a' == 0x81 && '!' == 0x5A +# define HOST_CHARSET HC_EBCDIC +# else +# define HOST_CHARSET HC_UNKNOWN +# endif +#endif /* Categories. */ @@ -99,5 +116,4 @@ extern const unsigned char _sch_tolower[256]; #define TOUPPER(c) _sch_toupper[(c) & 0xff] #define TOLOWER(c) _sch_tolower[(c) & 0xff] -#endif /* no ctype.h */ #endif /* SAFE_CTYPE_H */ -- cgit v1.1