Subject: Re: mklocale, take 2
To: Jason R Thorpe <thorpej@wasabisystems.com>
From: Todd Vierling <tv@wasabisystems.com>
List: tech-userlevel
Date: 10/18/2001 11:41:39
On Thu, 18 Oct 2001, Jason R Thorpe wrote:
: BTW, our <sys/cdefs.h> should probably #define some sort of pseudo-keyword
: for "packed" ... "packed" is a very important attribute to convey, and it
: should not be deleted if the compiler is not GCC.
Yes, although some host-build tools (mklocale included) should be switched
to using explicit binary layout of data, as opposed to relying on compiler
support for packed structs. This will be fixed, and I've added a bulleted
item to the status list to that effect.
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.
--
-- Todd Vierling <tv@wasabisystems.com> * Wasabi NetBSD: Run with it.
-- CDs, Integration, Embedding, Support -- http://www.wasabisystems.com/