RE: 64bit driver driver with 32 bit long
From: Tawade, Prashant (prashant.tawade_at_intel.com)
Date: 04/04/05
- Previous message: Masopust Christian: "AW: RAID greater than 2TB on Fedora Core 3"
- Maybe in reply to: Tawade, Prashant: "64bit driver driver with 32 bit long"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 4 Apr 2005 17:53:36 -0400 To: "For users of Fedora Core releases" <fedora-list@redhat.com>
Hi Jonathan
That is what I would have ended up with anyway. But I did not find gcc
option to force long to 32 bit. I got my answer, the best way is to use
"u32" datasize, which would work across 32/64 bit platform.
Prashant
-----Original Message-----
From: fedora-list-bounces@redhat.com
[mailto:fedora-list-bounces@redhat.com] On Behalf Of Jonathan Berry
Sent: Monday, April 04, 2005 5:27 PM
To: For users of Fedora Core releases
Subject: Re: 64bit driver driver with 32 bit long
On Apr 4, 2005 1:04 PM, Tawade, Prashant <prashant.tawade@intel.com>
wrote:
>
> Hi
>
> Does anyone know how to build a 64 bit driver with "32 bit unsigned
long",
> as is in the case of windows 64 bit drivers ?
>
> Prashant
Hi Prashant,
What exactly do you mean? With a 64-bit compile, an unsigned long
variable is going to be 64-bits wide. As far as I know, there is no
way to change that. sizeof(long) == sizeof(void *) has to be true.
To use a 32-bit wide (unsigned) variable, use the unsigned int type.
For example:
typedef unsigned int u32type;
"u32type" can be whatever you want to call your unsigned 32-bit data
type. If this code has to work for both 32- and 64-bit environments,
then you should use some #if statements to determine which typedef to
use. Is this what you wanted to know, or are you asking something
different?
Jonathan
-- fedora-list mailing list fedora-list@redhat.com To unsubscribe: http://www.redhat.com/mailman/listinfo/fedora-list -- fedora-list mailing list fedora-list@redhat.com To unsubscribe: http://www.redhat.com/mailman/listinfo/fedora-list
- Previous message: Masopust Christian: "AW: RAID greater than 2TB on Fedora Core 3"
- Maybe in reply to: Tawade, Prashant: "64bit driver driver with 32 bit long"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]