summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRay Donnelly <mingw.android@gmail.com>2013-05-21 23:00:01 +0100
committerRay Donnelly <mingw.android@gmail.com>2013-05-21 23:00:01 +0100
commitde1a522e032b84e21f9e3178f6dd11058da64916 (patch)
treebfa7c031323fce9659778277b54e22336ba417e9
parent7323e4fea00b5f2608bdee53277a6510a9822fd3 (diff)
downloadpython-de1a522e032b84e21f9e3178f6dd11058da64916.tar.gz
MinGW-w64: Use a different header for regen
..because /usr/include/netinet/in.h doesn't exist. Instead we use include/stddef.h from the GCC installation, located via -print-search-dirs trickery.
-rwxr-xr-xPython-2.7.5/Lib/plat-generic/regen8
-rw-r--r--Python-2.7.5/Makefile.pre.in2
2 files changed, 8 insertions, 2 deletions
diff --git a/Python-2.7.5/Lib/plat-generic/regen b/Python-2.7.5/Lib/plat-generic/regen
index c96167d..4c942bc 100755
--- a/Python-2.7.5/Lib/plat-generic/regen
+++ b/Python-2.7.5/Lib/plat-generic/regen
@@ -1,3 +1,9 @@
#! /bin/sh
set -v
-eval $PYTHON_FOR_BUILD ../../Tools/scripts/h2py.py -i "'(u_long)'" /usr/include/netinet/in.h
+if [ -n "$1" ]; then
+ CCINSTALL=$($1 -print-search-dirs | head -1 | cut -d' ' -f2)
+ REGENHEADER=${CCINSTALL//\\//}include/stddef.h
+else
+ REGENHEADER=/usr/include/netinet/in.h
+fi
+eval $PYTHON_FOR_BUILD ../../Tools/scripts/h2py.py -i "'(u_long)'" $REGENHEADER
diff --git a/Python-2.7.5/Makefile.pre.in b/Python-2.7.5/Makefile.pre.in
index b30afc3..fa2a49e 100644
--- a/Python-2.7.5/Makefile.pre.in
+++ b/Python-2.7.5/Makefile.pre.in
@@ -1044,7 +1044,7 @@ $(srcdir)/Lib/$(PLATDIR):
else \
PYTHON_FOR_BUILD="$(PYTHON_FOR_BUILD)"; \
fi; \
- cd $(srcdir)/Lib/$(PLATDIR); $(RUNSHARED) ./regen
+ cd $(srcdir)/Lib/$(PLATDIR); $(RUNSHARED) ./regen "$(CC)"
python-config: $(srcdir)/Misc/python-config.in
# Substitution happens here, as the completely-expanded BINDIR