Mail Archives: djgpp/1996/05/12/03:38:56
On Sun, 12 May 1996 j DOT aldrich6 AT genie DOT com wrote:
> 2) Conditionally pack the structure only if you are using a GNU compiler,
Most 32-bit compilers pad structs to avoid significant runtime penalty
for unaligned accesses. So, conditioning that code on GCC alone is not
exactly the correct procedure. You should use some symbol that implies a
32-bit compiler.
> BTW, doesn't Turbo C suck? I had a program that used ftruncate in
> <unistd.h>, only to discover that TC has no such library and no such
> function. I had to write two different sections of code, one for Turbo C
> and one for real compilers. :(
There are many headers in any Unix program that cannot be found on any
other DOS compiler except DJGPP; unistd.h is only one of them. This is
one of the main problems that make porting a Unix programs to the other
compilers a programmer's nightmare.
- Raw text -