From 5553fc00ea78d0d6b618d5f5111bb7d6473cfa97 Mon Sep 17 00:00:00 2001 From: Robert Bradshaw Date: Thu, 21 Jan 2010 13:16:24 -0800 Subject: [PATCH] solaris + gcc fix --- Cython/Compiler/PyrexTypes.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Cython/Compiler/PyrexTypes.py b/Cython/Compiler/PyrexTypes.py index e20f91cb..d0f6f0a0 100644 --- a/Cython/Compiler/PyrexTypes.py +++ b/Cython/Compiler/PyrexTypes.py @@ -1063,6 +1063,11 @@ proto=""" #include #endif #endif + +#if CYTHON_CCOMPLEX && !defined(__cplusplus) && defined(__sun__) && defined(__GNUC__) + #undef _Complex_I + #define _Complex_I 1.0fj +#endif """) complex_real_imag_utility_code = UtilityCode( @@ -1122,9 +1127,9 @@ impl=""" #else static INLINE %(type)s %(type_name)s_from_parts(%(real_type)s x, %(real_type)s y) { %(type)s z; - z.real = x; - z.imag = y; - return z; + z.real = x; + z.imag = y; + return z; } #endif """) -- 2.26.2