sync with ffmpeg
[mplayer/glamo.git] / tremor / os.h
blob10db04648ae90228b5da501a5d7a81f832e797af
1 #ifndef _OS_H
2 #define _OS_H
3 /********************************************************************
4 * *
5 * THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. *
6 * *
7 * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
8 * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
9 * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
10 * *
11 * THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2002 *
12 * BY THE Xiph.Org FOUNDATION http://www.xiph.org/ *
13 * *
14 ********************************************************************
16 function: #ifdef jail to whip a few platforms into the UNIX ideal.
18 ********************************************************************/
20 #include <math.h>
21 #include "os_types.h"
23 #define STIN static inline
25 #ifndef M_PI
26 # define M_PI (3.1415926536f)
27 #endif
29 #ifdef _WIN32
30 # include <malloc.h>
31 # define rint(x) (floor((x)+0.5f))
32 # define NO_FLOAT_MATH_LIB
33 # define FAST_HYPOT(a, b) sqrt((a)*(a) + (b)*(b))
34 #endif
36 #ifdef HAVE_ALLOCA_H
37 # include <alloca.h>
38 #endif
40 #ifdef USE_MEMORY_H
41 # include <memory.h>
42 #endif
44 #ifndef min
45 # define min(x,y) ((x)>(y)?(y):(x))
46 #endif
48 #ifndef max
49 # define max(x,y) ((x)<(y)?(y):(x))
50 #endif
52 #endif /* _OS_H */