mirror of
https://github.com/Stichting-MINIX-Research-Foundation/pkgsrc-ng.git
synced 2025-09-13 14:25:12 -04:00
21 lines
564 B
C
21 lines
564 B
C
$NetBSD: patch-src_get.c,v 1.2 2012/08/05 18:24:56 marino Exp $
|
|
|
|
Work around bug in SunOS complex.h to make this build with Sun's gcc
|
|
|
|
--- src/get_x.c.orig 2011-11-04 18:20:19.000000000 +0000
|
|
+++ src/get_x.c
|
|
@@ -35,6 +35,13 @@ along with this program. If not, see htt
|
|
#include "mpc-impl.h"
|
|
|
|
#ifdef HAVE_COMPLEX_H
|
|
+
|
|
+#if defined(__sun) && defined(__GNUC__) && defined(_Imaginary_I)
|
|
+#undef I
|
|
+#define I (__extension__ 1.0iF)
|
|
+
|
|
+#endif
|
|
+
|
|
double _Complex
|
|
mpc_get_dc (mpc_srcptr op, mpc_rnd_t rnd) {
|
|
return I * mpfr_get_d (mpc_imagref (op), MPC_RND_IM (rnd))
|