python-ldap breaks the "Always include Python.h first" rule in it's
C files - see, e.g.
http://www.python.org/dev/doc/devel/ext/simpleExample.html
The first line of our file can be:
#include <Python.h>
which pulls in the Python API (you can add a comment describing the
purpose of the module and a copyright notice if you like). Since
Python may define some pre-processor definitions which affect the
standard headers on some systems, you must include Python.h before
any standard headers are included.
At least on this Linux Redhat 9 system, this causes all sorts of
horrible warnings to be emitted. Doing the right thing makes them
go away. Patch attached.
Anthony
|