[php-maint] FYI redefinition warnings of php5 compilation
Thorsten Glaser
tg at mirbsd.de
Tue Aug 13 22:55:20 UTC 2013
Lior Kaplan dixit:
>Any suggested fix in addition the forwarding them the warning ? (I'm sure
>it would be accepted more easily).
Sorry, haven't had any time to look at it yet. If there’s demand
this can be arranged at a later date though.
In general:
Things like a bitfield of 2 bits are only extended to 16 instead
of 32 or 64 bit on m68k, so adding dummy members is needed; same
for alignment of ints etc.
struct { char a; short b; }
┌───┬───┬───┬───┐
│ a │ p │ b...b │
└───┴───┴───┴───┘
On i386 you get:
┌───┬───┬───┬───┬───┬───┐... ...
│ a │ p │ p │ p │ b...b │ p | p |
└───┴───┴───┴───┴───┴───┘... ...
Better make this assumption explicit:
struct { char a; char padding1[3]; short b; short padding2; }
(The second padding is always added e.g. by kencc, and also
when using the struct inside an array.)
Have a look at #696236 and #604603 for examples in other packages.
Thanks,
//mirabilos
--
“Having a smoking section in a restaurant is like having
a peeing section in a swimming pool.”
-- Edward Burr
More information about the pkg-php-maint
mailing list