[issue1759169] clean up Solaris port and allow C99 extension modules

Martin v. Löwis report at bugs.python.org
Mon Feb 16 09:17:04 CET 2009


Martin v. Löwis <martin at v.loewis.de> added the comment:

> Python should define *only* __EXTENSIONS__, not the others, as Zooko
> already mentioned, for the reasons he mentioned. I'm not sure how you
> got a different impression from what I or he said.

Ok, so we can ignore __EXTENSIONS__ for the discussion. Then you were
arguing that defining _XOPEN_SOURCE is wrong if the value is less than
600. What about setting the value to 600 or larger? Is that also wrong,
and if so, why?

[Aside: I think the Solaris comment on using C99 with XOPEN applications
is misguided. Compiling such applications with C99 is *not* invalid.
While POSIX specified that it is based on C89, the original POSIX spec
is silent on what the semantics is if a different C implementation is
used - so at worst, the behavior of such applications is undefined.
However, it is actually better than that: The C99 spec defines clearly
what the semantics of all the functions are, and thus what the
difference in behavior is. So for a specific POSIX application, the
effect of compiling it with a C99 compiler is well-defined, and most
applications should work just fine (if they compile at all).

In a sense, Solaris is doing the same thing to its applications what
you are criticizing here as Python doing to its extension modules:
making claims of how compatible they are wrt. certain standards.]

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue1759169>
_______________________________________


More information about the Python-bugs-list mailing list