On Mon, 10 Mar 2008, Robert May wrote: > On 10/03/2008, Nicholas Clark <nick@ccl4.org> wrote: > > On Mon, Mar 10, 2008 at 10:40:26PM +0530, Robert May wrote: > > > On 10/03/2008, Nicholas Clark <nick@ccl4.org> wrote: > > > > Also, is it right to do this within the 5.8.x branch? > > > > > > > > +# added -mms-bitfields to be able to link to MSVC win32 bitfields libs > > > > +# (4 byte instead of 2 byte alignment) > > > > > > > > specifically, it will act as a binary compatibility breakage between 5.8.8 > > > > and 5.8.9, won't it? > > > > > > 5.8.8 doesn't use bit fields. If 5.8.9-to-be has the bit field > > > changes merged, then this should be added (but I doubt they have been > > > merged as I think that would break binary compatibility between 5.8.8 > > > and 5.8.9). If the bit field changes have not been merged, then this > > > is not necessary (but it won't harm either) > > > > It can't have the bit field changes merged for precisely that reason. > > > > I was more thinking that it *can* harm, if those flags are used on XS modules > > that incorporate headers from elsewhere, that are already using bitfields > > in ways that are affected by the flags. > > I withdraw my comment "but it won't harm either". It does beg the > question of whether it should be in the cygwin build at all, as it > will harm compatibility with native cygwin dlls that use bitfields ... > that's a no-win situation. Jan's changes that make the use of this > flag unnecessary remove that problem, but I guess for binary > compatibility reasons we won't see them in an official release until > 5.12. Yes, the PERL_BITFIELDS stuff breaks binary compatibility for VC, so it cannot go into 5.10. We'll just have to live with the bloated OP structures; it doesn't really matter that much. Note that Cygwin doesn't use the win32/* files at all, so it won't use -mms-bitfields even in blead. I can see an argument for using it though: Unix originated sources will only used 'int' or 'unsigned int' as the base type for bit- fields, so nothing will change for them. But all files using Windows specific headers (e.g. Platform SDK) will only be compiled correctly when you use -mms- bitfields. When I was looking into some documentation on -mms-bitfields I noticed that virtually al Gtk based software recommends that you compile it with -mms-bitfields on Windows, even under Cygwin. So I think adding -mms- bitfields to Cygwin may help building XS code using such libraries. Note that you can't add it to Cygwin for 5.10 anymore for the same reason we can't apply the PERL_BITFIELDS stuff to 5.10.1: it will break compatibility with Perl 5.10.0. Cheers, -JanThread Previous | Thread Next