From eeef5da28562aac390d34a8a4b8ec35ef03266ec Mon Sep 17 00:00:00 2001
From: Stefan Behnel <stefan_ml@behnel.de>
Date: Sun, 18 Sep 2016 13:26:37 +0200
Subject: [PATCH] define HAVE_LONG_LONG if CPython does not but we know that it
 requires it

---
 Cython/Utility/ModuleSetupCode.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/Cython/Utility/ModuleSetupCode.c b/Cython/Utility/ModuleSetupCode.c
index da21356e5..3e6521f8e 100644
--- a/Cython/Utility/ModuleSetupCode.c
+++ b/Cython/Utility/ModuleSetupCode.c
@@ -24,6 +24,13 @@
   #define DL_EXPORT(t) t
 #endif
 
+#ifndef HAVE_LONG_LONG
+  // CPython has required PY_LONG_LONG support for years, even if HAVE_LONG_LONG is not defined for us
+  #if PY_VERSION_HEX >= 0x03030000 || (PY_MAJOR_VERSION == 2 && PY_VERSION_HEX >= 0x02070000)
+    #define HAVE_LONG_LONG
+  #endif
+#endif
+
 #ifndef PY_LONG_LONG
   #define PY_LONG_LONG LONG_LONG
 #endif
-- 
2.30.9