From e5c146f9f19b9f27f109b9208a0169c4583ee29b Mon Sep 17 00:00:00 2001 From: Zack Weinberg Date: Sat, 21 Jun 2003 23:22:30 +0000 Subject: 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: https://gcc.gnu.org/svn/gcc/trunk@68317 138bc75d-0d04-0410-961f-82ee72b054a4 --- include/ChangeLog | 19 ++++++++++++------- include/safe-ctype.h | 18 +++++++++++++++++- 2 files changed, 29 insertions(+), 8 deletions(-) (limited to 'include') diff --git a/include/ChangeLog b/include/ChangeLog index 6d47a036ff6..43ce9330659 100644 --- a/include/ChangeLog +++ b/include/ChangeLog @@ -1,3 +1,8 @@ +2003-06-21 Zack Weinberg + + * safe-ctype.h (HC_UNKNOWN, HC_ASCII, HC_EBCDIC, HOST_CHARSET): + New #defines. + 2003-06-17 Kaveh R. Ghazi * ansidecl.h: Delete HAVE_LONG_DOUBLE GCC bootstrap support. @@ -383,7 +388,7 @@ 2000-09-04 Alex Samuel - * dyn-string.h: Adjust formatting. + * dyn-string.h: Adjust formatting. (dyn_string_insert_char): New macro. New declaration. 2000-08-28 Jason Merrill @@ -408,7 +413,7 @@ dyn_string_insert_cstr, dyn_string_append, dyn_string_append_cstr, dyn_string_append_char, dyn_string_substring): Change return type to int. - + 2000-06-07 Kaveh R. Ghazi * demangle.h (demangling_styles): Remove trailing comma in enum. @@ -421,12 +426,12 @@ * dyn-string.h: Move here from gcc/dyn-string.h. Add new functions. * demangle.h (DMGL_GNU_NEW_ABI): New macro. - (DMGL_STYLE_MASK): Or in DMGL_GNU_NEW_ABI. + (DMGL_STYLE_MASK): Or in DMGL_GNU_NEW_ABI. (current_demangling_style): Add gnu_new_abi_demangling. (GNU_NEW_ABI_DEMANGLING_STYLE_STRING): New macro. (GNU_NEW_ABI_DEMANGLING): Likewise. (cplus_demangle_new_abi): New declaration. - + Tue May 30 16:53:34 2000 Andrew Cagney * floatformat.h (struct floatformat): Add field name. @@ -458,9 +463,9 @@ Thu May 4 17:15:26 2000 Philippe De Muyter 2000-04-28 Kenneth Block Jason Merrill - * demangle.h (libiberty_demanglers): new table for different styles. - (cplus_demangle_set_style): New function for setting style. - (cplus_demangle_name_to_style): New function to translate name. + * demangle.h (libiberty_demanglers): new table for different styles. + (cplus_demangle_set_style): New function for setting style. + (cplus_demangle_name_to_style): New function to translate name. 2000-04-24 Mark Mitchell diff --git a/include/safe-ctype.h b/include/safe-ctype.h index b2ad8490bd0..c3e154c6f9f 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.2.3