Terry Lambert wrote:
> Mike Smith wrote:
> > Having said that, I recommend using __attribute__ ((packed))
> > to explicitly request that a structure be packed.
> 
> Is there a problem with "#pragma pack(1)"?  I see it in a
> lot of header files... do they need changing?

Yes, but it should be:
#define __packed __attribute__((packed))
in sys/cdefs.h.

This allows us to provide an alternative __packed implementation for some
other mythical compiler some day.

The same goes for __format_arg(n) in stdio.h.  And so on.  We've been pretty
clean about it so far, but a few have slipped through.

Cheers,
-Peter
--
Peter Wemm - [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]
"All of this is for nothing if we don't go to the stars" - JMS/B5


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to