[Plib-cvs] CVS: plib/src/util ul.h,1.36,1.37
Brought to you by:
sjbaker
From: M?rten Str?m. <str...@us...> - 2002-03-21 12:50:36
|
Update of /cvsroot/plib/plib/src/util In directory usw-pr-cvs1:/tmp/cvs-serv7717 Modified Files: ul.h Log Message: Second try to drop the '-DWIN32' dependency. Index: ul.h =================================================================== RCS file: /cvsroot/plib/plib/src/util/ul.h,v retrieving revision 1.36 retrieving revision 1.37 diff -u -d -r1.36 -r1.37 --- ul.h 20 Mar 2002 17:30:11 -0000 1.36 +++ ul.h 21 Mar 2002 12:50:33 -0000 1.37 @@ -44,7 +44,11 @@ #include <ctype.h> #include <assert.h> -#if defined (_WIN32) +#if (defined(_WIN32) || defined(__CYGWIN__)) && !defined(WIN32) +# define WIN32 +#endif + +#if defined (WIN32) # include <windows.h> # ifdef __CYGWIN__ # include <unistd.h> @@ -124,7 +128,7 @@ double last_time ; double max_delta ; -#ifdef _WIN32 +#ifdef WIN32 static double res ; static int perf_timer ; void initPerformanceTimer () ; @@ -138,7 +142,7 @@ void reset () { -#ifdef _WIN32 +#ifdef WIN32 initPerformanceTimer () ; #endif start = getRawTime () ; @@ -161,7 +165,7 @@ { if ( seconds >= 0 ) { -#ifdef _WIN32 +#ifdef WIN32 Sleep ( 1000 * seconds ) ; #else sleep ( seconds ) ; @@ -174,7 +178,7 @@ { if ( milliseconds >= 0 ) { -#ifdef _WIN32 +#ifdef WIN32 Sleep ( milliseconds ) ; #else usleep ( milliseconds * 1000 ) ; @@ -445,7 +449,7 @@ */ -#if defined (_WIN32) +#if defined (WIN32) class ulDynamicLibrary { @@ -612,7 +616,7 @@ } } ; -#endif /* if defined(_WIN32) */ +#endif /* if defined(WIN32) */ class ulList |