Statistics
| Branch: | Revision:

ffmpeg / libavcodec / os_support.h @ c506fb40

History | View | Annotate | Download (711 Bytes)

1
#ifndef _OS_SUPPORT_H
2
#define _OS_SUPPORT_H
3

    
4
/**
5
 * @file os_support.h
6
 * miscellaneous OS support macros and functions.
7
 *
8
 * - usleep() (Win32, BeOS, OS/2)
9
 * - floatf() (OS/2)
10
 * - strcasecmp() (OS/2)
11
 */
12

    
13
#ifdef __MINGW32__
14
#  include <windows.h>
15
#  define usleep(t)    Sleep((t) / 1000)
16
#endif
17

    
18
#ifdef __BEOS__
19
#  ifndef usleep
20
#    include <OS.h>
21
#    define usleep(t)  snooze((bigtime_t)(t))
22
#  endif
23
#endif
24

    
25
#if defined(CONFIG_OS2)
26
#include <stdlib.h>
27
static inline int usleep(unsigned int t) { return _sleep2(t / 1000); }
28
static inline float floatf(float f) { return floor(f); }
29
static inline int strcasecmp(const char* s1, const char* s2) { return stricmp(s1,s2); }
30
#endif
31

    
32
#endif /* _OS_SUPPORT_H */