3
# DP: Modules/Setup.dist: patches to build some extensions staically
6
if [ $# -eq 3 -a "$2" = '-d' ]; then
9
elif [ $# -ne 1 ]; then
10
echo >&2 "usage: `basename $0`: -patch|-unpatch [-d <srcdir>]"
15
patch $pdir -f --no-backup-if-mismatch -p0 < $0
18
patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
21
echo >&2 "usage: `basename $0`: -patch|-unpatch [-d <srcdir>]"
26
--- Modules/_elementtree.c.orig 2009-03-22 23:07:51.000000000 +0000
27
+++ Modules/_elementtree.c 2009-03-22 23:08:12.000000000 +0000
28
@@ -1838,7 +1838,10 @@
29
static struct PyExpat_CAPI* expat_capi;
30
#define EXPAT(func) (expat_capi->func)
32
-#define EXPAT(func) (XML_##func)
33
+#define EXPAT(func) (PyExpat_XML_##func)
34
+#define PyExpat_XML_GetErrorLineNumber PyExpat_XML_GetCurrentLineNumber
35
+#define PyExpat_XML_GetErrorColumnNumber PyExpat_XML_GetCurrentColumnNumber
36
+#define PyExpat_XML_GetErrorByteIndex PyExpat_XML_GetCurrentByteIndex
40
--- Modules/Setup.dist.orig 2009-03-22 23:07:51.000000000 +0000
41
+++ Modules/Setup.dist 2009-03-22 23:09:29.000000000 +0000
43
#_collections _collectionsmodule.c # Container types
44
#itertools itertoolsmodule.c # Functions creating iterators for efficient looping
45
#atexit atexitmodule.c # Register functions to be run at interpreter-shutdown
46
-#_elementtree -I$(srcdir)/Modules/expat -DHAVE_EXPAT_CONFIG_H -DUSE_PYEXPAT_CAPI _elementtree.c # elementtree accelerator
47
+#_elementtree -I$(srcdir)/Modules/expat -DHAVE_EXPAT_CONFIG_H _elementtree.c # elementtree accelerator
48
#_pickle _pickle.c # pickle accelerator
49
#datetime datetimemodule.c # date/time type
50
#_bisect _bisectmodule.c # Bisection algorithms
53
#_bsddb _bsddb.c -I$(DBINC) -L$(DBLIB) -ldb-$(DBLIBVER)
55
+#_ctypes _ctypes/_ctypes.c _ctypes/callbacks.c _ctypes/callproc.c _ctypes/stgdict.c _ctypes/cfield.c _ctypes/malloc_closure.c -Wl,-Bstatic -lffi -Wl,-Bdynamic
57
# Helper module for various ascii-encoders
61
# More information on Expat can be found at www.libexpat.org.
63
-#pyexpat expat/xmlparse.c expat/xmlrole.c expat/xmltok.c pyexpat.c -I$(srcdir)/Modules/expat -DHAVE_EXPAT_CONFIG_H -DUSE_PYEXPAT_CAPI
64
+#pyexpat expat/xmlparse.c expat/xmlrole.c expat/xmltok.c pyexpat.c -I$(srcdir)/Modules/expat -DHAVE_EXPAT_CONFIG_H
66
# Hye-Shik Chang's CJKCodecs