Re: 64bit driver driver with 32 bit long

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Apr 4, 2005 1:04 PM, Tawade, Prashant <prashant.tawade@xxxxxxxxx> 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


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux