Date: Fri, 14 Sep 2001 05:03:20 -0700 From: Peter Wemm <peter@wemm.org> To: tlambert2@mindspring.com Cc: Mike Smith <msmith@FreeBSD.ORG>, Yar Tikhiy <yar@FreeBSD.ORG>, hackers@FreeBSD.ORG, msmith@mass.dis.org Subject: Re: Driver structures & alignment Message-ID: <20010914120320.25BB5380A@overcee.netplex.com.au> In-Reply-To: <3BA1C819.65D72D4B@mindspring.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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 - peter@FreeBSD.org; peter@yahoo-inc.com; peter@netplex.com.au "All of this is for nothing if we don't go to the stars" - JMS/B5 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010914120320.25BB5380A>