summaryrefslogtreecommitdiff
path: root/Modules
diff options
context:
space:
mode:
authorStefan Krah <skrah@bytereef.org>2013-12-14 12:58:59 +0100
committerStefan Krah <skrah@bytereef.org>2013-12-14 12:58:59 +0100
commit7ab9f7251916ae8d90eaea9ca9496cb2f355e12d (patch)
tree7f07943bfb3978b126781a1bf15e500aa52822bf /Modules
parent66f8518acb5b5ff87c754f6b96e4612724ee8764 (diff)
parent01e5f800b40992f2f61f4fd6ac4eca4ae1847cc0 (diff)
downloadcpython-git-7ab9f7251916ae8d90eaea9ca9496cb2f355e12d.tar.gz
Merge from 3.3.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/_decimal/libmpdec/mpdecimal.h20
1 files changed, 11 insertions, 9 deletions
diff --git a/Modules/_decimal/libmpdec/mpdecimal.h b/Modules/_decimal/libmpdec/mpdecimal.h
index 203275bcd1..58bee02253 100644
--- a/Modules/_decimal/libmpdec/mpdecimal.h
+++ b/Modules/_decimal/libmpdec/mpdecimal.h
@@ -32,6 +32,10 @@
#ifdef __cplusplus
extern "C" {
+ #ifndef __STDC_LIMIT_MACROS
+ #define __STDC_LIMIT_MACROS
+ #define MPD_CLEAR_STDC_LIMIT_MACROS
+ #endif
#endif
@@ -55,18 +59,12 @@ extern "C" {
#define MPD_HIDE_SYMBOLS_END
#define EXTINLINE extern inline
#else
+ #ifdef HAVE_STDINT_H
+ #include <stdint.h>
+ #endif
#ifdef HAVE_INTTYPES_H
#include <inttypes.h>
#endif
- #ifdef HAVE_STDINT_H
- #if defined(__cplusplus) && !defined(__STDC_LIMIT_MACROS)
- #define __STDC_LIMIT_MACROS
- #include <stdint.h>
- #undef __STDC_LIMIT_MACROS
- #else
- #include <stdint.h>
- #endif
- #endif
#ifndef __GNUC_STDC_INLINE__
#define __GNUC_STDC_INLINE__ 1
#endif
@@ -835,6 +833,10 @@ MPD_PRAGMA(MPD_HIDE_SYMBOLS_END) /* restore previous scope rules */
#ifdef __cplusplus
+ #ifdef MPD_CLEAR_STDC_LIMIT_MACROS
+ #undef MPD_CLEAR_STDC_LIMIT_MACROS
+ #undef __STDC_LIMIT_MACROS
+ #endif
} /* END extern "C" */
#endif