openalbridge/openalwrap.h
changeset 2210 1cb7118a77dd
parent 2200 8192be6e3aef
child 2211 288360b78f30
equal deleted inserted replaced
2209:2573d4ff78f9 2210:1cb7118a77dd
    31 #define WIN32_LEAN_AND_MEAN
    31 #define WIN32_LEAN_AND_MEAN
    32 #include <windows.h>
    32 #include <windows.h>
    33 #include "winstdint.h"
    33 #include "winstdint.h"
    34 #endif
    34 #endif
    35 
    35 
    36 #ifndef _SLEEP_H
       
    37 #define _SLEEP_H
       
    38 /** 1.0 02/03/10 - Defines cross-platform sleep, usleep, etc. * By Wu Yongwei **/
       
    39 #ifdef _WIN32
       
    40 # if defined(_NEED_SLEEP_ONLY) && (defined(_MSC_VER) || defined(__MINGW32__))
       
    41 #  include <stdlib.h>
       
    42 #  define sleep(t) _sleep((t) * 1000)
       
    43 # else
       
    44 #  include <windows.h>
       
    45 #  define sleep(t)  Sleep((t) * 1000)
       
    46 # endif
       
    47 # ifndef _NEED_SLEEP_ONLY
       
    48 #  define msleep(t) Sleep(t)
       
    49 #  define usleep(t) Sleep((t) / 1000)
       
    50 # endif
       
    51 #else
       
    52 # include <unistd.h>
       
    53 # ifndef _NEED_SLEEP_ONLY
       
    54 #  define msleep(t) usleep((t) * 1000)
       
    55 # endif
       
    56 #endif
       
    57 
       
    58 #endif /* _SLEEP_H */
       
    59 
    36 
    60 #ifdef __CPLUSPLUS
    37 #ifdef __CPLUSPLUS
    61 extern "C" {
    38 extern "C" {
    62 #endif 
    39 #endif 
    63 	
    40