14280
|
1 #ifndef _OS_H
|
|
2 #define _OS_H
|
|
3 /********************************************************************
|
|
4 * *
|
|
5 * THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. *
|
|
6 * *
|
|
7 * THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2002 *
|
|
8 * BY THE Xiph.Org FOUNDATION http://www.xiph.org/ *
|
|
9 * ALL REDISTRIBUTION RIGHTS RESERVED. *
|
|
10 * *
|
|
11 ********************************************************************
|
|
12
|
|
13 function: #ifdef jail to whip a few platforms into the UNIX ideal.
|
|
14
|
|
15 ********************************************************************/
|
|
16
|
|
17 #include <math.h>
|
|
18 #include "os_types.h"
|
|
19
|
|
20 #ifndef _V_IFDEFJAIL_H_
|
|
21 # define _V_IFDEFJAIL_H_
|
|
22
|
|
23 # ifdef __GNUC__
|
|
24 # define STIN static __inline__
|
|
25 # elif _WIN32
|
|
26 # define STIN static __inline
|
|
27 # endif
|
|
28 #else
|
|
29 # define STIN static
|
|
30 #endif
|
|
31
|
|
32 #ifndef M_PI
|
|
33 # define M_PI (3.1415926536f)
|
|
34 #endif
|
|
35
|
|
36 #ifdef _WIN32
|
|
37 # include <malloc.h>
|
|
38 # define rint(x) (floor((x)+0.5f))
|
|
39 # define NO_FLOAT_MATH_LIB
|
|
40 # define FAST_HYPOT(a, b) sqrt((a)*(a) + (b)*(b))
|
|
41 #endif
|
|
42
|
|
43 #ifdef HAVE_ALLOCA_H
|
|
44 # include <alloca.h>
|
|
45 #endif
|
|
46
|
|
47 #ifdef USE_MEMORY_H
|
|
48 # include <memory.h>
|
|
49 #endif
|
|
50
|
|
51 #ifndef min
|
|
52 # define min(x,y) ((x)>(y)?(y):(x))
|
|
53 #endif
|
|
54
|
|
55 #ifndef max
|
|
56 # define max(x,y) ((x)<(y)?(y):(x))
|
|
57 #endif
|
|
58
|
|
59 #endif /* _OS_H */
|