Skip to content

Commit

Permalink
include:
Browse files Browse the repository at this point in the history
	* 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
  • Loading branch information
zack committed Jun 21, 2003
1 parent 1e06725 commit 05b9364
Show file tree
Hide file tree
Showing 11 changed files with 338 additions and 383 deletions.
13 changes: 11 additions & 2 deletions gcc/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
2003-06-21 Zack Weinberg <zack@codesourcery.com>

* 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.

2003-06-21 Neil Booth <neil@daikokuya.co.uk>

* Makefile.in: Update.
Expand Down Expand Up @@ -58,7 +67,7 @@ Sat Jun 21 13:41:00 CEST 2003 Jan Hubicka <jh@suse.cz>
* toplev.h (decode_g_option): New.

2003-06-20 Aldy Hernandez <aldyh@redhat.com>

PR/11092
* config/rs6000/rs6000.h (LEGITIMATE_CONSTANT_P): Adjust for
vectors.
Expand Down Expand Up @@ -120,7 +129,7 @@ Sat Jun 21 13:41:00 CEST 2003 Jan Hubicka <jh@suse.cz>
to ASM_OUTPUT_SOURCE_LINE.

2003-06-20 Daniel Egger <degger@fhm.edu>
Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>

* doc/install.texi (Building): Correct and improve statement
about parallel builds.
Expand Down
28 changes: 0 additions & 28 deletions gcc/aclocal.m4
Original file line number Diff line number Diff line change
Expand Up @@ -564,34 +564,6 @@ AC_CACHE_CHECK(for __int64, ac_cv_c___int64,
fi
])

dnl Host character set probe.
dnl The EBCDIC values match the table in config/i370/i370.c;
dnl there are other versions of EBCDIC but GCC won't work with them.
dnl
AC_DEFUN([gcc_AC_C_CHARSET],
[AC_CACHE_CHECK(execution character set, ac_cv_c_charset,
[AC_EGREP_CPP(ASCII,
[#if '\n' == 0x0A && ' ' == 0x20 && '0' == 0x30 \
&& 'A' == 0x41 && 'a' == 0x61 && '!' == 0x21
ASCII
#endif], ac_cv_c_charset=ASCII)
if test x${ac_cv_c_charset+set} != xset; then
AC_EGREP_CPP(EBCDIC,
[#if '\n' == 0x15 && ' ' == 0x40 && '0' == 0xF0 \
&& 'A' == 0xC1 && 'a' == 0x81 && '!' == 0x5A
EBCDIC
#endif], ac_cv_c_charset=EBCDIC)
fi
if test x${ac_cv_c_charset+set} != xset; then
ac_cv_c_charset=unknown
fi])
if test $ac_cv_c_charset = unknown; then
AC_MSG_ERROR([*** Cannot determine host character set.])
elif test $ac_cv_c_charset = EBCDIC; then
AC_DEFINE(HOST_EBCDIC, 1,
[Define if the host execution character set is EBCDIC.])
fi])

#serial AM2

dnl From Bruno Haible.
Expand Down
3 changes: 0 additions & 3 deletions gcc/config.in
Original file line number Diff line number Diff line change
Expand Up @@ -321,9 +321,6 @@
/* The number of bytes in type __int64 */
#undef SIZEOF___INT64

/* Define if the host execution character set is EBCDIC. */
#undef HOST_EBCDIC

/* Define if you want more run-time sanity checks. This one gets a grab
bag of miscellaneous but relatively cheap checks. */
#undef ENABLE_CHECKING
Expand Down
17 changes: 8 additions & 9 deletions gcc/config/i370/i370.c
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ static bool i370_rtx_costs PARAMS ((rtx, int, int, int *));
#ifdef TARGET_HLASM

#define MVS_HASH_PRIME 999983
#if defined(HOST_EBCDIC)
#if HOST_CHARSET == HC_EBCDIC
#define MVS_SET_SIZE 256
#else
#define MVS_SET_SIZE 128
Expand Down Expand Up @@ -156,7 +156,7 @@ static alias_node_t *alias_anchor = 0;
and must handled in a special manner. */
static const char *const mvs_function_table[MVS_FUNCTION_TABLE_LENGTH] =
{
#if defined(HOST_EBCDIC) /* Changed for EBCDIC collating sequence */
#if HOST_CHARSET == HC_EBCDIC /* Changed for EBCDIC collating sequence */
"ceil", "edc_acos", "edc_asin", "edc_atan", "edc_ata2", "edc_cos",
"edc_cosh", "edc_erf", "edc_erfc", "edc_exp", "edc_gamm", "edc_lg10",
"edc_log", "edc_sin", "edc_sinh", "edc_sqrt", "edc_tan", "edc_tanh",
Expand All @@ -176,7 +176,7 @@ static const char *const mvs_function_table[MVS_FUNCTION_TABLE_LENGTH] =
#endif /* TARGET_HLASM */
/* ===================================================== */

#if defined(TARGET_EBCDIC) && !defined(HOST_EBCDIC)
#if defined(TARGET_EBCDIC) && HOST_CHARSET == HC_ASCII
/* ASCII to EBCDIC conversion table. */
static const unsigned char ascebc[256] =
{
Expand Down Expand Up @@ -229,10 +229,9 @@ static const unsigned char ascebc[256] =
0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F,
0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0xFF
};
#endif /* TARGET_EBCDIC && ! HOST_EBCDIC */
#endif /* target EBCDIC, host ASCII */


#if defined(HOST_EBCDIC) && !defined(TARGET_EBCDIC)
#if !defined(TARGET_EBCDIC) && HOST_CHARSET == HC_EBCDIC
/* EBCDIC to ASCII conversion table. */
static const unsigned char ebcasc[256] =
{
Expand Down Expand Up @@ -301,7 +300,7 @@ static const unsigned char ebcasc[256] =
/*F8 8 9 */
0x38, 0x39, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF
};
#endif /* HOST_EBCDIC && ! TARGET_EBCDIC */
#endif /* target ASCII, host EBCDIC */

/* Initialize the GCC target structure. */
#ifdef TARGET_HLASM
Expand Down Expand Up @@ -351,11 +350,11 @@ char
mvs_map_char (c)
int c;
{
#if defined(TARGET_EBCDIC) && !defined(HOST_EBCDIC)
#if defined(TARGET_EBCDIC) && HOST_CHARSET == HC_ASCII
fprintf (stderr, "mvs_map_char: TE & !HE: c = %02x\n", c);
return ascebc[c];
#else
#if defined(HOST_EBCDIC) && !defined(TARGET_EBCDIC)
#if !defined(TARGET_EBCDIC) && HOST_CHARSET == HC_EBCDIC
fprintf (stderr, "mvs_map_char: !TE & HE: c = %02x\n", c);
return ebcasc[c];
#else
Expand Down
2 changes: 1 addition & 1 deletion gcc/config/i370/i370.h
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ extern size_t mvs_function_name_length;
/* but only define it if really needed, since otherwise it will break builds */

#ifdef TARGET_EBCDIC
#ifdef HOST_EBCDIC
#if HOST_CHARSET == HC_EBCDIC
#define MAP_CHARACTER(c) ((char)(c))
#else
#define MAP_CHARACTER(c) ((char)mvs_map_char (c))
Expand Down
Loading

0 comments on commit 05b9364

Please sign in to comment.