> On Thu, Sep 13, 2001 at 04:09:57PM -0700, Mike Smith wrote:
> > > 
> > > Is there a single blessed way to define packed structures
> > > for use in drivers?  I suspect that using "#pragma pack(1)"
> > > will lead to alignment errors in non-Intel architectures.
> > 
> > Any form of packing is going to cause problems for items that are
> > located in illegal fashions. 
> > 
> > Having said that, I recommend using __attribute__ ((packed))
> > to explicitly request that a structure be packed.
> 
> Should the __attribute__ be supplied to each structure's member?
> Or can it be the whole structure's attribute?

You could just search for examples in /sys/dev, perhaps. 8)

But for the record, the attribute applies to the structure as a whole.

-- 
... every activity meets with opposition, everyone who acts has his
rivals and unfortunately opponents also.  But not because people want
to be opponents, rather because the tasks and relationships force
people to take different points of view.  [Dr. Fritz Todt]
           V I C T O R Y   N O T   V E N G E A N C E



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

Reply via email to