Added patch for guarding HAVE_LONG_LONG definition in pyport.h

as it is also defined by GDB, and by building GDB with python support
will make GDB's compilation fail due to redefinition error.
(upstream issue28898)
This commit is contained in:
Charalampos Stratakis 2016-12-08 11:29:35 +01:00
parent 97cc10c62a
commit f9258e6d7f
2 changed files with 33 additions and 0 deletions

View File

@ -0,0 +1,25 @@
# HG changeset patch
# User Benjamin Peterson <benjamin@python.org>
# Date 1481183668 28800
# Node ID 4745d801cae2d57e3432313acd0b76b8b4cc9c75
# Parent 148c46d180b2a1510097a1eae79845b61190c879
guard HAVE_LONG_LONG definition to prevent redefinition (#28898)
diff --git a/Include/pyport.h b/Include/pyport.h
--- a/Include/pyport.h
+++ b/Include/pyport.h
@@ -37,9 +37,10 @@ Used in: Py_SAFE_DOWNCAST
* integral synonyms. Only define the ones we actually need.
*/
-// long long is required now. Define HAVE_LONG_LONG unconditionally for
-// compatibility.
+// long long is required. Ensure HAVE_LONG_LONG is defined for compatibility.
+#ifndef HAVE_LONG_LONG
#define HAVE_LONG_LONG
+#endif
#ifndef PY_LONG_LONG
#define PY_LONG_LONG long long
/* If LLONG_MAX is defined in limits.h, use that. */

View File

@ -394,6 +394,13 @@ Patch243: 00243-fix-mips64-triplet.patch
# Not yet fixed upstream: http://bugs.python.org/issue28787
Patch249: 00249-fix-out-of-tree-dtrace-builds.patch
# 00250 #
# Guard HAVE_LONG_LONG definition in pyport.h as gdb also sets this
# and by defining it unconditionally in python will make compilation of
# gdb to fail.
# FIXED UPSTREAM: http://bugs.python.org/issue28898
Patch250: 00250-guard-HAVE_LONG_LONG-definition-to-prevent-redefinition.patch
# (New patches go here ^^^)
#
# When adding new patches to "python" and "python3" in Fedora, EL, etc.,
@ -631,6 +638,7 @@ sed -r -i s/'_PIP_VERSION = "[0-9.]+"'/'_PIP_VERSION = "%{pip_version}"'/ Lib/en
%patch206 -p1
%patch243 -p1
%patch249 -p1
%patch250 -p1
# Currently (2010-01-15), http://docs.python.org/library is for 2.6, and there
# are many differences between 2.6 and the Python 3 library.