diff options
author | Stijn Buys <ingar@osirion.org> | 2008-03-26 18:10:17 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2008-03-26 18:10:17 +0000 |
commit | 2b9f068e7ee4c0d249c715f9eb5a3c2c8a11e6f8 (patch) | |
tree | fcd373f97385dc150437bc09b2143e0ceee589e1 /src/sys | |
parent | a29aa1ee2935857f616351a23578311f514516d4 (diff) |
win32 updates
Diffstat (limited to 'src/sys')
-rw-r--r-- | src/sys/sys.cc | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/sys/sys.cc b/src/sys/sys.cc index a9958f4..4c3f38f 100644 --- a/src/sys/sys.cc +++ b/src/sys/sys.cc @@ -4,13 +4,10 @@ the terms of the GNU General Public License version 2 */ -// project headers -#include "sys/sys.h" -// system headers #ifdef _WIN32 -#include <dlfcn.h> +#include <windows.h> #else @@ -21,15 +18,17 @@ #include <sys/types.h> #endif + #include <stdlib.h> +#include "sys/sys.h" + namespace sys { void mkdir(const char *path) { #ifdef _WIN32 - ::mkdir(path); - return true; + mkdir(path); #else ::mkdir(path, 0777); #endif @@ -60,14 +59,16 @@ unsigned long time() ::localtime_r(&epochtime, &localtime); return ((unsigned long) (localtime.tm_sec + localtime.tm_min*60 + localtime.tm_hour*3600)); #else - retrun 0; + return 0; #endif } void sleep(float seconds) { #ifndef _WIN32 - ::usleep((useconds_t) (seconds * 1000000.0) ); + ::usleep((useconds_t) (seconds * 1000000.0f) ); +#else + Sleep((DWORD) (seconds*1000.0f)); #endif } @@ -76,3 +77,4 @@ void quit(int status) { } } + |