diff options
author | DJ Delorie <dj@redhat.com> | 2003-06-22 00:06:06 +0000 |
---|---|---|
committer | DJ Delorie <dj@redhat.com> | 2003-06-22 00:06:06 +0000 |
commit | 0543b9a2c72c94620ecf07c6b458324064ac1441 (patch) | |
tree | 172d661be222c996c6a71ac8f20df4539a8374ac | |
parent | 5a74f2aaf127c164462f7a996032334c1ec3816d (diff) | |
download | newlib-0543b9a2c72c94620ecf07c6b458324064ac1441.zip newlib-0543b9a2c72c94620ecf07c6b458324064ac1441.tar.gz newlib-0543b9a2c72c94620ecf07c6b458324064ac1441.tar.bz2 |
merge from gcc
-rw-r--r-- | include/ChangeLog | 5 | ||||
-rw-r--r-- | include/safe-ctype.h | 18 |
2 files changed, 22 insertions, 1 deletions
diff --git a/include/ChangeLog b/include/ChangeLog index 1e321f4..d26ba1d 100644 --- a/include/ChangeLog +++ b/include/ChangeLog @@ -1,3 +1,8 @@ +2003-06-21 Zack Weinberg <zack@codesourcery.com> + + * safe-ctype.h (HC_UNKNOWN, HC_ASCII, HC_EBCDIC, HOST_CHARSET): + New #defines. + 2003-06-17 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> * ansidecl.h: Delete HAVE_LONG_DOUBLE GCC bootstrap support. 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 */ |