diff -r 91fbe0fff882 Include/pyatomic.h --- a/Include/pyatomic.h Mon Mar 16 11:52:32 2015 +0100 +++ b/Include/pyatomic.h Mon Mar 16 08:11:58 2015 -0300 @@ -6,13 +6,20 @@ #include "pyconfig.h" +#if defined(HAVE_STD_ATOMIC) +#ifdef __cplusplus +#include +#define _Atomic(T) atomic +using namespace std; +#else +#include +#endif +#endif + #ifdef __cplusplus extern "C" { #endif -#if defined(HAVE_STD_ATOMIC) -#include -#endif /* This is modeled after the atomics interface from C1x, according to * the draft at @@ -34,7 +41,7 @@ } _Py_memory_order; typedef struct _Py_atomic_address { - _Atomic void *_value; + _Atomic (void) *_value; } _Py_atomic_address; typedef struct _Py_atomic_int {