From 4034314816f7ec9e26c9b9bfc2630c8ca0a24874 Mon Sep 17 00:00:00 2001 From: Andrey Nazarov Date: Sun, 17 Feb 2008 22:53:39 +0000 Subject: Huge search and replace commit. Use fixed size integer types from stdint.h instead of custom defined ones. Get endianess infromation form endian.h. Added `remotemode' console command. Link with -ldl only on Linux. --- source/sys_unix.c | 34 +++++++--------------------------- 1 file changed, 7 insertions(+), 27 deletions(-) (limited to 'source/sys_unix.c') diff --git a/source/sys_unix.c b/source/sys_unix.c index ad84705..afe3f09 100644 --- a/source/sys_unix.c +++ b/source/sys_unix.c @@ -53,10 +53,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #undef USE_SDL #endif -#ifdef USE_SDL +#if USE_SDL #include +#if USE_X11 #include #endif +#endif cvar_t *sys_basedir; cvar_t *sys_libdir; @@ -550,31 +552,9 @@ void Sys_DebugBreak( void ) { raise( SIGTERM ); } -/* -================ -Sys_Milliseconds -================ -*/ -int Sys_Milliseconds( void ) { - struct timeval tp; - static int secbase; - int curtime; - - gettimeofday( &tp, NULL ); - - if( !secbase ) { - secbase = tp.tv_sec; - return tp.tv_usec / 1000; - } - - curtime = ( tp.tv_sec - secbase ) * 1000 + tp.tv_usec / 1000; - - return curtime; -} - -uint32 Sys_Realtime( void ) { +unsigned Sys_Milliseconds( void ) { struct timeval tp; - uint32 time; + unsigned time; gettimeofday( &tp, NULL ); time = tp.tv_sec * 1000 + tp.tv_usec / 1000; @@ -668,7 +648,7 @@ Sys_GetClipboardData ================= */ char *Sys_GetClipboardData( void ) { -#if USE_SDL +#if USE_SDL && USE_X11 SDL_SysWMinfo info; Display *dpy; Window sowner, win; @@ -807,7 +787,7 @@ void Sys_FillAPI( sysAPI_t *api ) { void Sys_FixFPCW( void ) { #ifdef __i386__ - uint16 cw; + uint16_t cw; __asm__ __volatile__( "fnstcw %0" : "=m" (cw) ); -- cgit v1.2.3