summaryrefslogtreecommitdiffhomepage
path: root/src/gc.c
diff options
context:
space:
mode:
authorMasaki Muranaka <[email protected]>2013-03-29 11:02:35 +0900
committerMasaki Muranaka <[email protected]>2013-03-29 11:02:35 +0900
commit74f04849c4d04425e911acbe6bedb2596046f5b0 (patch)
tree34272c291c59b5c6d6c8d1009f78e148eae807a4 /src/gc.c
parent2f8dc97e2d245c641af2f314df5b29c0182f833c (diff)
downloadmruby-74f04849c4d04425e911acbe6bedb2596046f5b0.tar.gz
mruby-74f04849c4d04425e911acbe6bedb2596046f5b0.zip
Rearrange SIZE_MAX. It is supported also VC++ since its version10. And there seems SIZE_MAX is defined in stdint.h. And it possibly (depends on the version of VC++) conflicts with SIZE_MAX in limits.h. This patch is no need if I did not support VC++.
Diffstat (limited to 'src/gc.c')
-rw-r--r--src/gc.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/gc.c b/src/gc.c
index 0877c6c3c..c90e00c89 100644
--- a/src/gc.c
+++ b/src/gc.c
@@ -4,6 +4,12 @@
** See Copyright Notice in mruby.h
*/
+#ifndef SIZE_MAX
+ /* Some versions of VC++
+ * has SIZE_MAX in stdint.h
+ */
+# include <limits.h>
+#endif
#include <string.h>
#include "mruby.h"
#include "mruby/array.h"
@@ -15,10 +21,6 @@
#include "mruby/string.h"
#include "mruby/variable.h"
-#ifndef SIZE_MAX
-#include <limits.h> // for SIZE_MAX
-#endif
-
/*
= Tri-color Incremental Garbage Collection