Browse Source

Tweaks for mx2cc not being able to compiling itself.

Mark Sibly 7 years ago
parent
commit
1159e4a85e
3 changed files with 8 additions and 5 deletions
  1. 1 4
      modules/monkey/monkey.monkey2
  2. 3 0
      modules/monkey/native/bbgc.cpp
  3. 4 1
      modules/monkey/native/bbgc.h

+ 1 - 4
modules/monkey/monkey.monkey2

@@ -15,11 +15,8 @@ Namespace monkey
 #Import "native/bbdeclinfo.cpp"
 #Import "native/bbmonkey_c.c"
 
-'#If __THREADS__
-'#Import "native/bbgc_mx.cpp"
-'#else
+#Import "native/bbgc_mx.cpp"
 #Import "native/bbgc.cpp"
-'#endif
 
 #If __TARGET__="macos" Or __TARGET__="ios"
 #Import "native/bbstring.mm"

+ 3 - 0
modules/monkey/native/bbgc.cpp

@@ -1,4 +1,6 @@
 
+#ifndef BB_THREADS
+
 #include "bbgc.h"
 #include "bbweakref.h"
 
@@ -375,3 +377,4 @@ namespace bbGC{
 	}
 }
 
+#endif

+ 4 - 1
modules/monkey/native/bbgc.h

@@ -2,7 +2,10 @@
 #ifndef BB_GC_H
 #define BB_GC_H
 
-#include "bbstd.h"
+#ifdef BB_THREADS
+#error "Wrong gc header"
+#endif
+
 #include "bbtypes.h"
 #include "bbfunction.h"