Changeset 15783

Show
Ignore:
Timestamp:
29.05.2008 12:57:09 (11 years ago)
Author:
mdewsnip
Message:

(Adding new DB support) A couple of fixes for compiling on Windows.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • gsdl/trunk/lib/sqlitedbclass.cpp

    r15752 r15783  
    2626#include "sqlitedbclass.h" 
    2727#include "unitool.h" 
     28 
     29#ifdef __WIN32__ 
     30// for Sleep 
     31#  include <windows.h> 
     32#else 
     33// for usleep 
     34#  include <unistd.h> 
     35#endif 
    2836 
    2937 
     
    184192// ---------------------------------------------------------------------------------------- 
    185193 
     194// sleep for the given number of milliseconds 
     195void sleep(int m) 
     196{ 
     197#ifdef __WIN32__ 
     198  Sleep(m); 
     199#else 
     200  usleep(m); 
     201#endif 
     202} 
     203 
     204 
    186205// sqlexec simply executes the given sql statement - it doesn't obtain a 
    187206// result set - returns true if the sql statement was executed successfully 
     
    283302  return true; 
    284303} 
    285  
    286  
    287 // sleep for the given number of milliseconds 
    288 void sleep(int m) 
    289 { 
    290 #ifdef __WIN32__ 
    291   Sleep(m); 
    292 #else 
    293   usleep(m); 
    294 #endif 
    295 }