summaryrefslogtreecommitdiffhomepage
path: root/mrbgems/mruby-cmath
diff options
context:
space:
mode:
Diffstat (limited to 'mrbgems/mruby-cmath')
-rw-r--r--mrbgems/mruby-cmath/mrbgem.rake2
-rw-r--r--mrbgems/mruby-cmath/src/cmath.c7
2 files changed, 4 insertions, 5 deletions
diff --git a/mrbgems/mruby-cmath/mrbgem.rake b/mrbgems/mruby-cmath/mrbgem.rake
index e00725fef..00ac4b091 100644
--- a/mrbgems/mruby-cmath/mrbgem.rake
+++ b/mrbgems/mruby-cmath/mrbgem.rake
@@ -1,5 +1,5 @@
# This `mruby-cmath` gem uses C99 _Complex features
-# You need C compler that support C99+
+# You need C compiler that support C99+
MRuby::Gem::Specification.new('mruby-cmath') do |spec|
spec.license = 'MIT'
spec.author = 'mruby developers'
diff --git a/mrbgems/mruby-cmath/src/cmath.c b/mrbgems/mruby-cmath/src/cmath.c
index 857b58d26..03b181840 100644
--- a/mrbgems/mruby-cmath/src/cmath.c
+++ b/mrbgems/mruby-cmath/src/cmath.c
@@ -6,7 +6,7 @@
/*
** This `mruby-cmath` gem uses C99 _Complex features
-** You need C compler that support C99+
+** You need C compiler that support C99+
*/
#include <mruby.h>
@@ -47,10 +47,10 @@ cmath_get_complex(mrb_state *mrb, mrb_value c, mrb_float *r, mrb_float *i)
#ifdef MRB_USE_FLOAT32
#define F(x) x##f
#else
-#endif
#define F(x) x
+#endif
-#ifdef _WIN32
+#if defined(_WIN32) && !defined(__MINGW32__)
#ifdef MRB_USE_FLOAT32
typedef _Fcomplex mrb_complex;
@@ -91,7 +91,6 @@ CXDIVc(mrb_complex a, mrb_complex b)
return CX(cr, ci);
}
-
#else
#if defined(__cplusplus) && defined(__APPLE__)