On 12/21/06, James Carlson <[EMAIL PROTECTED]> wrote:
Cyril Plisko writes:
> On 12/21/06, James Carlson <[EMAIL PROTECTED]> wrote:
> > __PACK is pretty evil, in my opinion. It papers over alignment issues
> > that are rather significant in otherwise portable applications.
> >
>
> Agree with you 100% here. However, sometimes your choices
> are very limited due to compatibility requirements and such.
>
> Anyway, it is not about whether packing is good or bad. It is about
> what you type - "__attribute__ ((__pack__))" or "__sun_attr___packed__"
> or "__PACKED" in case you have to. Similar to other cases in the
> header file in hand.
If you're headed for ON, I'd certainly prefer that you rewrite to
avoid that sort of goop.
There are other consolidations -- ON isn't the _only_ way to integrate
things into Solaris -- and some of them (such as SFW) value fidelity
to an external repository over code cleanliness. There you can demand
that you're always compiled with gcc and that __attribute__
((__packed__)) works as expected.
Note that choice of consolidation has nothing at all to do with
whether you can deliver to /usr/bin, to the root partition, or even
new kernel modules; all of those are possible outside of ON. It has
more to do with where your fellow travelers are located. ;-}
So, just to make things clear, you are not against having __PACKED
macro defined in sys/ccompile.h (since it is there in other forms anyway),
but rather against using structure packing in general in ON consolidation.
Did I get you correct ?
--
Regards,
Cyril
_______________________________________________
opensolaris-discuss mailing list
[email protected]