]> gitweb.factorcode.org Git - factor.git/commitdiff
Fix VM compile on 32-bit Windows
authorU-SLAVA-DFB8FF805\Slava <Slava@slava-dfb8ff805.(none)>
Wed, 19 Nov 2008 00:51:52 +0000 (18:51 -0600)
committerU-SLAVA-DFB8FF805\Slava <Slava@slava-dfb8ff805.(none)>
Wed, 19 Nov 2008 00:51:52 +0000 (18:51 -0600)
vm/main-windows-nt.c [changed mode: 0644->0755]
vm/os-windows.h

old mode 100644 (file)
new mode 100755 (executable)
index 95fd685..ef66651
@@ -15,7 +15,7 @@ int WINAPI WinMain(
        szArglist = CommandLineToArgvW(GetCommandLineW(), &nArgs);
        if(NULL == szArglist)
        {
-               print_string("CommandLineToArgvW failed\n");
+               puts("CommandLineToArgvW failed");
                return 1;
        }
 
index 2a56b03ef62b244debc443ea2c68c007e9f76b11..8d0f15648a63aed3e2b37d322929d3d912ed261f 100755 (executable)
@@ -20,13 +20,14 @@ typedef wchar_t F_CHAR;
 #define STRNCMP wcsncmp
 #define STRDUP _wcsdup
 
-#define CELL_FORMAT "%Iu"
-#define CELL_HEX_FORMAT "%Ix"
-
-#ifdef FACTOR_64
+#ifdef WIN64
+        #define CELL_FORMAT "%Iu"
+        #define CELL_HEX_FORMAT "%Ix"
        #define CELL_HEX_PAD_FORMAT "%016Ix"
 #else
-       #define CELL_HEX_PAD_FORMAT "%08Ix"
+        #define CELL_FORMAT "%lu"
+        #define CELL_HEX_FORMAT "%lx"
+       #define CELL_HEX_PAD_FORMAT "%08lx"
 #endif
 
 #define FIXNUM_FORMAT "%Id"
@@ -34,7 +35,7 @@ typedef wchar_t F_CHAR;
 #define OPEN_READ(path) _wfopen(path,L"rb")
 #define OPEN_WRITE(path) _wfopen(path,L"wb")
 
-#define print_native_string(string) wprintf(L"%s",arg)
+#define print_native_string(string) wprintf(L"%s",string)
 
 /* Difference between Jan 1 00:00:00 1601 and Jan 1 00:00:00 1970 */
 #define EPOCH_OFFSET 0x019db1ded53e8000LL