annotate tremor/os.h @ 16399:97007b8b0720

Synced with 1.1076 - patch by Paul TT <paultt - at - hackerjournal - dot - it> with some improvement ;)
author danny
date Mon, 05 Sep 2005 11:18:09 +0000
parents 8631a3803289
children cd6b211be811
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
14280
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
1 #ifndef _OS_H
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
2 #define _OS_H
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
3 /********************************************************************
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
4 * *
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
5 * THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. *
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
6 * *
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
7 * THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2002 *
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
8 * BY THE Xiph.Org FOUNDATION http://www.xiph.org/ *
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
9 * ALL REDISTRIBUTION RIGHTS RESERVED. *
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
10 * *
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
11 ********************************************************************
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
12
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
13 function: #ifdef jail to whip a few platforms into the UNIX ideal.
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
14
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
15 ********************************************************************/
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
16
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
17 #include <math.h>
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
18 #include "os_types.h"
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
19
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
20 #ifndef _V_IFDEFJAIL_H_
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
21 # define _V_IFDEFJAIL_H_
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
22
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
23 # ifdef __GNUC__
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
24 # define STIN static __inline__
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
25 # elif _WIN32
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
26 # define STIN static __inline
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
27 # endif
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
28 #else
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
29 # define STIN static
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
30 #endif
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
31
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
32 #ifndef M_PI
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
33 # define M_PI (3.1415926536f)
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
34 #endif
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
35
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
36 #ifdef _WIN32
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
37 # include <malloc.h>
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
38 # define rint(x) (floor((x)+0.5f))
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
39 # define NO_FLOAT_MATH_LIB
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
40 # define FAST_HYPOT(a, b) sqrt((a)*(a) + (b)*(b))
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
41 #endif
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
42
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
43 #ifdef HAVE_ALLOCA_H
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
44 # include <alloca.h>
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
45 #endif
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
46
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
47 #ifdef USE_MEMORY_H
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
48 # include <memory.h>
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
49 #endif
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
50
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
51 #ifndef min
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
52 # define min(x,y) ((x)>(y)?(y):(x))
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
53 #endif
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
54
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
55 #ifndef max
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
56 # define max(x,y) ((x)<(y)?(y):(x))
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
57 #endif
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
58
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
59 #endif /* _OS_H */