media/libtremor/lib/os.h

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

michael@0 1 #ifndef _OS_H
michael@0 2 #define _OS_H
michael@0 3 /********************************************************************
michael@0 4 * *
michael@0 5 * THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. *
michael@0 6 * *
michael@0 7 * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
michael@0 8 * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
michael@0 9 * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
michael@0 10 * *
michael@0 11 * THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2002 *
michael@0 12 * BY THE Xiph.Org FOUNDATION http://www.xiph.org/ *
michael@0 13 * *
michael@0 14 ********************************************************************
michael@0 15
michael@0 16 function: #ifdef jail to whip a few platforms into the UNIX ideal.
michael@0 17
michael@0 18 ********************************************************************/
michael@0 19
michael@0 20 #include <math.h>
michael@0 21 #include <ogg/os_types.h>
michael@0 22
michael@0 23 #ifndef _V_IFDEFJAIL_H_
michael@0 24 # define _V_IFDEFJAIL_H_
michael@0 25
michael@0 26 # ifdef __GNUC__
michael@0 27 # define STIN static __inline__
michael@0 28 # elif _WIN32
michael@0 29 # define STIN static __inline
michael@0 30 # endif
michael@0 31 #else
michael@0 32 # define STIN static
michael@0 33 #endif
michael@0 34
michael@0 35 #ifndef M_PI
michael@0 36 # define M_PI (3.1415926536f)
michael@0 37 #endif
michael@0 38
michael@0 39 #ifdef _WIN32
michael@0 40 # include <malloc.h>
michael@0 41 # define rint(x) (floor((x)+0.5f))
michael@0 42 # define NO_FLOAT_MATH_LIB
michael@0 43 # define FAST_HYPOT(a, b) sqrt((a)*(a) + (b)*(b))
michael@0 44 # define LITTLE_ENDIAN 1
michael@0 45 # define BYTE_ORDER LITTLE_ENDIAN
michael@0 46 #endif
michael@0 47
michael@0 48 #ifdef HAVE_ALLOCA_H
michael@0 49 # include <alloca.h>
michael@0 50 #endif
michael@0 51
michael@0 52 #ifdef USE_MEMORY_H
michael@0 53 # include <memory.h>
michael@0 54 #endif
michael@0 55
michael@0 56 #ifndef min
michael@0 57 # define min(x,y) ((x)>(y)?(y):(x))
michael@0 58 #endif
michael@0 59
michael@0 60 #ifndef max
michael@0 61 # define max(x,y) ((x)<(y)?(y):(x))
michael@0 62 #endif
michael@0 63
michael@0 64 #endif /* _OS_H */

mercurial