1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-20 11:40:18 +02:00

Only define scm_from_complex_double if it will

actually be used.
This commit is contained in:
Neil Jerram 2008-03-09 21:57:00 +00:00
parent 6180e336b2
commit bca69a9fba
3 changed files with 10 additions and 2 deletions

1
NEWS
View file

@ -51,6 +51,7 @@ would trigger an unbound variable error for `match:andmap'.
** Fixed build issues on NetBSD 1.6 ** Fixed build issues on NetBSD 1.6
** Fixed build issue on Solaris 2.10 x86_64 ** Fixed build issue on Solaris 2.10 x86_64
** Fixed build issue with DEC/Compaq/HP's compiler ** Fixed build issue with DEC/Compaq/HP's compiler
** Fixed scm_from_complex_double build issue on FreeBSD
* Changes to the distribution * Changes to the distribution

View file

@ -1,3 +1,8 @@
2008-03-09 Neil Jerram <neil@ossau.uklinux.net>
* numbers.c: Only define scm_from_complex_double if it will
actually be used.
2008-03-08 Julian Graham <joolean@gmail.com> 2008-03-08 Julian Graham <joolean@gmail.com>
* threads.c (scm_join_thread_timed, scm_thread_p, * threads.c (scm_join_thread_timed, scm_thread_p,

View file

@ -163,20 +163,22 @@ xisnan (double x)
} }
#if defined (GUILE_I) #if defined (GUILE_I)
#if HAVE_COMPLEX_DOUBLE
/* For an SCM object Z which is a complex number (ie. satisfies /* For an SCM object Z which is a complex number (ie. satisfies
SCM_COMPLEXP), return its value as a C level "complex double". */ SCM_COMPLEXP), return its value as a C level "complex double". */
#define SCM_COMPLEX_VALUE(z) \ #define SCM_COMPLEX_VALUE(z) \
(SCM_COMPLEX_REAL (z) + GUILE_I * SCM_COMPLEX_IMAG (z)) (SCM_COMPLEX_REAL (z) + GUILE_I * SCM_COMPLEX_IMAG (z))
#endif
/* Convert a C "complex double" to an SCM value. */ /* Convert a C "complex double" to an SCM value. */
#if HAVE_COMPLEX_DOUBLE
static SCM static SCM
scm_from_complex_double (complex double z) scm_from_complex_double (complex double z)
{ {
return scm_c_make_rectangular (creal (z), cimag (z)); return scm_c_make_rectangular (creal (z), cimag (z));
} }
#endif /* HAVE_COMPLEX_DOUBLE */ #endif /* HAVE_COMPLEX_DOUBLE */
#endif /* GUILE_I */