Vijay Shankar wrote:
> Hi,
> 
> What precautions we need to take while writing 32 bit programs for 64
> bit machines? Specifically, how can I take care of data type size
> differences between user space and kernel space?
> 
> In my program long integer is 4 bytes in user space. But when I pass a
> pointer to a long integer as an argument to a system call, kernel
> accesses 8 bytes using that pointer as size of long integer it is 8
> bytes in kernel space.
> 
> Regards,
> Vijay

If the OS allows 32-bit programs to run in a 64-bit environment, then it 
is the OS' responsibility to handle that.  The compiler may have 
something to do with it too but that would be some compile-time switch. 
  The code itself shouldn't have to change.

-- 
Thomas Hruska
CubicleSoft President
Ph: 517-803-4197

*NEW* MyTaskFocus 1.1
Get on task.  Stay on task.

http://www.CubicleSoft.com/MyTaskFocus/

Reply via email to