Subject: Re: cpp predefines
To: matthew green <mrg@eterna.com.au>
From: john heasley <heas@shrubbery.net>
List: tech-toolchain
Date: 02/05/2003 18:03:17
Thu, Feb 06, 2003 at 02:53:31AM +1100, matthew green:
>
> > __sparc64__ is the correct predefine to check for sparc64 in the
> > general case.
>
> i'd expect to see it on my solaris box. what defines that as correct?
>
>
> hmm. use 'gcc -m64' to see what it does for 64 bit mode?
spruce [23] diff -u m32 m64
--- m32 Wed Feb 5 17:57:32 2003
+++ m64 Wed Feb 5 17:57:38 2003
@@ -3,7 +3,7 @@
#define sun 1
#define __unix__ 1
#define unix 1
-#define __SIZE_TYPE__ unsigned int
+#define __SIZE_TYPE__ long unsigned int
#define __GNUC_PATCHLEVEL__ 0
#define sparc 1
#define __unix 1
@@ -10,17 +10,18 @@
#define __PRAGMA_REDEFINE_EXTNAME 1
#define __USER_LABEL_PREFIX__
#define __STDC_HOSTED__ 1
-#define __WCHAR_TYPE__ long int
-#define __WINT_TYPE__ long int
+#define __WCHAR_TYPE__ int
+#define __WINT_TYPE__ int
#define __GNUC__ 3
#define __sun__ 1
#define __SVR4 1
-#define __GCC_NEW_VARARGS__ 1
#define __svr4__ 1
#define __sparc__ 1
#define __GNUC_MINOR__ 1
-#define __PTRDIFF_TYPE__ int
+#define __PTRDIFF_TYPE__ long int
#define __sun 1
+#define __arch64__ 1
#define __REGISTER_PREFIX__
#define __NO_INLINE__ 1
+#define __sparcv9 1 <<<<<<
#define __VERSION__ "3.1"