Date: Sun, 12 May 1996 10:32:09 +0200 (IST) From: Eli Zaretskii To: j DOT aldrich6 AT genie DOT com Cc: djgpp AT delorie DOT com Subject: Re: more sizeof questions In-Reply-To: <199605120016.AA213930191@relay1.geis.com> Message-Id: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 > , 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.