From: Kyle Moffett <mrmacman_g4@mac.com>
To: David Woodhouse <dwmw2@infradead.org>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>,
Jan Engelhardt <jengelh@computergmbh.de>,
Randy Dunlap <randy.dunlap@oracle.com>,
Adrian Bunk <bunk@stusta.de>,
LKML Kernel <linux-kernel@vger.kernel.org>,
david@lang.hm, linux-arch@vger.kernel.org
Subject: Re: Userspace compiler support of "long long"
Date: Thu, 28 Jun 2007 08:20:24 -0400 [thread overview]
Message-ID: <6879F938-78C9-4FE1-B5EA-C558A54A5E70@mac.com> (raw)
In-Reply-To: <1183030574.1170.137.camel@pmac.infradead.org>
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
next prev parent reply other threads:[~2007-06-28 12:20 UTC|newest]
Thread overview: 52+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-21 22:32 Linux Kernel include files Joerg Schilling
2007-06-21 23:25 ` david
2007-06-21 23:38 ` Joerg Schilling
2007-06-22 3:38 ` David Woodhouse
2007-06-22 5:18 ` H. Peter Anvin
2007-06-22 15:00 ` Adrian Bunk
2007-06-26 15:26 ` H. Peter Anvin
2007-06-27 1:32 ` Kyle Moffett
2007-06-27 15:40 ` Adrian Bunk
2007-06-27 15:52 ` Joerg Schilling
2007-06-27 15:59 ` Robert P. J. Day
2007-06-27 17:32 ` Userspace compiler support of "long long" Adrian Bunk
2007-06-27 22:30 ` Kyle Moffett
2007-06-27 22:57 ` Randy Dunlap
2007-06-27 23:16 ` Randy Dunlap
2007-06-28 2:12 ` Geert Uytterhoeven
2007-06-28 6:50 ` Jan Engelhardt
2007-06-28 11:34 ` Geert Uytterhoeven
2007-06-28 11:36 ` David Woodhouse
2007-06-28 12:20 ` Kyle Moffett [this message]
2007-06-28 3:06 ` Kyle McMartin
2007-06-28 0:30 ` Andi Kleen
2007-06-28 11:42 ` Kyle Moffett
2007-06-28 3:57 ` Matthew Wilcox
2007-06-28 11:53 ` Kyle Moffett
2007-06-28 12:08 ` Jakub Jelinek
2007-06-28 12:18 ` Kyle Moffett
2007-06-28 4:03 ` H. Peter Anvin
2007-06-28 10:26 ` Harald Arnesen
2007-06-28 10:44 ` Joerg Schilling
2007-06-28 12:11 ` Kyle Moffett
2007-06-28 15:31 ` Mark Brown
2007-06-28 4:02 ` Linux Kernel include files H. Peter Anvin
2007-06-25 15:17 ` Joerg Schilling
2007-06-25 15:27 ` David Woodhouse
2007-06-25 18:04 ` Harald Arnesen
2007-06-25 20:26 ` Joerg Schilling
2007-06-25 20:32 ` David Woodhouse
2007-06-25 21:43 ` Harald Arnesen
2007-06-25 21:48 ` Harald Arnesen
2007-06-25 21:49 ` Joerg Schilling
2007-06-25 22:30 ` Harald Arnesen
2007-06-25 22:42 ` Joerg Schilling
2007-06-21 23:59 ` Arnd Bergmann
2007-06-25 15:06 ` Joerg Schilling
2007-06-25 16:00 ` david
2007-06-25 14:48 ` Joerg Schilling
2007-06-21 23:47 ` Arjan van de Ven
2007-06-25 14:53 ` Joerg Schilling
2007-06-25 15:26 ` Arjan van de Ven
2007-06-25 15:27 ` Robert P. J. Day
2007-06-25 20:18 ` Sam Ravnborg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6879F938-78C9-4FE1-B5EA-C558A54A5E70@mac.com \
--to=mrmacman_g4@mac.com \
--cc=bunk@stusta.de \
--cc=david@lang.hm \
--cc=dwmw2@infradead.org \
--cc=geert@linux-m68k.org \
--cc=jengelh@computergmbh.de \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=randy.dunlap@oracle.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).