[Pythonmac-SIG] wxPython build issue
Bill Northcott
w.northcott at unsw.edu.au
Sat Feb 4 01:33:11 CET 2006
Hi Kevin
On 04/02/2006, at 11:08 AM, Kevin Ollivier wrote:
>> As I read the Opengroup document, Posix 200112L and Xopen 600 have
>> been converged. Older standards would not be the same and
>> certainly older versions of Xopen might have strcasecmp and
>> friends in string.h. OTOH higher versions are undefined. So it
>> would not be right to assume the code should work under them.
>> That was my take but it may be quite wrong.
>
> My concern is that while you're right that we can't assume that the
> code should work for new versions, neither can we assume it won't,
> so I'd prefer a solution that is guaranteed to work even if these
> values change. IMHO, even if we need to write a OS X-only configure
> test to properly set HAVE_STRCASECMP_IN_STRING_H, I'd rather go
> that route, because strings.h handles both scenarios (with or
> without the define) correctly and likely will continue to do so in
> the future.
I quite agree that it would be best to have a solution guaranteed to
work in the future. However, the standard makes it very clear that
these sort of behaviours may change in the future. So it not
possible to use something like _XOPEN_SOURCE >= 600 with any
confidence. In any event, these standard revisions are not like
program versions, because they change very infrequently. when you
get a new standard the conditionals need to be checked.
As for the autoconf test, IMO it is fundamentally flawed. I have
checked out MacOS X, Tru64 and Solaris and in all cases the operative
declaration of strcasecmp() is inside multiple #ifdefs. So it
depends on what headers have been included first and in what order.
Autoconf test programs need to be really simple and reliable, which
means not having a long list of included headers. Unfortunately
without such a list the test, as we see, is not discovering what was
intended.
I am at a loss to see how a simple valid test might be constructed,
but that may be me being thick.
My two penny worth
Bill
More information about the Pythonmac-SIG
mailing list