Bug 901583: Reapply mozilla patches on top of webrtc.org 3.34, use NEON detection...
[gecko.git] / media / libtremor / lib / os.h
blob130d27de3263fca3ce6a48813a0a8d7819daf9a9
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 <ogg/os_types.h>
23 #ifndef _V_IFDEFJAIL_H_
24 # define _V_IFDEFJAIL_H_
26 # ifdef __GNUC__
27 # define STIN static __inline__
28 # elif _WIN32
29 # define STIN static __inline
30 # endif
31 #else
32 # define STIN static
33 #endif
35 #ifndef M_PI
36 # define M_PI (3.1415926536f)
37 #endif
39 #ifdef _WIN32
40 # include <malloc.h>
41 # define rint(x) (floor((x)+0.5f))
42 # define NO_FLOAT_MATH_LIB
43 # define FAST_HYPOT(a, b) sqrt((a)*(a) + (b)*(b))
44 # define LITTLE_ENDIAN 1
45 # define BYTE_ORDER LITTLE_ENDIAN
46 #endif
48 #ifdef HAVE_ALLOCA_H
49 # include <alloca.h>
50 #endif
52 #ifdef USE_MEMORY_H
53 # include <memory.h>
54 #endif
56 #ifndef min
57 # define min(x,y) ((x)>(y)?(y):(x))
58 #endif
60 #ifndef max
61 # define max(x,y) ((x)<(y)?(y):(x))
62 #endif
64 #endif /* _OS_H */