Re: portability of binary files

From: Levork (fongj@helix.net)
Date: 12/14/95


> What about the fact that DOS is a 16-bit OS and Linux is 32-bit?  Do I need
> to worry about that, since an int on my Linux machine is 32 bits and an int
> on a DOS machine could be 16 bits?  (Is it? Or is that determined by the
> chip, and not the OS?)

I think it's a compiler issue? I used to use djgpp which I believe was 32
bit so I never had the problem. Other dos compilers may have 16 bit ints. 

I think if you use explicitly short and long ints, you might be able to
avoid the problem, since those are the same size between linux/dos.

BTW I spoke too soon about binary portability; you're right, the size of 
the ints makes a difference. But if you know the sizes of ints between 
the machines then you could write up some hacks to convert between them..

Levork



This archive was generated by hypermail 2b30 : 12/07/00 PST