[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Fix for _Complex_I problems
From: |
Greg Troxel |
Subject: |
Re: Fix for _Complex_I problems |
Date: |
Tue, 12 Feb 2008 11:32:12 -0500 |
User-agent: |
Gnus/5.110007 (No Gnus v0.7) Emacs/22.1 (berkeley-unix) |
Looking over your patch again, I feel quite a bit better about it.
It checks for the standard first, and
-
+#if defined (GUILE_I)
/* For an SCM object Z which is a complex number (ie. satisfies
SCM_COMPLEXP), return its value as a C level "complex double". */
#define SCM_COMPLEX_VALUE(z) \
- (SCM_COMPLEX_REAL (z) + _Complex_I * SCM_COMPLEX_IMAG (z))
+ (SCM_COMPLEX_REAL (z) + GUILE_I * SCM_COMPLEX_IMAG (z))
+#endif
really is very close to a remedial define of _Complex_I. So the impact
on conforming systems is small, and limited to a reader of the code
having to chase the GUILE_I definition.
+# When compiling with GCC on some OSs (Solaris, AIX), _Complex_I doesn't work;
+# in the reported cases so far, 1.0fi works well instead.
I would add
# This is a workaround for the failure of these systems to conform to C99.
So this all seems ok to me.