[Python-checkins] r55846 - python/branches/release25-maint/Include/pyport.h

martin.v.loewis python-checkins at python.org
Sat Jun 9 14:57:49 CEST 2007


Author: martin.v.loewis
Date: Sat Jun  9 14:57:46 2007
New Revision: 55846

Modified:
   python/branches/release25-maint/Include/pyport.h
Log:
Backport r55845: Provide LLONG_MAX for S390.


Modified: python/branches/release25-maint/Include/pyport.h
==============================================================================
--- python/branches/release25-maint/Include/pyport.h	(original)
+++ python/branches/release25-maint/Include/pyport.h	Sat Jun  9 14:57:46 2007
@@ -61,9 +61,16 @@
 #ifdef HAVE_LONG_LONG
 #ifndef PY_LONG_LONG
 #define PY_LONG_LONG long long
+#if defined(LLONG_MAX)
 #define PY_LLONG_MIN LLONG_MIN
 #define PY_LLONG_MAX LLONG_MAX
 #define PY_ULLONG_MAX ULLONG_MAX
+#elif defined(__s390__)
+/* Apparently, S390 Linux has long long, but no LLONG_MAX */
+#define PY_LLONG_MAX 9223372036854775807LL
+#define PY_LLONG_MIN (-PY_LLONG_MAX-1)
+#define PY_ULLONG_MAX 18446744073709551615ULL
+#endif /* LLONG_MAX */
 #endif
 #endif /* HAVE_LONG_LONG */
 


More information about the Python-checkins mailing list