]> gitweb.factorcode.org Git - factor.git/commitdiff
Fix compile warning and fix (sleep) primitive on Windows
authorU-SLAVA-DFB8FF805\Slava <Slava@slava-dfb8ff805.(none)>
Sat, 13 Dec 2008 10:49:16 +0000 (04:49 -0600)
committerU-SLAVA-DFB8FF805\Slava <Slava@slava-dfb8ff805.(none)>
Sat, 13 Dec 2008 10:49:16 +0000 (04:49 -0600)
vm/os-windows.c
vm/os-windows.h

index ee2c7211119e59212abdd3104bcc12ce15a3a8ac..c3e9e50cee7ce0ab164f392ca4ac1b28d9358f16 100755 (executable)
@@ -166,7 +166,7 @@ long getpagesize(void)
        return g_pagesize;
 }
 
-void sleep_micros(DWORD usec)
+void sleep_micros(u64 usec)
 {
-       Sleep(usec);
+       Sleep((DWORD)(usec / 1000));
 }
index af9b75bca5c931d1028c629ac666eb113c227b29..227d44af77261f863c61dd95d6700542942b2cb6 100755 (executable)
@@ -20,17 +20,18 @@ typedef wchar_t F_CHAR;
 #define STRNCMP wcsncmp
 #define STRDUP _wcsdup
 
-#define FIXNUM_FORMAT "%Id"
 #define CELL_FORMAT "%lu"
-#define CELL_HEX_FORMAT "%Ix"
 
 #ifdef WIN64
+        #define CELL_HEX_FORMAT "%Ix"
        #define CELL_HEX_PAD_FORMAT "%016Ix"
+        #define FIXNUM_FORMAT "%Id"
 #else
+        #define CELL_HEX_FORMAT "%lx"
        #define CELL_HEX_PAD_FORMAT "%08lx"
+        #define FIXNUM_FORMAT "%ld"
 #endif
 
-#define FIXNUM_FORMAT "%Id"
 
 #define OPEN_READ(path) _wfopen(path,L"rb")
 #define OPEN_WRITE(path) _wfopen(path,L"wb")
@@ -49,7 +50,7 @@ void ffi_dlopen(F_DLL *dll);
 void *ffi_dlsym(F_DLL *dll, F_SYMBOL *symbol);
 void ffi_dlclose(F_DLL *dll);
 
-void sleep_micros(DWORD msec);
+void sleep_micros(u64 msec);
 
 INLINE void init_signals(void) {}
 INLINE void early_init(void) {}