Subject: Re: mklocale, take 2
To: Aaron J. Grier <>
From: Todd Vierling <>
List: tech-toolchain
Date: 10/18/2001 19:11:45
On Thu, 18 Oct 2001, Aaron J. Grier wrote:

: > Now, as far as having a packed attribute flag in cdefs.h, we might
: > want to consider using "#pragma pack" as opposed to an attribute that
: > might be required to appear in different places in the struct's
: > definition on different compilers.  "#pragma pack" is much more widely
: > supported, and would cause the compile to fail (a good thing!) if
: > packed structs aren't provided by the compiler.
: aren't #pragmas are by definition compiler-specific?

Yes, and that's the point.  If the compiler doesn't support packed structs,
the code should be uncompilable on that compiler.  (Otherwise you'll end up
with nondescript errors and crashes thanks to the improper alignment of
data in the struct.)

-- Todd Vierling <>  *  Wasabi NetBSD:  Run with it.
-- CDs, Integration, Embedding, Support --