[Python-Dev] more-precise instructions for "Python.h first"?
Jack Jansen
Jack.Jansen@cwi.nl
Mon, 2 Jun 2003 11:02:32 +0200
On Monday, Jun 2, 2003, at 07:41 Europe/Amsterdam, Martin v. L=F6wis=20
wrote:
> David Abrahams <dave@boost-consulting.com> writes:
>
>> "Since Python may define some pre-processor definitions which
>> affect the standard headers on some systems, you must include
>> Python.h or pyconfig.h (Python's configuration header), before any
>> standard headers are included."
>
> Ok. I think this rule may break on SGI, where Python.h has
>
> #if defined(__sgi) && defined(WITH_THREAD) && !defined(_SGI_MP_SOURCE)
> #define _SGI_MP_SOURCE
> #endif
>
> Now, I have never seen an SGI machine in my life, and I have no idea
> what _SGI_MP_SOURCE is. However it seems that it is important that
> this is defined before stdio.h is included (or perhaps it was
> important at some point in time).
This define seems to handle how concurrent access and locking of stdio=20=
data structures is handled (and, incidentally, also how errno is=20
declared in errno.h). So it does indeed seem important that this is in=20=
scope before including errno.h or stdio.h.
It should be easy enough to have configure stick the _SGI_MP_SOURCE=20
definition in pyconfig.h, if someone is willing to do the work. For me=20=
Pyhon stopped compiling on Irix a while ago, and I can't be bothered to=20=
look into it.
--
Jack Jansen, <Jack.Jansen@cwi.nl>, http://www.cwi.nl/~jack
If I can't dance I don't want to be part of your revolution -- Emma=20
Goldman