summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorChristian Heimes <christian@python.org>2021-10-22 16:28:23 (GMT)
committerGitHub <noreply@github.com>2021-10-22 16:28:23 (GMT)
commitec93721e0066c4cbe40085188a9bf0952aa935ef (patch)
treeb448fae493616dbad2a759a1a7d591fda3dfc51d /Modules
parentb781cc3bfce7c052728b06aad9f1a467cced289d (diff)
downloadcpython-ec93721e0066c4cbe40085188a9bf0952aa935ef.zip
cpython-ec93721e0066c4cbe40085188a9bf0952aa935ef.tar.gz
cpython-ec93721e0066c4cbe40085188a9bf0952aa935ef.tar.bz2
bpo-45570: Simplify setup macros for pyexpat (GH-29159)
* ``HAVE_EXPAT_CONFIG_H`` is not used by our code and not used by system-wide expat header files * ``USE_PYEXPAT_CAPI`` is no longer used by our code * ``XML_POOR_ENTROPY`` should be defined in expat_config.h Signed-off-by: Christian Heimes <christian@python.org>
Diffstat (limited to 'Modules')
-rw-r--r--Modules/Setup4
-rw-r--r--Modules/expat/expat_config.h4
2 files changed, 6 insertions, 2 deletions
diff --git a/Modules/Setup b/Modules/Setup
index a5b1a7b..d06d733 100644
--- a/Modules/Setup
+++ b/Modules/Setup
@@ -149,7 +149,7 @@ time timemodule.c
#_contextvars _contextvarsmodule.c
#_csv _csv.c
#_datetime _datetimemodule.c
-#_elementtree -DHAVE_EXPAT_CONFIG_H -DUSE_PYEXPAT_CAPI -I$(srcdir)/Modules/expat _elementtree.c
+#_elementtree -I$(srcdir)/Modules/expat _elementtree.c
#_heapq _heapqmodule.c
#_json _json.c
#_lsprof _lsprof.c rotatingtree.c
@@ -173,7 +173,7 @@ time timemodule.c
#binascii binascii.c
#cmath cmathmodule.c _math.c # -lm
#math mathmodule.c _math.c # -lm
-#pyexpat -DHAVE_EXPAT_CONFIG_H -DXML_POOR_ENTROPY -DUSE_PYEXPAT_CAPI -I$(srcdir)/Modules/expat expat/xmlparse.c expat/xmlrole.c expat/xmltok.c pyexpat.c
+#pyexpat -I$(srcdir)/Modules/expat expat/xmlparse.c expat/xmlrole.c expat/xmltok.c pyexpat.c
#unicodedata unicodedata.c
# Modules with some UNIX dependencies -- on by default:
diff --git a/Modules/expat/expat_config.h b/Modules/expat/expat_config.h
index afbedd0..6671f7b 100644
--- a/Modules/expat/expat_config.h
+++ b/Modules/expat/expat_config.h
@@ -18,4 +18,8 @@
#define XML_DTD 1
#define XML_CONTEXT_BYTES 1024
+// bpo-30947: Python uses best available entropy sources to
+// call XML_SetHashSalt(), expat entropy sources are not needed
+#define XML_POOR_ENTROPY 1
+
#endif /* EXPAT_CONFIG_H */