On Jun 28, 2007, at 07:36:14, David Woodhouse wrote:
On Thu, 2007-06-28 at 13:34 +0200, Geert Uytterhoeven wrote:
We do not support building Linux with Turbo C (or MS Visual C for
Win64 P64).
We're talking about types which are exposed to userspace.
Yes, and all 64-bit software built using kernel headers must be built
in LP64 mode, anything else is pure insanity. On LP64 (IE: how the
kernel itself is compiled on EVERY 64-bit arch):
char == 8 bits
short == 16 bits
int == 32 bits
long == 64 bits
pointer == 64 bits
long long == 64 bits
On LP32 (IE: how the kernel itself is compiled on EVERY 32-bit arch):
char == 8 bits
short == 16 bits
int == 32 bits
long == 32 bits
pointer == 32 bits
long long == 64 bits
Ergo we can simply require that if you want to use kernel headers you
must be using the same mode as the kernel is compiled in (LP32 or LP64).
The simplest guaranteed-not-to-break way to do this on _every_
supported platform is:
typedef signed char __s8;
typedef unsigned char __s8;
typedef signed short __s16;
typedef unsigned short __s16;
typedef signed int __s32;
typedef unsigned int __s32;
# if __STDC_VERSION__ >= 19901L
typedef signed long long __s64;
typedef unsigned long long __s64;
# elif defined(__GNUC__)
__extension__ typedef signed long long __s64;
__extension__ typedef unsigned long long __s64;
# endif
If you have some other compiler that works under linux *AND* supports
a 64-bit type in non-C99-mode (whether "long long" or something
else), then they are welcome to submit patches to fix it.
Cheers,
Kyle Moffett
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]