Commit 75e93faa by Zack Weinberg

aclocal.m4 (gcc_AC_COMPILE_CHECK_SIZEOF, [...]): New.

	* aclocal.m4 (gcc_AC_COMPILE_CHECK_SIZEOF, gcc_AC_C_CHAR_BIT,
	gcc_AC_C_LONG_LONG): New.
	* configure.in: Use them.  Probe the size of short, int, long,
	and long long/__int64 if we have them.  Move all the AC_C_*
	checks together, except gcc_AC_C_CHAR_BIT which has to go
	after AC_CHECK_HEADERS(limits.h).
	Take hwint.h out of host_xm_file and build_xm_file.

	* hwint.h: Unconditionally define HOST_BITS_PER_CHAR,
	HOST_BITS_PER_SHORT, HOST_BITS_PER_INT, HOST_BITS_PER_LONG,
	and HOST_BITS_PER_LONGLONG in terms of SIZEOF_* and CHAR_BIT.
	Move the HOST_WIDEST_INT setup logic here from system.h.
	Provide HOST_WIDEST_INT even if HOST_BITS_PER_LONGLONG is not
	defined.
	* system.h: Include hwint.h after limits.h.  HOST_WIDEST_INT
	is now handled by hwint.h.

	* config/alpha/xm-alpha-interix.h, config/alpha/xm-vms.h,
	config/c4x/xm-c4x.h, config/i370/xm-oe.h,
	config/ia64/xm-ia64.h: Don't define any of:
	HOST_BITS_PER_LONG, HOST_BITS_PER_CHAR, HOST_BITS_PER_SHORT,
	HOST_BITS_PER_LONGLONG.

	* config/alpha/xm-alpha.h, config/dsp16xx/xm-dsp16xx.h,
	config/h8300/xm-h8300.h, config/mips/iris6.h,
	config/mn10200/xm-mn10200.h, config/pa/xm-pa64hpux.h,
	config/sparc/xm-sp64.h: Delete.
	* config.gcc: Remove references to deleted files.

	* config/arm/xm-arm.h, config/mips/xm-mips.h: Don't define
	HOST_FLOAT_FORMAT to IEEE_FLOAT_FORMAT.
	* config/i370/xm-linux.h: Clarify floating-point situation in
	a comment.

From-SVN: r40446
parent 41947a54
2001-03-13 Zack Weinberg <zackw@stanford.edu>
* aclocal.m4 (gcc_AC_COMPILE_CHECK_SIZEOF, gcc_AC_C_CHAR_BIT,
gcc_AC_C_LONG_LONG): New.
* configure.in: Use them. Probe the size of short, int, long,
and long long/__int64 if we have them. Move all the AC_C_*
checks together, except gcc_AC_C_CHAR_BIT which has to go
after AC_CHECK_HEADERS(limits.h).
Take hwint.h out of host_xm_file and build_xm_file.
* hwint.h: Unconditionally define HOST_BITS_PER_CHAR,
HOST_BITS_PER_SHORT, HOST_BITS_PER_INT, HOST_BITS_PER_LONG,
and HOST_BITS_PER_LONGLONG in terms of SIZEOF_* and CHAR_BIT.
Move the HOST_WIDEST_INT setup logic here from system.h.
Provide HOST_WIDEST_INT even if HOST_BITS_PER_LONGLONG is not
defined.
* system.h: Include hwint.h after limits.h. HOST_WIDEST_INT
is now handled by hwint.h.
* config/alpha/xm-alpha-interix.h, config/alpha/xm-vms.h,
config/c4x/xm-c4x.h, config/i370/xm-oe.h,
config/ia64/xm-ia64.h: Don't define any of:
HOST_BITS_PER_LONG, HOST_BITS_PER_CHAR, HOST_BITS_PER_SHORT,
HOST_BITS_PER_LONGLONG.
* config/alpha/xm-alpha.h, config/dsp16xx/xm-dsp16xx.h,
config/h8300/xm-h8300.h, config/mips/iris6.h,
config/mn10200/xm-mn10200.h, config/pa/xm-pa64hpux.h,
config/sparc/xm-sp64.h: Delete.
* config.gcc: Remove references to deleted files.
* config/arm/xm-arm.h, config/mips/xm-mips.h: Don't define
HOST_FLOAT_FORMAT to IEEE_FLOAT_FORMAT.
* config/i370/xm-linux.h: Clarify floating-point situation in
a comment.
2001-03-13 Neil Booth <neil@daikokuya.demon.co.uk> 2001-03-13 Neil Booth <neil@daikokuya.demon.co.uk>
* cppfiles.c (NO_INCLUDE_PATH): New macro. * cppfiles.c (NO_INCLUDE_PATH): New macro.
......
...@@ -1123,3 +1123,109 @@ else ...@@ -1123,3 +1123,109 @@ else
gcc_cv_prog_$2_modern=no gcc_cv_prog_$2_modern=no
fi fi
]) ])
dnl Determine if enumerated bitfields are unsigned. ISO C says they can
dnl be either signed or unsigned.
dnl
AC_DEFUN(gcc_AC_C_ENUM_BF_UNSIGNED,
[AC_CACHE_CHECK(for unsigned enumerated bitfields, gcc_cv_enum_bf_unsigned,
[AC_TRY_RUN(#include <stdlib.h>
enum t { BLAH = 128 } ;
struct s_t { enum t member : 8; } s ;
int main(void)
{
s.member = BLAH;
if (s.member < 0) exit(1);
exit(0);
}, gcc_cv_enum_bf_unsigned=yes, gcc_cv_enum_bf_unsigned=no, gcc_cv_enum_bf_unsigned=yes)])
if test $gcc_cv_enum_bf_unsigned = yes; then
AC_DEFINE(ENUM_BITFIELDS_ARE_UNSIGNED, 1,
[Define if enumerated bitfields are treated as unsigned values.])
fi])
dnl Host type sizes probe.
dnl By Kaveh R. Ghazi. One typo fixed since.
dnl
AC_DEFUN([gcc_AC_COMPILE_CHECK_SIZEOF],
[changequote(<<, >>)dnl
dnl The name to #define.
define(<<AC_TYPE_NAME>>, translit(sizeof_$1, [a-z *], [A-Z_P]))dnl
dnl The cache variable name.
define(<<AC_CV_NAME>>, translit(ac_cv_sizeof_$1, [ *], [_p]))dnl
changequote([, ])dnl
AC_MSG_CHECKING(size of $1)
AC_CACHE_VAL(AC_CV_NAME,
[for ac_size in 4 8 1 2 16 $3 ; do # List sizes in rough order of prevalence.
AC_TRY_COMPILE([#include "confdefs.h"
#include <sys/types.h>
$2
], [switch (0) case 0: case (sizeof ($1) == $ac_size):;], AC_CV_NAME=$ac_size)
if test x$AC_CV_NAME != x ; then break; fi
done
])
if test x$AC_CV_NAME = x ; then
AC_MSG_ERROR([cannot determine a size for $1])
fi
AC_MSG_RESULT($AC_CV_NAME)
AC_DEFINE_UNQUOTED(AC_TYPE_NAME, $AC_CV_NAME, [The number of bytes in type $1])
undefine([AC_TYPE_NAME])dnl
undefine([AC_CV_NAME])dnl
])
dnl Probe number of bits in a byte.
dnl Note C89 requires CHAR_BIT >= 8.
dnl
AC_DEFUN(gcc_AC_C_CHAR_BIT,
[AC_CACHE_CHECK(for CHAR_BIT, gcc_cv_decl_char_bit,
[AC_EGREP_CPP(found,
[#ifdef HAVE_LIMITS_H
#include <limits.h>
#endif
#ifdef CHAR_BIT
found
#endif], gcc_cv_decl_char_bit=yes, gcc_cv_decl_char_bit=no)
])
if test $gcc_cv_decl_char_bit = no; then
AC_CACHE_CHECK(number of bits in a byte, gcc_cv_c_nbby,
[i=8
gcc_cv_c_nbby=
while test $i -lt 65; do
AC_TRY_COMPILE(,
[switch(0) { case 0: case (char)(1 << $i) && (char)(1 << $i) != 1: ; }],
gcc_cv_c_nbby=$i
break)
i=`expr $i + 1`
done
test -z "$gcc_cv_c_nbby" && gcc_cv_c_nbby=failed
])
if test $gcc_cv_c_nbby = failed; then
AC_MSG_ERROR(cannot determine number of bits in a byte)
else
AC_DEFINE_UNQUOTED(CHAR_BIT, $gcc_cv_c_nbby,
[Define as the number of bits in a byte, if \`limits.h' doesn't.])
fi
fi])
dnl Checking for long long.
dnl By Caolan McNamara <caolan@skynet.ie>
dnl Added check for __int64, Zack Weinberg <zackw@stanford.edu>
dnl
AC_DEFUN([gcc_AC_C_LONG_LONG],
[AC_CACHE_CHECK(for long long int, ac_cv_c_long_long,
[AC_TRY_COMPILE(,[long long int i;],
ac_cv_c_long_long=yes,
ac_cv_c_long_long=no)])
if test $ac_cv_c_long_long = yes; then
AC_DEFINE(HAVE_LONG_LONG, 1,
[Define if your compiler supports the \`long long' type.])
fi
AC_CACHE_CHECK(for __int64, ac_cv_c___int64,
[AC_TRY_COMPILE(,[__int64 i;],
ac_cv_c___int64=yes,
ac_cv_c___int64=no)])
if test $ac_cv_c___int64 = yes; then
AC_DEFINE(HAVE___INT64, 1,
[Define if your compiler supports the \`__int64' type.])
fi
])
...@@ -357,7 +357,7 @@ alpha-*-interix) ...@@ -357,7 +357,7 @@ alpha-*-interix)
target_cpu_default="MASK_GAS|MASK_IEEE_CONFORMANT" target_cpu_default="MASK_GAS|MASK_IEEE_CONFORMANT"
xm_defines=USG xm_defines=USG
xm_file="alpha/xm-alpha.h alpha/xm-alpha-interix.h xm-interix.h" xm_file="alpha/xm-alpha-interix.h xm-interix.h"
xmake_file=x-interix xmake_file=x-interix
tmake_file="alpha/t-alpha alpha/t-interix alpha/t-ieee" tmake_file="alpha/t-alpha alpha/t-interix alpha/t-ieee"
if test x$enable_threads = xyes ; then if test x$enable_threads = xyes ; then
...@@ -661,7 +661,6 @@ hppa*-*-openbsd*) ...@@ -661,7 +661,6 @@ hppa*-*-openbsd*)
;; ;;
hppa1.1-*-rtems*) hppa1.1-*-rtems*)
tm_file="pa/pa-pro.h ${tm_file} pa/pa-pro-end.h libgloss.h pa/rtems.h" tm_file="pa/pa-pro.h ${tm_file} pa/pa-pro-end.h libgloss.h pa/rtems.h"
xm_file=pa/xm-papro.h
tmake_file="pa/t-pro t-rtems" tmake_file="pa/t-pro t-rtems"
if test x$enable_threads = xyes; then if test x$enable_threads = xyes; then
thread_file='rtems' thread_file='rtems'
...@@ -670,7 +669,6 @@ hppa1.1-*-rtems*) ...@@ -670,7 +669,6 @@ hppa1.1-*-rtems*)
hppa1.1-*-pro*) hppa1.1-*-pro*)
target_cpu_default="(MASK_JUMP_IN_DELAY | MASK_PORTABLE_RUNTIME | MASK_GAS | MASK_NO_SPACE_REGS | MASK_SOFT_FLOAT)" target_cpu_default="(MASK_JUMP_IN_DELAY | MASK_PORTABLE_RUNTIME | MASK_GAS | MASK_NO_SPACE_REGS | MASK_SOFT_FLOAT)"
tm_file="${tm_file} pa/pa32-regs.h elfos.h pa/elf.h pa/pa-pro-end.h libgloss.h" tm_file="${tm_file} pa/pa32-regs.h elfos.h pa/elf.h pa/pa-pro-end.h libgloss.h"
xm_file=pa/xm-papro.h
tmake_file=pa/t-pro tmake_file=pa/t-pro
;; ;;
hppa1.1-*-osf*) hppa1.1-*-osf*)
...@@ -681,7 +679,6 @@ hppa1.1-*-osf*) ...@@ -681,7 +679,6 @@ hppa1.1-*-osf*)
hppa1.1-*-rtems*) hppa1.1-*-rtems*)
target_cpu_default="(MASK_JUMP_IN_DELAY | MASK_PORTABLE_RUNTIME | MASK_GAS | MASK_NO_SPACE_REGS | MASK_SOFT_FLOAT)" target_cpu_default="(MASK_JUMP_IN_DELAY | MASK_PORTABLE_RUNTIME | MASK_GAS | MASK_NO_SPACE_REGS | MASK_SOFT_FLOAT)"
tm_file="${tm_file} pa/pa32-regs.h elfos.h pa/elf.h pa/pa-pro-end.h libgloss.h pa/rtems.h" tm_file="${tm_file} pa/pa32-regs.h elfos.h pa/elf.h pa/pa-pro-end.h libgloss.h pa/rtems.h"
xm_file=pa/xm-papro.h
tmake_file=pa/t-pro tmake_file=pa/t-pro
;; ;;
hppa1.0-*-osf*) hppa1.0-*-osf*)
...@@ -700,7 +697,6 @@ hppa1.0-*-bsd*) ...@@ -700,7 +697,6 @@ hppa1.0-*-bsd*)
hppa1.0-*-hpux7*) hppa1.0-*-hpux7*)
tm_file="pa/pa-oldas.h ${tm_file} pa/pa32-regs.h pa/som.h pa/pa-hpux7.h" tm_file="pa/pa-oldas.h ${tm_file} pa/pa32-regs.h pa/som.h pa/pa-hpux7.h"
xm_defines=USG xm_defines=USG
xm_file=pa/xm-pahpux.h
xmake_file=pa/x-pa-hpux xmake_file=pa/x-pa-hpux
if test x$gas = xyes if test x$gas = xyes
then then
...@@ -712,7 +708,6 @@ hppa1.0-*-hpux7*) ...@@ -712,7 +708,6 @@ hppa1.0-*-hpux7*)
hppa1.0-*-hpux8.0[0-2]*) hppa1.0-*-hpux8.0[0-2]*)
tm_file="${tm_file} pa/pa32-regs.h pa/som.h pa/pa-hpux.h" tm_file="${tm_file} pa/pa32-regs.h pa/som.h pa/pa-hpux.h"
xm_defines=USG xm_defines=USG
xm_file=pa/xm-pahpux.h
xmake_file=pa/x-pa-hpux xmake_file=pa/x-pa-hpux
if test x$gas = xyes if test x$gas = xyes
then then
...@@ -727,7 +722,6 @@ hppa1.1-*-hpux8.0[0-2]*) ...@@ -727,7 +722,6 @@ hppa1.1-*-hpux8.0[0-2]*)
target_cpu_default="MASK_PA_11" target_cpu_default="MASK_PA_11"
tm_file="${tm_file} pa/pa32-regs.h pa/som.h pa/pa-hpux.h" tm_file="${tm_file} pa/pa32-regs.h pa/som.h pa/pa-hpux.h"
xm_defines=USG xm_defines=USG
xm_file=pa/xm-pahpux.h
xmake_file=pa/x-pa-hpux xmake_file=pa/x-pa-hpux
if test x$gas = xyes if test x$gas = xyes
then then
...@@ -742,7 +736,6 @@ hppa1.1-*-hpux8*) ...@@ -742,7 +736,6 @@ hppa1.1-*-hpux8*)
target_cpu_default="MASK_PA_11" target_cpu_default="MASK_PA_11"
tm_file="${tm_file} pa/pa32-regs.h pa/som.h pa/pa-hpux.h" tm_file="${tm_file} pa/pa32-regs.h pa/som.h pa/pa-hpux.h"
xm_defines=USG xm_defines=USG
xm_file=pa/xm-pahpux.h
xmake_file=pa/x-pa-hpux xmake_file=pa/x-pa-hpux
if test x$gas = xyes if test x$gas = xyes
then then
...@@ -754,7 +747,6 @@ hppa1.1-*-hpux8*) ...@@ -754,7 +747,6 @@ hppa1.1-*-hpux8*)
hppa1.0-*-hpux8*) hppa1.0-*-hpux8*)
tm_file="${tm_file} pa/pa32-regs.h pa/som.h pa/pa-hpux.h" tm_file="${tm_file} pa/pa32-regs.h pa/som.h pa/pa-hpux.h"
xm_defines=USG xm_defines=USG
xm_file=pa/xm-pahpux.h
xmake_file=pa/x-pa-hpux xmake_file=pa/x-pa-hpux
if test x$gas = xyes if test x$gas = xyes
then then
...@@ -768,7 +760,6 @@ hppa1.1-*-hpux10* | hppa2*-*-hpux10*) ...@@ -768,7 +760,6 @@ hppa1.1-*-hpux10* | hppa2*-*-hpux10*)
tm_file="${tm_file} pa/pa32-regs.h pa/long_double.h pa/som.h pa/pa-hpux.h pa/pa-hpux10.h" tm_file="${tm_file} pa/pa32-regs.h pa/long_double.h pa/som.h pa/pa-hpux.h pa/pa-hpux10.h"
float_format=i128 float_format=i128
xm_defines=USG xm_defines=USG
xm_file=pa/xm-pahpux.h
xmake_file=pa/x-pa-hpux xmake_file=pa/x-pa-hpux
tmake_file=pa/t-pa tmake_file=pa/t-pa
if test x$gas = xyes if test x$gas = xyes
...@@ -790,7 +781,6 @@ hppa1.0-*-hpux10*) ...@@ -790,7 +781,6 @@ hppa1.0-*-hpux10*)
tm_file="${tm_file} pa/pa32-regs.h pa/long_double.h pa/som.h pa/pa-hpux.h pa/pa-hpux10.h" tm_file="${tm_file} pa/pa32-regs.h pa/long_double.h pa/som.h pa/pa-hpux.h pa/pa-hpux10.h"
float_format=i128 float_format=i128
xm_defines=USG xm_defines=USG
xm_file=pa/xm-pahpux.h
xmake_file=pa/x-pa-hpux xmake_file=pa/x-pa-hpux
tmake_file=pa/t-pa tmake_file=pa/t-pa
if test x$gas = xyes if test x$gas = xyes
...@@ -810,7 +800,6 @@ hppa1.0-*-hpux10*) ...@@ -810,7 +800,6 @@ hppa1.0-*-hpux10*)
;; ;;
hppa*64*-*-hpux11*) hppa*64*-*-hpux11*)
xm_defines=USG xm_defines=USG
xm_file=pa/xm-pa64hpux.h
xmake_file=pa/x-pa-hpux xmake_file=pa/x-pa-hpux
tmake_file=pa/t-pa tmake_file=pa/t-pa
tm_file="pa/pa64-start.h ${tm_file} pa/pa64-regs.h pa/long_double.h pa/elf.h pa/pa-hpux.h pa/pa-hpux11.h pa/pa-64.h" tm_file="pa/pa64-start.h ${tm_file} pa/pa64-regs.h pa/long_double.h pa/elf.h pa/pa-hpux.h pa/pa-hpux11.h pa/pa-64.h"
...@@ -837,7 +826,6 @@ hppa1.1-*-hpux11* | hppa2*-*-hpux11*) ...@@ -837,7 +826,6 @@ hppa1.1-*-hpux11* | hppa2*-*-hpux11*)
tm_file="${tm_file} pa/pa32-regs.h pa/long_double.h pa/som.h pa/pa-hpux.h pa/pa-hpux11.h" tm_file="${tm_file} pa/pa32-regs.h pa/long_double.h pa/som.h pa/pa-hpux.h pa/pa-hpux11.h"
float_format=i128 float_format=i128
xm_defines=USG xm_defines=USG
xm_file=pa/xm-pahpux.h
xmake_file=pa/x-pa-hpux xmake_file=pa/x-pa-hpux
tmake_file=pa/t-pa tmake_file=pa/t-pa
if test x$gas = xyes if test x$gas = xyes
...@@ -858,7 +846,6 @@ hppa1.0-*-hpux11*) ...@@ -858,7 +846,6 @@ hppa1.0-*-hpux11*)
tm_file="${tm_file} pa/pa32-regs.h pa/long_double.h pa/som.h pa/pa-hpux.h pa/pa-hpux11.h" tm_file="${tm_file} pa/pa32-regs.h pa/long_double.h pa/som.h pa/pa-hpux.h pa/pa-hpux11.h"
float_format=i128 float_format=i128
xm_defines=USG xm_defines=USG
xm_file=pa/xm-pahpux.h
xmake_file=pa/x-pa-hpux xmake_file=pa/x-pa-hpux
if test x$gas = xyes if test x$gas = xyes
then then
...@@ -878,7 +865,6 @@ hppa1.1-*-hpux* | hppa2*-*-hpux*) ...@@ -878,7 +865,6 @@ hppa1.1-*-hpux* | hppa2*-*-hpux*)
target_cpu_default="MASK_PA_11" target_cpu_default="MASK_PA_11"
tm_file="${tm_file} pa/pa32-regs.h pa/som.h pa/pa-hpux.h pa/pa-hpux9.h" tm_file="${tm_file} pa/pa32-regs.h pa/som.h pa/pa-hpux.h pa/pa-hpux9.h"
xm_defines=USG xm_defines=USG
xm_file=pa/xm-pahpux.h
xmake_file=pa/x-pa-hpux xmake_file=pa/x-pa-hpux
if test x$gas = xyes if test x$gas = xyes
then then
...@@ -890,7 +876,6 @@ hppa1.1-*-hpux* | hppa2*-*-hpux*) ...@@ -890,7 +876,6 @@ hppa1.1-*-hpux* | hppa2*-*-hpux*)
hppa1.0-*-hpux*) hppa1.0-*-hpux*)
tm_file="${tm_file} pa/pa32-regs.h pa/som.h pa/pa-hpux.h pa/pa-hpux9.h" tm_file="${tm_file} pa/pa32-regs.h pa/som.h pa/pa-hpux.h pa/pa-hpux9.h"
xm_defines=USG xm_defines=USG
xm_file=pa/xm-pahpux.h
xmake_file=pa/x-pa-hpux xmake_file=pa/x-pa-hpux
if test x$gas = xyes if test x$gas = xyes
then then
...@@ -903,7 +888,6 @@ hppa1.1-*-hiux* | hppa2*-*-hiux*) ...@@ -903,7 +888,6 @@ hppa1.1-*-hiux* | hppa2*-*-hiux*)
target_cpu_default="MASK_PA_11" target_cpu_default="MASK_PA_11"
tm_file="${tm_file} pa/pa32-regs.h pa/som.h pa/pa-hpux.h pa/pa-hiux.h" tm_file="${tm_file} pa/pa32-regs.h pa/som.h pa/pa-hpux.h pa/pa-hiux.h"
xm_defines=USG xm_defines=USG
xm_file=pa/xm-pahpux.h
xmake_file=pa/x-pa-hpux xmake_file=pa/x-pa-hpux
if test x$gas = xyes if test x$gas = xyes
then then
...@@ -915,7 +899,6 @@ hppa1.1-*-hiux* | hppa2*-*-hiux*) ...@@ -915,7 +899,6 @@ hppa1.1-*-hiux* | hppa2*-*-hiux*)
hppa1.0-*-hiux*) hppa1.0-*-hiux*)
tm_file="${tm_file} pa/pa32-regs.h pa/som.h pa/pa-hpux.h pa/pa-hiux.h" tm_file="${tm_file} pa/pa32-regs.h pa/som.h pa/pa-hpux.h pa/pa-hiux.h"
xm_defines=USG xm_defines=USG
xm_file=pa/xm-pahpux.h
xmake_file=pa/x-pa-hpux xmake_file=pa/x-pa-hpux
if test x$gas = xyes if test x$gas = xyes
then then
...@@ -2133,7 +2116,6 @@ mips-sgi-irix6*) # SGI System V.4., IRIX 6 ...@@ -2133,7 +2116,6 @@ mips-sgi-irix6*) # SGI System V.4., IRIX 6
fi fi
tmake_file=mips/t-iris6 tmake_file=mips/t-iris6
xm_defines=USG xm_defines=USG
xm_file='mips/xm-mips.h mips/xm-iris6.h'
xmake_file=mips/x-iris6 xmake_file=mips/x-iris6
# if test x$enable_threads = xyes; then # if test x$enable_threads = xyes; then
# thread_file='irix' # thread_file='irix'
...@@ -3036,7 +3018,6 @@ sparcv9-*-solaris2*) ...@@ -3036,7 +3018,6 @@ sparcv9-*-solaris2*)
else else
tm_file=sparc/sol2-sld-64.h tm_file=sparc/sol2-sld-64.h
fi fi
xm_file="sparc/xm-sysv4.h sparc/xm-sp64.h"
xm_defines="USG POSIX" xm_defines="USG POSIX"
tmake_file="sparc/t-sol2 sparc/t-sol2-64" tmake_file="sparc/t-sol2 sparc/t-sol2-64"
if test x$gnu_ld = xyes; then if test x$gnu_ld = xyes; then
...@@ -3062,7 +3043,6 @@ sparcv9-*-solaris2*) ...@@ -3062,7 +3043,6 @@ sparcv9-*-solaris2*)
fi fi
;; ;;
sparc-hal-solaris2*) sparc-hal-solaris2*)
xm_file="sparc/xm-sysv4.h"
xm_defines="USG POSIX" xm_defines="USG POSIX"
tm_file="sparc/sol2.h sparc/hal.h" tm_file="sparc/sol2.h sparc/hal.h"
tmake_file="sparc/t-halos sparc/t-sol2" tmake_file="sparc/t-halos sparc/t-sol2"
...@@ -3090,7 +3070,6 @@ sparc-*-solaris2*) ...@@ -3090,7 +3070,6 @@ sparc-*-solaris2*)
else else
tm_file=sparc/sol2-sld.h tm_file=sparc/sol2-sld.h
fi fi
xm_file="sparc/xm-sysv4.h"
xm_defines="USG POSIX" xm_defines="USG POSIX"
tmake_file=sparc/t-sol2 tmake_file=sparc/t-sol2
if test x$gnu_ld = xyes; then if test x$gnu_ld = xyes; then
...@@ -3154,14 +3133,12 @@ sparc-*-sunos3*) ...@@ -3154,14 +3133,12 @@ sparc-*-sunos3*)
;; ;;
sparc-*-sysv4*) sparc-*-sysv4*)
tm_file=sparc/sysv4.h tm_file=sparc/sysv4.h
xm_file="sparc/xm-sysv4.h"
xm_defines="USG POSIX" xm_defines="USG POSIX"
tmake_file=t-svr4 tmake_file=t-svr4
xmake_file=sparc/x-sysv4 xmake_file=sparc/x-sysv4
extra_parts="crtbegin.o crtend.o" extra_parts="crtbegin.o crtend.o"
;; ;;
sparc-*-vxsim*) sparc-*-vxsim*)
xm_file="sparc/xm-sysv4.h"
xm_defines="USG POSIX" xm_defines="USG POSIX"
tm_file=sparc/vxsim.h tm_file=sparc/vxsim.h
tmake_file=sparc/t-vxsparc tmake_file=sparc/t-vxsparc
...@@ -3204,7 +3181,6 @@ sparc64-*-elf*) ...@@ -3204,7 +3181,6 @@ sparc64-*-elf*)
;; ;;
sparc64-*-linux*) # 64-bit Sparc's running GNU/Linux sparc64-*-linux*) # 64-bit Sparc's running GNU/Linux
tmake_file="t-linux sparc/t-linux64" tmake_file="t-linux sparc/t-linux64"
xm_file="sparc/xm-sparc.h sparc/xm-sp64.h"
tm_file=sparc/linux64.h tm_file=sparc/linux64.h
xmake_file=x-linux xmake_file=x-linux
extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o" extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
......
...@@ -293,15 +293,39 @@ ...@@ -293,15 +293,39 @@
character sets for source code. */ character sets for source code. */
#undef MULTIBYTE_CHARS #undef MULTIBYTE_CHARS
/* Always define this when using the GNU C Library */
#undef _GNU_SOURCE
/* Define if your compiler understands volatile. */ /* Define if your compiler understands volatile. */
#undef HAVE_VOLATILE #undef HAVE_VOLATILE
/* Define if your compiler supports the `long long' type. */
#undef HAVE_LONG_LONG
/* Define if your compiler supports the `__int64' type. */
#undef HAVE___INT64
/* The number of bytes in type short */
#undef SIZEOF_SHORT
/* The number of bytes in type int */
#undef SIZEOF_INT
/* The number of bytes in type long */
#undef SIZEOF_LONG
/* The number of bytes in type long long */
#undef SIZEOF_LONG_LONG
/* The number of bytes in type __int64 */
#undef SIZEOF___INT64
/* Always define this when using the GNU C Library */
#undef _GNU_SOURCE
/* Define if you can safely include both <string.h> and <strings.h>. */ /* Define if you can safely include both <string.h> and <strings.h>. */
#undef STRING_WITH_STRINGS #undef STRING_WITH_STRINGS
/* Define as the number of bits in a byte, if `limits.h' doesn't. */
#undef CHAR_BIT
/* Define if you have a working <inttypes.h> header file. */ /* Define if you have a working <inttypes.h> header file. */
#undef HAVE_INTTYPES_H #undef HAVE_INTTYPES_H
......
/* Configuration for GNU compiler /* Configuration for GNU compiler
for an DEC/Compaq Alpha for an DEC/Compaq Alpha
Copyright (C) 1999 Free Software Foundation, Inc. Copyright (C) 1999, 2001 Free Software Foundation, Inc.
Donn Terry, Softway Systems, Inc. Donn Terry, Softway Systems, Inc.
derived from code by Douglas B. Rupp (drupp@cs.washington.edu) derived from code by Douglas B. Rupp (drupp@cs.washington.edu)
...@@ -21,9 +21,6 @@ along with GNU CC; see the file COPYING. If not, write to ...@@ -21,9 +21,6 @@ along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330, the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */ Boston, MA 02111-1307, USA. */
#undef HOST_BITS_PER_LONG
#define HOST_BITS_PER_LONG 32
#define HOST_BITS_PER_WIDE_INT 64 #define HOST_BITS_PER_WIDE_INT 64
#ifdef __GNUC__ #ifdef __GNUC__
# define HOST_WIDE_INT long long # define HOST_WIDE_INT long long
...@@ -31,7 +28,6 @@ Boston, MA 02111-1307, USA. */ ...@@ -31,7 +28,6 @@ Boston, MA 02111-1307, USA. */
# define HOST_WIDE_INT __int64 # define HOST_WIDE_INT __int64
#endif #endif
#define HOST_BITS_PER_WIDEST_INT HOST_BITS_PER_LONGLONG #define HOST_BITS_PER_WIDEST_INT HOST_BITS_PER_LONGLONG
#ifdef __GNUC__ #ifdef __GNUC__
# define HOST_WIDEST_INT long long # define HOST_WIDEST_INT long long
......
/* Configuration for GNU C-compiler for DEC Alpha.
Copyright (C) 1990, 1992, 1993, 1994, 1995, 1998, 2001
Free Software Foundation, Inc.
Contributed by Richard Kenner (kenner@vlsi1.ultra.nyu.edu).
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* This describes the machine the compiler is hosted on. */
#define HOST_BITS_PER_LONG 64
...@@ -35,9 +35,6 @@ Boston, MA 02111-1307, USA. */ ...@@ -35,9 +35,6 @@ Boston, MA 02111-1307, USA. */
#undef FILE_TYPE #undef FILE_TYPE
#endif #endif
#undef HOST_BITS_PER_LONG
#define HOST_BITS_PER_LONG 32
#define HOST_WIDE_INT long long #define HOST_WIDE_INT long long
#define HOST_BITS_PER_WIDE_INT 64 #define HOST_BITS_PER_WIDE_INT 64
......
...@@ -22,11 +22,4 @@ the Free Software Foundation, 59 Temple Place - Suite 330, ...@@ -22,11 +22,4 @@ the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */ Boston, MA 02111-1307, USA. */
/* This describes the machine the compiler is hosted on. */ /* This describes the machine the compiler is hosted on. */
/* A code distinguishing the floating point format of the host
machine. There are three defined values: IEEE_FLOAT_FORMAT,
VAX_FLOAT_FORMAT, and UNKNOWN_FLOAT_FORMAT. */
#define HOST_FLOAT_FORMAT IEEE_FLOAT_FORMAT
#define HOST_FLOAT_WORDS_BIG_ENDIAN 1 #define HOST_FLOAT_WORDS_BIG_ENDIAN 1
/* This describes the machine the compiler is hosted on. */ /* This describes the machine the compiler is hosted on. */
#define HOST_BITS_PER_CHAR 32
#define HOST_BITS_PER_SHORT 32
#define HOST_WORDS_BIG_ENDIAN #define HOST_WORDS_BIG_ENDIAN
/* Configuration file for GNU CC for AT&T DSP1600.
Copyright (C) 1993, 2001 Free Software Foundation, Inc.
Contributed by Michael Collison (collison@world.std.com).
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* This describes the machine the compiler is hosted on. */
#define HOST_BITS_PER_INT 16
/* Configuration for GNU C-compiler for H8/300.
Copyright (C) 1993, 2001 Free Software Foundation, Inc.
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* This describes the machine the compiler is hosted on. */
#define HOST_BITS_PER_INT 16
...@@ -21,7 +21,7 @@ along with GNU CC; see the file COPYING. If not, write to ...@@ -21,7 +21,7 @@ along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330, the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */ Boston, MA 02111-1307, USA. */
/* This describes the machine the compiler is hosted on. */ /* Unlike MVS and OE, i370-linux uses IEEE floating point. */
#define HOST_FLOAT_FORMAT IEEE_FLOAT_FORMAT #define HOST_FLOAT_FORMAT IEEE_FLOAT_FORMAT
#define HOST_WORDS_BIG_ENDIAN #define HOST_WORDS_BIG_ENDIAN
...@@ -22,8 +22,6 @@ Boston, MA 02111-1307, USA. */ ...@@ -22,8 +22,6 @@ Boston, MA 02111-1307, USA. */
/* This describes the machine the compiler is hosted on. */ /* This describes the machine the compiler is hosted on. */
/* ??? Is this a typo? */
#define HOST_BITS_PER_LONGLONG 32
#define HOST_FLOAT_FORMAT IBM_FLOAT_FORMAT #define HOST_FLOAT_FORMAT IBM_FLOAT_FORMAT
#define HOST_EBCDIC 1 #define HOST_EBCDIC 1
......
...@@ -23,8 +23,3 @@ Boston, MA 02111-1307, USA. */ ...@@ -23,8 +23,3 @@ Boston, MA 02111-1307, USA. */
#ifdef __BIG_ENDIAN__ #ifdef __BIG_ENDIAN__
#define HOST_WORDS_BIG_ENDIAN #define HOST_WORDS_BIG_ENDIAN
#endif #endif
/* ??? This depends on the as yet unimplemented ILP32 option. */
/* A C expression for the number of bits in `long' on the host machine. */
#define HOST_BITS_PER_LONG 64
#undef HOST_BITS_PER_LONG
#define HOST_BITS_PER_LONG _MIPS_SZLONG
...@@ -23,9 +23,3 @@ Boston, MA 02111-1307, USA. */ ...@@ -23,9 +23,3 @@ Boston, MA 02111-1307, USA. */
#if !defined(MIPSEL) && !defined(__MIPSEL__) #if !defined(MIPSEL) && !defined(__MIPSEL__)
#define HOST_WORDS_BIG_ENDIAN #define HOST_WORDS_BIG_ENDIAN
#endif #endif
/* A code distinguishing the floating point format of the host
machine. There are three defined values: IEEE_FLOAT_FORMAT,
VAX_FLOAT_FORMAT, and UNKNOWN_FLOAT_FORMAT. */
#define HOST_FLOAT_FORMAT IEEE_FLOAT_FORMAT
/* Configuration for Matsushita MN10200.
Copyright (C) 1997, 1998, 1999, 2001 Free Software Foundation, Inc.
Contributed by Cygnus Support.
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* This describes the machine the compiler is hosted on. */
#define HOST_BITS_PER_INT 16
/* Configuration for GNU C-compiler for PA-RISC.
Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* This describes the machine the compiler is hosted on. */
#define HOST_BITS_PER_LONG 64
/* Doubles are stored in memory with the high order word first. This
matters when cross-compiling. */
#define HOST_WORDS_BIG_ENDIAN 1
/* Configuration for GCC for Sparc v9 running 64-bit native.
Copyright (C) 1997 Free Software Foundation, Inc.
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* This describes the machine the compiler is hosted on. */
#if defined(__arch64__) || defined(__sparcv9)
#undef HOST_BITS_PER_LONG
#define HOST_BITS_PER_LONG 64
#endif
...@@ -347,8 +347,6 @@ fi ...@@ -347,8 +347,6 @@ fi
AC_SUBST(NO_MINUS_C_MINUS_O) AC_SUBST(NO_MINUS_C_MINUS_O)
AC_SUBST(OUTPUT_OPTION) AC_SUBST(OUTPUT_OPTION)
gcc_AC_C_LONG_DOUBLE
AC_CACHE_CHECK(whether ${CC-cc} accepts -Wno-long-long, AC_CACHE_CHECK(whether ${CC-cc} accepts -Wno-long-long,
ac_cv_prog_cc_no_long_long, ac_cv_prog_cc_no_long_long,
[save_CFLAGS="$CFLAGS" [save_CFLAGS="$CFLAGS"
...@@ -362,6 +360,23 @@ if test $ac_cv_prog_cc_no_long_long = yes; then ...@@ -362,6 +360,23 @@ if test $ac_cv_prog_cc_no_long_long = yes; then
fi fi
AC_SUBST(strict1_warn) AC_SUBST(strict1_warn)
AC_C_INLINE
gcc_AC_C_VOLATILE
gcc_AC_C_LONG_DOUBLE
gcc_AC_C_LONG_LONG
# sizeof(char) is 1 by definition.
gcc_AC_COMPILE_CHECK_SIZEOF(short)
gcc_AC_COMPILE_CHECK_SIZEOF(int)
gcc_AC_COMPILE_CHECK_SIZEOF(long)
if test $ac_cv_c_long_long = yes; then
gcc_AC_COMPILE_CHECK_SIZEOF(long long)
fi
if test $ac_cv_c___int64 = yes; then
gcc_AC_COMPILE_CHECK_SIZEOF(__int64)
fi
# If the native compiler is GCC, we can enable warnings even in stage1. # If the native compiler is GCC, we can enable warnings even in stage1.
# That's useful for people building cross-compilers, or just running a # That's useful for people building cross-compilers, or just running a
# quick `make'. # quick `make'.
...@@ -423,13 +438,10 @@ if test $gcc_cv_glibc = yes; then ...@@ -423,13 +438,10 @@ if test $gcc_cv_glibc = yes; then
AC_DEFINE(_GNU_SOURCE, 1, [Always define this when using the GNU C Library]) AC_DEFINE(_GNU_SOURCE, 1, [Always define this when using the GNU C Library])
fi fi
AC_C_INLINE
# Find some useful tools # Find some useful tools
AC_PROG_AWK AC_PROG_AWK
gcc_AC_PROG_LN gcc_AC_PROG_LN
gcc_AC_PROG_LN_S gcc_AC_PROG_LN_S
gcc_AC_C_VOLATILE
AC_PROG_RANLIB AC_PROG_RANLIB
gcc_AC_PROG_INSTALL gcc_AC_PROG_INSTALL
...@@ -446,6 +458,9 @@ AC_CHECK_HEADERS(limits.h stddef.h string.h strings.h stdlib.h time.h \ ...@@ -446,6 +458,9 @@ AC_CHECK_HEADERS(limits.h stddef.h string.h strings.h stdlib.h time.h \
AC_CHECK_HEADER(thread.h, [have_thread_h=yes], [have_thread_h=]) AC_CHECK_HEADER(thread.h, [have_thread_h=yes], [have_thread_h=])
AC_CHECK_HEADER(pthread.h, [have_pthread_h=yes], [have_pthread_h=]) AC_CHECK_HEADER(pthread.h, [have_pthread_h=yes], [have_pthread_h=])
# This test can't be done till we know if we have limits.h.
gcc_AC_C_CHAR_BIT
# See if GNAT has been installed # See if GNAT has been installed
AC_CHECK_PROG(have_gnat, gnatbind, yes, no) AC_CHECK_PROG(have_gnat, gnatbind, yes, no)
...@@ -783,8 +798,8 @@ else ...@@ -783,8 +798,8 @@ else
fi fi
tm_file="${tm_file} defaults.h" tm_file="${tm_file} defaults.h"
host_xm_file="auto-host.h gansidecl.h ${host_xm_file} ${tm_file} hwint.h" host_xm_file="auto-host.h gansidecl.h ${host_xm_file} ${tm_file}"
build_xm_file="${build_auto} gansidecl.h ${build_xm_file} ${tm_file} hwint.h" build_xm_file="${build_auto} gansidecl.h ${build_xm_file} ${tm_file}"
xm_file="gansidecl.h ${xm_file} ${tm_file}" xm_file="gansidecl.h ${xm_file} ${tm_file}"
# Truncate the target if necessary # Truncate the target if necessary
...@@ -970,7 +985,7 @@ done ...@@ -970,7 +985,7 @@ done
host_xm_file_list= host_xm_file_list=
for f in $host_xm_file; do for f in $host_xm_file; do
case $f in case $f in
auto-host.h | gansidecl.h | defaults.h | hwint.h ) auto-host.h | gansidecl.h | defaults.h )
host_xm_file_list="${host_xm_file_list} $f" ;; host_xm_file_list="${host_xm_file_list} $f" ;;
*) host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f" ;; *) host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f" ;;
esac esac
...@@ -979,7 +994,7 @@ done ...@@ -979,7 +994,7 @@ done
build_xm_file_list= build_xm_file_list=
for f in $build_xm_file; do for f in $build_xm_file; do
case $f in case $f in
auto-build.h | auto-host.h | gansidecl.h | defaults.h | hwint.h ) auto-build.h | auto-host.h | gansidecl.h | defaults.h )
build_xm_file_list="${build_xm_file_list} $f" ;; build_xm_file_list="${build_xm_file_list} $f" ;;
*) build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f" ;; *) build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f" ;;
esac esac
......
...@@ -9,24 +9,21 @@ ...@@ -9,24 +9,21 @@
#ifndef __HWINT_H__ #ifndef __HWINT_H__
#define __HWINT_H__ #define __HWINT_H__
/* This describes the machine the compiler is hosted on. The defaults /* This describes the machine the compiler is hosted on. */
we provide describe the standard 32 bit host since that is the most #define HOST_BITS_PER_CHAR CHAR_BIT
common type supported in gcc. */ #define HOST_BITS_PER_SHORT (CHAR_BIT * SIZEOF_SHORT)
#ifndef HOST_BITS_PER_CHAR #define HOST_BITS_PER_INT (CHAR_BIT * SIZEOF_INT)
# define HOST_BITS_PER_CHAR 8 #define HOST_BITS_PER_LONG (CHAR_BIT * SIZEOF_LONG)
#endif
#ifndef HOST_BITS_PER_SHORT #ifdef HAVE_LONG_LONG
# define HOST_BITS_PER_SHORT 16 # define HOST_BITS_PER_LONGLONG (CHAR_BIT * SIZEOF_LONG_LONG)
#endif #else
#ifndef HOST_BITS_PER_INT /* If we're here and we're GCC, assume this is stage 2+ of a bootstrap
# define HOST_BITS_PER_INT 32 and 'long long' has the width of the *target*'s long long. */
#endif # if GCC_VERSION > 3000
#ifndef HOST_BITS_PER_LONG # define HOST_BITS_PER_LONGLONG LONG_LONG_TYPE_SIZE
# define HOST_BITS_PER_LONG 32 # endif /* gcc */
#endif #endif /* no long long */
#ifndef HOST_BITS_PER_LONGLONG
# define HOST_BITS_PER_LONGLONG 64
#endif
/* Find the largest host integer type and set its size and type. */ /* Find the largest host integer type and set its size and type. */
...@@ -42,7 +39,6 @@ ...@@ -42,7 +39,6 @@
#endif /* ! HOST_BITS_PER_WIDE_INT */ #endif /* ! HOST_BITS_PER_WIDE_INT */
/* Provide defaults for the way to print a HOST_WIDE_INT /* Provide defaults for the way to print a HOST_WIDE_INT
in various manners. */ in various manners. */
...@@ -106,4 +102,25 @@ ...@@ -106,4 +102,25 @@
# endif # endif
#endif /* ! HOST_WIDE_INT_PRINT_DOUBLE_HEX */ #endif /* ! HOST_WIDE_INT_PRINT_DOUBLE_HEX */
/* Find HOST_WIDEST_INT and set its bit size, type and print macros.
It will be the largest integer mode supported by the host which may
(or may not) be larger than HOST_WIDE_INT. */
#ifndef HOST_WIDEST_INT
#if defined HOST_BITS_PER_LONGLONG \
&& HOST_BITS_PER_LONGLONG > HOST_BITS_PER_LONG
# define HOST_BITS_PER_WIDEST_INT HOST_BITS_PER_LONGLONG
# define HOST_WIDEST_INT long long
# define HOST_WIDEST_INT_PRINT_DEC "%lld"
# define HOST_WIDEST_INT_PRINT_UNSIGNED "%llu"
# define HOST_WIDEST_INT_PRINT_HEX "0x%llx"
# else
# define HOST_BITS_PER_WIDEST_INT HOST_BITS_PER_LONG
# define HOST_WIDEST_INT long
# define HOST_WIDEST_INT_PRINT_DEC "%ld"
# define HOST_WIDEST_INT_PRINT_UNSIGNED "%lu"
# define HOST_WIDEST_INT_PRINT_HEX "0x%lx"
# endif /* long long wider than long */
#endif /* ! HOST_WIDEST_INT */
#endif /* __HWINT_H__ */ #endif /* __HWINT_H__ */
...@@ -145,33 +145,8 @@ extern int errno; ...@@ -145,33 +145,8 @@ extern int errno;
# include <limits.h> # include <limits.h>
#endif #endif
/* Find HOST_WIDEST_INT and set its bit size, type and print macros. /* Get definitions of HOST_WIDE_INT and HOST_WIDEST_INT. */
It will be the largest integer mode supported by the host which may #include "hwint.h"
(or may not) be larger than HOST_WIDE_INT. This must appear after
<limits.h> since we only use `long long' if its bigger than a
`long' and also if it is supported by macros in limits.h. For old
hosts which don't have a limits.h (and thus won't include it in
stage2 cause we don't rerun configure) we assume gcc supports long
long.) Note, you won't get these defined if you don't include
{ht}config.h before this file to set the HOST_BITS_PER_* macros. */
#ifndef HOST_WIDEST_INT
# if defined (HOST_BITS_PER_LONG) && defined (HOST_BITS_PER_LONGLONG)
# if (HOST_BITS_PER_LONGLONG > HOST_BITS_PER_LONG) && (defined (LONG_LONG_MAX) || defined (LONGLONG_MAX) || defined (LLONG_MAX) || defined (__GNUC__))
# define HOST_BITS_PER_WIDEST_INT HOST_BITS_PER_LONGLONG
# define HOST_WIDEST_INT long long
# define HOST_WIDEST_INT_PRINT_DEC "%lld"
# define HOST_WIDEST_INT_PRINT_UNSIGNED "%llu"
# define HOST_WIDEST_INT_PRINT_HEX "0x%llx"
# else
# define HOST_BITS_PER_WIDEST_INT HOST_BITS_PER_LONG
# define HOST_WIDEST_INT long
# define HOST_WIDEST_INT_PRINT_DEC "%ld"
# define HOST_WIDEST_INT_PRINT_UNSIGNED "%lu"
# define HOST_WIDEST_INT_PRINT_HEX "0x%lx"
# endif /*(long long>long) && (LONG_LONG_MAX||LONGLONG_MAX||LLONG_MAX||GNUC)*/
# endif /* defined(HOST_BITS_PER_LONG) && defined(HOST_BITS_PER_LONGLONG) */
#endif /* ! HOST_WIDEST_INT */
/* Infrastructure for defining missing _MAX and _MIN macros. Note that /* Infrastructure for defining missing _MAX and _MIN macros. Note that
macros defined with these cannot be used in #if. */ macros defined with these cannot be used in #if. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment