summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bignum.c12
-rw-r--r--rational.c12
2 files changed, 18 insertions, 6 deletions
diff --git a/bignum.c b/bignum.c
index 4b01316d22..e04843f478 100644
--- a/bignum.c
+++ b/bignum.c
@@ -30,9 +30,6 @@
# define USE_GMP 0
#endif
#endif
-#if USE_GMP
-# include <gmp.h>
-#endif
#include "id.h"
#include "internal.h"
@@ -48,6 +45,15 @@
#include "ruby/util.h"
#include "ruby_assert.h"
+#if USE_GMP
+RBIMPL_WARNING_PUSH()
+# ifdef _MSC_VER
+RBIMPL_WARNING_IGNORED(4146) /* for mpn_neg() */
+# endif
+# include <gmp.h>
+RBIMPL_WARNING_POP()
+#endif
+
static const bool debug_integer_pack = (
#ifdef DEBUG_INTEGER_PACK
DEBUG_INTEGER_PACK+0
diff --git a/rational.c b/rational.c
index 014cbb6c6a..1b162e7b56 100644
--- a/rational.c
+++ b/rational.c
@@ -22,9 +22,6 @@
# define USE_GMP 0
#endif
#endif
-#if USE_GMP
-#include <gmp.h>
-#endif
#include "id.h"
#include "internal.h"
@@ -36,6 +33,15 @@
#include "internal/rational.h"
#include "ruby_assert.h"
+#if USE_GMP
+RBIMPL_WARNING_PUSH()
+# ifdef _MSC_VER
+RBIMPL_WARNING_IGNORED(4146) /* for mpn_neg() */
+# endif
+# include <gmp.h>
+RBIMPL_WARNING_POP()
+#endif
+
#define ZERO INT2FIX(0)
#define ONE INT2FIX(1)
#define TWO INT2FIX(2)