[Python-Dev] -DINET6 in Makefile

Martin v. Loewis martin@v.loewis.de
Sun, 2 Dec 2001 11:21:30 +0100

> > Of course, doing so would be really stupid. Python.h *must* be the
> > first include, or things may break.
> Why should "things break" ? I've doing this for years in lots
> of Python extensions...

Python.h configures the C library, e.g. for multi-threading (by
defining _REENTRANT) or LFS (by defining _FILE_OFFSET_BITS).

If you include system headers before Python.h, you may find that
different headers are differently configured. In turn, compilation may
fail or produce bogus code.

If the module itself compiles correctly, you may still find that it is
inconsistent with the python executable that is going to load it.

> Back on topic: how are we going to get -DINET6 out of the
> Makefile ? 

I just committed a change.