1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-01 05:45:45 +00:00
freebsd-ports/lang/guile2/files/patch-libguile_numbers.c
Alexey Dokuchaev 0b88085b09 Improve GCC version check so it won't reject versions like 5.4, 6.4,
7.2 and wrap `__clang__' with defined() to pacify -Wundef warning.
2017-12-31 09:17:53 +00:00

24 lines
767 B
C

--- libguile/numbers.c.orig 2016-12-15 00:03:33 UTC
+++ libguile/numbers.c
@@ -45,7 +45,11 @@
# include <config.h>
#endif
+/* With old GCC, do not override _Static_assert: it conflicts with
+ #include <complex.h> below. */
+#if defined(__clang__) || (__GNUC__ * 10 + __GNUC_MINOR__ >= 46)
#include <verify.h>
+#endif
#include <assert.h>
#include <math.h>
@@ -183,7 +187,7 @@ static double atanh (double x) { return 0.5 * log ((1
#if defined (GUILE_I)
-#if defined HAVE_COMPLEX_DOUBLE
+#if defined HAVE_COMPLEX_DOUBLE && (HAVE_CLOG || HAVE_CLOG10 || HAVE_CEXP || HAVE_USABLE_CSQRT) && defined (SCM_COMPLEX_VALUE)
/* For an SCM object Z which is a complex number (ie. satisfies
SCM_COMPLEXP), return its value as a C level "complex double". */