aboutsummaryrefslogtreecommitdiff
path: root/libiberty
diff options
context:
space:
mode:
authorZack Weinberg <zack@gcc.gnu.org>2003-06-21 23:22:30 +0000
committerZack Weinberg <zack@gcc.gnu.org>2003-06-21 23:22:30 +0000
commit7468e0b5233e79f72ca3d981d444e2150efde046 (patch)
treea51893fa5517a7ec2b7577959cf98aa24df8727c /libiberty
parentde32c0cb3bd3af96b16de9c4b4c942cca57c135d (diff)
downloadgcc-7468e0b5233e79f72ca3d981d444e2150efde046.zip
gcc-7468e0b5233e79f72ca3d981d444e2150efde046.tar.gz
gcc-7468e0b5233e79f72ca3d981d444e2150efde046.tar.bz2
safe-ctype.h (HC_UNKNOWN, [...]): New #defines.
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. From-SVN: r68317
Diffstat (limited to 'libiberty')
-rw-r--r--libiberty/ChangeLog15
-rw-r--r--libiberty/safe-ctype.c16
2 files changed, 21 insertions, 10 deletions
diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog
index 84d4bcd..b521127 100644
--- a/libiberty/ChangeLog
+++ b/libiberty/ChangeLog
@@ -1,3 +1,8 @@
+2003-06-21 Zack Weinberg <zack@codesourcery.com>
+
+ * safe-ctype.c: Separate out EOF==-1 check. Use HOST_CHARSET
+ for charset determination.
+
2003-06-19 Dara Hazeghi <dhazeghi@yahoo.com>
* configure.in: Add check for malloc.h needed by
@@ -8,14 +13,14 @@
free().
2003-06-09 Albert Chin-A-Young <china@thewrittenword.com>
-
+
PR bootstrap/10974
* physmem.c: Update comment.
* configure.in: Modify test for _system_configuration for older
AIX systems.
* config.in, configure: Regenerated.
-
+
2003-06-05 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
PR other/10810
@@ -109,7 +114,7 @@
ANSI_PROTOTYPES.
* vsprintf.c: Include "ansidecl.h" earlier, rely on
ANSI_PROTOTYPES and possibly include <stdarg.h>.
-
+
* Makefile.in: Regenerate dependencies.
2003-04-15 DJ Delorie <dj@redhat.com>
@@ -207,7 +212,7 @@
2003-02-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
Richard Earnshaw <rearnsha@arm.com>
Geoffrey Keating <geoffk@apple.com>
-
+
* configure.in: Check for sys/sysctl.h and sysctl.
* physmem.c: Add support for *bsd and darwin.
* Makefile.in: Generate depedency for physmem.o.
@@ -236,7 +241,7 @@
* physmem.c (physmem_total, physmem_available): De-ANSI-fy.
* configure.in (AC_CHECK_FUNCS): Add pstat_getstatic and
pstat_getdynamic.
-
+
2003-02-20 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* Makefile.in (CFILES): Add physmem.c.
diff --git a/libiberty/safe-ctype.c b/libiberty/safe-ctype.c
index 3bac84b..12d52d3 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