rs6000: limits.h/__LONG_MAX__
Geoff Keating
geoffk@cygnus.com
Wed Jul 19 15:41:00 GMT 2000
This patch changes the way we change LONG_MAX on AIX64 to a #define
from the specs file rather than by looking at the values of various
other preprocessor flags. It's cleaner this way.
This patch (and the previous ones) were bootstrapped and tested on AIX
(including testing in 64-bit mode) and powerpc-linux.
--
- Geoffrey Keating <geoffk@cygnus.com>
===File ~/patches/cygnus/rs6000-64bugs3-3-limits.patch======
2000-07-17 Geoff Keating <geoffk@cygnus.com>
* config/rs6000/aix43.h (CPP_SPEC): Define __LONG_MAX__ correctly
in 64-bit mode.
* glimits.h: Don't do #if defined for ARCH_PPC.
Index: glimits.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/glimits.h,v
retrieving revision 1.9
diff -p -u -u -p -r1.9 glimits.h
--- glimits.h 2000/07/17 09:45:44 1.9
+++ glimits.h 2000/07/18 16:05:59
@@ -64,7 +64,7 @@
/* Minimum and maximum values a `signed long int' can hold.
(Same as `int'). */
#ifndef __LONG_MAX__
-#if defined (__alpha__) || (defined (_ARCH_PPC) && defined (__64BIT__)) || (defined (__sparc__) && defined(__arch64__)) || defined (__sparcv9)
+#if defined (__alpha__) || (defined (__sparc__) && defined(__arch64__)) || defined (__sparcv9)
#define __LONG_MAX__ 9223372036854775807L
#else
#define __LONG_MAX__ 2147483647L
Index: config/rs6000/aix43.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/rs6000/aix43.h,v
retrieving revision 1.14
diff -p -u -u -p -r1.14 aix43.h
--- config/rs6000/aix43.h 2000/06/27 02:26:23 1.14
+++ config/rs6000/aix43.h 2000/07/18 16:06:14
@@ -108,7 +108,7 @@ do { \
#undef CPP_SPEC
#define CPP_SPEC "%{posix: -D_POSIX_SOURCE}\
%{ansi: -D_ANSI_C_SOURCE}\
- %{maix64: -D__64BIT__ -D_ARCH_PPC}\
+ %{maix64: -D__64BIT__ -D_ARCH_PPC -D__LONG_MAX__=9223372036854775807L}\
%{mpe: -I/usr/lpp/ppe.poe/include}\
%{pthread: -D_THREAD_SAFE}\
%(cpp_cpu)"
============================================================
More information about the Gcc-patches
mailing list