From mboxrd@z Thu Jan 1 00:00:00 1970 From: Benoit Rouits Subject: Re: FW: 64 bit or 32 bit Date: Tue, 21 Aug 2007 01:30:49 +0200 Message-ID: <1187652649.24972.2.camel@localhost> References: <954E3479CC27224785179CA04904214D06DABFAB@0668-its-exmp01.us.saic.com> <1187552914.4525.8.camel@localhost> <18121.57145.907803.72926@cerise.gclements.plus.com> Mime-Version: 1.0 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: In-Reply-To: <18121.57145.907803.72926@cerise.gclements.plus.com> Sender: linux-admin-owner@vger.kernel.org List-Id: Content-Type: text/plain; charset="utf-8" To: Glynn Clements Cc: "Kirkwood, David A." , linux-admin@vger.kernel.org Le lundi 20 ao=C3=BBt 2007 =C3=A0 19:36 +0100, Glynn Clements a =C3=A9c= rit : > Benoit Rouits wrote: >=20 > > > How can I tell if a given system is running a 32bit krnel or a 64= bit > > > kernel. I a system capable of running either, but I cannot figure > > > out which kernel is installed on it. > >=20 > > just make a C program like this: > >=20 > > int main() > > { > > printf("address bus is %d bytes\n",sizeof(void*)); > > } > > and compile it with cc then run it. > > If it prints 8, it is a 64 bit OS, if it prints 4, it is a 32 bit O= S. >=20 > That tells you which architecture the program was compiled for, not > which architecture the kernel was compiled for. x86_64 can run both > 32- and 64-bit code. >=20 well, if we have a 64-bit kernel /and/ a compiler for 64 bits architectures, i think that a long int must be 8 bytes, no ? - To unsubscribe from this list: send the line "unsubscribe linux-admin" = in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html