Re: ARCH32BIT, ARCH64BIT defines

ralf@uni-koblenz.de
Thu, 18 Dec 1997 16:34:07 +0100


On Wed, Dec 17, 1997 at 11:57:13PM +0100, Pavel Machek wrote:

> When creating patch, I found out some strange things in 64 bit
> includes - like tests for 64 bit kernel, compiled by 32 bit compiler. I
> think that tests are unnecessary, since that can not happen. I put
> #error's there.

I think these test are back from the days when there was Linus' 64bit
Alpha port and DEC's 32bit port. I could be wrong ...

> Is good think (tm), please apply.

I agree the ARCH64BIT patch is a good idea.

The actual construct in include/asm-mips/types.h was wrong anway, the
correct thing for MIPS would be to use the compiler defined preprocessor
symbol _MIPS_SZLONG.

[...]

#if _MIPS_SZLONG == 32
typedef __signed__ long long __s64;
typedef unsigned long long __u64;
#endif
#if _MIPS_SZLONG == 64
typedef __signed__ long __s64;
typedef unsigned long __u64;
#endif

[...]

typedef __s64 s64;
typedef __u64 u64;

[...]

If Linus accepts your patch I'll send him an appropriate patch for
2.1.74.

Ralf

> --- clean/include/asm-mips/types.h Thu Jun 26 21:33:40 1997
> +++ linux/include/asm-mips/types.h Wed Dec 17 20:51:08 1997
> @@ -44,6 +44,7 @@
> * These aren't exported outside the kernel to avoid name space clashes
> */
> #ifdef __KERNEL__
> +#define ARCH64BIT
>
> typedef __signed char s8;
> typedef unsigned char u8;
> @@ -57,6 +58,7 @@
>
> #if ((~0UL) == 0xffffffff)
>
> #if defined(__GNUC__) && !defined(__STRICT_ANSI__)
> +#error 32bit compiler for kernel?
> typedef __signed__ long long s64;
> typedef unsigned long long u64;
> #endif