mingodad 8 лет назад
Родитель
Сommit
b19b3b8a64
4 измененных файлов с 8 добавлено и 2 удалено
  1. 2 1
      SquiLu-ext/mongoose.c
  2. 3 0
      SquiLu-ext/sq_bitvector.cpp
  3. 2 0
      SquiLu/sq/sq.c
  4. 1 1
      SquiLu/sqstdlib/sqstdsystem.cpp

+ 2 - 1
SquiLu-ext/mongoose.c

@@ -72,6 +72,7 @@
 #include <process.h>
 #include <process.h>
 #include <direct.h>
 #include <direct.h>
 #include <io.h>
 #include <io.h>
+typedef const char *SOCK_OPT_TYPE;
 #else // _WIN32_WCE
 #else // _WIN32_WCE
 #include <winsock2.h>
 #include <winsock2.h>
 #include <ws2tcpip.h>
 #include <ws2tcpip.h>
@@ -1496,7 +1497,7 @@ static pid_t spawn_process(struct mg_connection *conn, const char *prog,
   if (CreateProcessA(NULL, cmdline, NULL, NULL, TRUE,
   if (CreateProcessA(NULL, cmdline, NULL, NULL, TRUE,
         CREATE_NEW_PROCESS_GROUP, envblk, dir, &si, &pi) == 0) {
         CREATE_NEW_PROCESS_GROUP, envblk, dir, &si, &pi) == 0) {
     cry(conn, "%s: CreateProcess(%s): %d",
     cry(conn, "%s: CreateProcess(%s): %d",
-        __func__, cmdline, ERRNO);
+        __func__, cmdline, (int)ERRNO);
     pi.hProcess = (pid_t) -1;
     pi.hProcess = (pid_t) -1;
   }
   }
 
 

+ 3 - 0
SquiLu-ext/sq_bitvector.cpp

@@ -4,6 +4,9 @@
 #include <string.h>
 #include <string.h>
 #include <stdio.h>
 #include <stdio.h>
 #include <stdlib.h>  /* for malloc */
 #include <stdlib.h>  /* for malloc */
+#ifdef _WIN32
+#include <malloc.h>  /* for alloc */
+#endif
 #include <assert.h>  /* for a few sanity tests */
 #include <assert.h>  /* for a few sanity tests */
 
 
 #include "sqlite3.h"
 #include "sqlite3.h"

+ 2 - 0
SquiLu/sq/sq.c

@@ -624,7 +624,9 @@ static sq_modules_preload_st modules_preload[] = {
 #ifdef SQ_USE_FREETYPE
 #ifdef SQ_USE_FREETYPE
     {"freetype", sqext_register_freetype},
     {"freetype", sqext_register_freetype},
 #endif // SQ_USE_FREETYPE
 #endif // SQ_USE_FREETYPE
+#ifdef SQ_USE_BLOSC
     {"blosc", sqext_register_sq_blosc},
     {"blosc", sqext_register_sq_blosc},
+#endif // SQ_USE_BLOSC
 #endif
 #endif
 #ifdef USE_AXTLS
 #ifdef USE_AXTLS
     {"axtls", sqext_register_axtls},
     {"axtls", sqext_register_axtls},

+ 1 - 1
SquiLu/sqstdlib/sqstdsystem.cpp

@@ -371,7 +371,7 @@ static SQRESULT  _system_sleep(HSQUIRRELVM v)
 #ifndef _WIN32_WCE
 #ifndef _WIN32_WCE
 #include <sys/timeb.h>
 #include <sys/timeb.h>
 
 
-#if !(defined(TARGET_IOS) || defined(__APPLE__))
+#if !(defined(TARGET_IOS) || defined(__APPLE__) || defined(_WIN32))
 static int sqftime(struct timeb *tp)
 static int sqftime(struct timeb *tp)
 {
 {
 	struct timespec ts;
 	struct timespec ts;