From 2b9f068e7ee4c0d249c715f9eb5a3c2c8a11e6f8 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Wed, 26 Mar 2008 18:10:17 +0000 Subject: win32 updates --- src/sys/sys.cc | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'src/sys') 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 +#include #else @@ -21,15 +18,17 @@ #include #endif + #include +#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) { } } + -- cgit v1.2.3