On 23 Jun, 2010,at 04:06 PM, Alexander Belopolsky <alexander.belopol...@gmail.com> wrote:

On Wed, Jun 23, 2010 at 2:08 AM, Ronald Oussoren <ronaldousso...@mac.com> wrote:
..
> I don't agree.  The patch itself is pretty simple, but it does make a rather significant change to the build process: the
> compile-time environment in configure would be different than during the compilation of posixmodule. That is, in functions
> that check for features (the HAVE_FOOBAR macros in pyconfig.h) would use _DARWIN_C_SOURCE while posixmodule
> itself wouldn't.    This may lead to subtle bugs, or even compile errors (because some function definitions change when
> _DARWIN_C_SOURCE active).

I agree. Messing with compatibility macros outside of pyconfig.h is
not a good idea. Martin's hack, while likely to work in most cases,
is still a hack. I believe, however we can undefine _DARWIN_C_SOURCE
globally at least on 10.4 and higher. I grepped throught the headers
on my 10.6 system and I notice that the majority of checks for
_DARWIN_C_SOURCE are in the form of

As I wrote the system will assume _DARWIN_C_SOURCE is set when  when you don't set _POSIX_C_SOURCE or other feature macros.   Working around that is a hack that I don't wish to support.





..
>     Defining _POSIX_C_SOURCE or _DARWIN_C_SOURCE causes library and kernel calls to conform
> to the SUSv3 standards even if doing so would alter  the behavior of functions used in 10.3.

I cannot reconcile this with !defined(_POSIX_C_SOURCE) ||
defined(_DARWIN_C_SOURCE) logic that I see in the headers

This seems to be arranged in sys/cdefs.h.   I honestly don't care how this done, the documentation clearly says that this happens and that indicates that _DARWIN_C_SOURCE selects the API Apple would like you to use.

Anyway, why is this discusion on python-dev instead of in the issue tracker?

BTW. IMHO resolution of this issue can wait until after 2.7.0, there is always 2.7.1 and I don't think we need to rush this (the issue has been dormant for quite a while)

Ronald

_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to