changeset 6905:d973e23c3bf8 v7.4.772

patch 7.4.772 Problem: Racket 6.2 is not supported on MS-Windows. Solution: Check for the "racket" subdirectory. (Weiyong Mao)
author Bram Moolenaar <bram@vim.org>
date Fri, 10 Jul 2015 16:12:48 +0200
parents 4c5b1fc5100e
children 0540e823bca7
files src/Make_mvc.mak src/if_mzsch.c src/version.c
diffstat 3 files changed, 16 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/Make_mvc.mak
+++ b/src/Make_mvc.mak
@@ -797,7 +797,8 @@ MZSCHEME_VER = 205_000
 !endif
 CFLAGS = $(CFLAGS) -DFEAT_MZSCHEME -I $(MZSCHEME)\include
 !if EXIST("$(MZSCHEME)\collects\scheme\base.ss") \
-	|| EXIST("$(MZSCHEME)\collects\scheme\base.rkt") 
+      	|| EXIST("$(MZSCHEME)\collects\scheme\base.rkt") \
+      	|| EXIST("$(MZSCHEME)\collects\racket\base.rkt")
 # for MzScheme >= 4 we need to include byte code for basic Scheme stuff
 MZSCHEME_EXTRA_DEP = mzscheme_base.c
 CFLAGS = $(CFLAGS) -DINCLUDE_MZSCHEME_BASE
@@ -1170,7 +1171,11 @@ if_perl.c : if_perl.xs typemap
 	$(CC) $(CFLAGS) if_mzsch.c \
 		-DMZSCHEME_COLLECTS=\"$(MZSCHEME:\=\\)\\collects\"
 mzscheme_base.c:
+!IF "$(MZSCHEME_MAIN_LIB)" == "racket"
+	$(MZSCHEME)\raco ctool --c-mods mzscheme_base.c ++lib scheme/base
+!ELSE
 	$(MZSCHEME)\mzc --c-mods mzscheme_base.c ++lib scheme/base
+!ENDIF
 
 $(OUTDIR)/if_python.obj: $(OUTDIR) if_python.c if_py_both.h $(INCL)
 	$(CC) $(CFLAGS) $(PYTHON_INC) if_python.c
--- a/src/if_mzsch.c
+++ b/src/if_mzsch.c
@@ -851,7 +851,13 @@ mzscheme_end(void)
 #endif
 }
 
-#if MZSCHEME_VERSION_MAJOR >= 500 && defined(WIN32) && defined(USE_THREAD_LOCAL)
+/*
+ * scheme_register_tls_space is only available on 32-bit Windows.
+ * See http://docs.racket-lang.org/inside/im_memoryalloc.html?q=scheme_register_tls_space
+ */
+#if MZSCHEME_VERSION_MAJOR >= 500 && defined(WIN32) \
+	&& defined(USE_THREAD_LOCAL) && !defined(_WIN64)
+# define HAVE_TLS_SPACE 1
 static __declspec(thread) void *tls_space;
 #endif
 
@@ -870,7 +876,7 @@ static __declspec(thread) void *tls_spac
     int
 mzscheme_main(int argc, char** argv)
 {
-#if MZSCHEME_VERSION_MAJOR >= 500 && defined(WIN32) && defined(USE_THREAD_LOCAL)
+#ifdef HAVE_TLS_SPACE
     scheme_register_tls_space(&tls_space, 0);
 #endif
 #ifdef TRAMPOLINED_MZVIM_STARTUP
--- a/src/version.c
+++ b/src/version.c
@@ -742,6 +742,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    772,
+/**/
     771,
 /**/
     770,