[Python-checkins] r78256 - in python/branches/py3k-cdecimal/Modules/cdecimal: mpdecimal.h mpdecimal64.h

stefan.krah python-checkins at python.org
Sat Feb 20 18:11:12 CET 2010


Author: stefan.krah
Date: Sat Feb 20 18:11:12 2010
New Revision: 78256

Log:
Accommodate compilers without uint64_t.

Modified:
   python/branches/py3k-cdecimal/Modules/cdecimal/mpdecimal.h
   python/branches/py3k-cdecimal/Modules/cdecimal/mpdecimal64.h

Modified: python/branches/py3k-cdecimal/Modules/cdecimal/mpdecimal.h
==============================================================================
--- python/branches/py3k-cdecimal/Modules/cdecimal/mpdecimal.h	(original)
+++ python/branches/py3k-cdecimal/Modules/cdecimal/mpdecimal.h	Sat Feb 20 18:11:12 2010
@@ -7,6 +7,31 @@
 #ifndef MPDECIMAL_H
 #define MPDECIMAL_H
 
+
+#include "pyconfig.h"
+
+
+#ifdef _MSC_VER
+  #include "vccompat.h"
+  #ifndef UNUSED
+    #define UNUSED
+  #endif
+  #define EXTINLINE extern inline
+#else
+  #if HAVE_STDINT_H
+    #include <stdint.h>
+  #endif
+  #define __GNUC_STDC_INLINE__
+  #define UNUSED __attribute__((unused))
+  #define EXTINLINE
+#endif
+
+#if !defined(LEGACY_COMPILER)
+  #if !defined(UINT64_MAX)
+    #define LEGACY_COMPILER
+  #endif
+#endif
+
 #if defined(CONFIG_64)
   #include "mpdecimal64.h"
 #elif defined(CONFIG_32)

Modified: python/branches/py3k-cdecimal/Modules/cdecimal/mpdecimal64.h
==============================================================================
--- python/branches/py3k-cdecimal/Modules/cdecimal/mpdecimal64.h	(original)
+++ python/branches/py3k-cdecimal/Modules/cdecimal/mpdecimal64.h	Sat Feb 20 18:11:12 2010
@@ -20,21 +20,6 @@
 #include <assert.h>
 
 
-#define EXTINLINE
-#ifdef _MSC_VER
-  #include "vccompat.h"
-  #ifndef UNUSED
-    #define UNUSED
-  #endif
-  #undef EXTINLINE
-  #define EXTINLINE extern inline
-#else
-  #include <stdint.h>
-  #define __GNUC_STDC_INLINE__
-  #define UNUSED __attribute__((unused))
-#endif
-
-
 /******************************************************************************/
 /*                      Types for 64 bit architectures                        */
 /******************************************************************************/


More information about the Python-checkins mailing list