media/libtremor/lib/os.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/media/libtremor/lib/os.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,64 @@
     1.4 +#ifndef _OS_H
     1.5 +#define _OS_H
     1.6 +/********************************************************************
     1.7 + *                                                                  *
     1.8 + * THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE.   *
     1.9 + *                                                                  *
    1.10 + * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *
    1.11 + * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
    1.12 + * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
    1.13 + *                                                                  *
    1.14 + * THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2002    *
    1.15 + * BY THE Xiph.Org FOUNDATION http://www.xiph.org/                  *
    1.16 + *                                                                  *
    1.17 + ********************************************************************
    1.18 +
    1.19 + function: #ifdef jail to whip a few platforms into the UNIX ideal.
    1.20 +
    1.21 + ********************************************************************/
    1.22 +
    1.23 +#include <math.h>
    1.24 +#include <ogg/os_types.h>
    1.25 +
    1.26 +#ifndef _V_IFDEFJAIL_H_
    1.27 +#  define _V_IFDEFJAIL_H_
    1.28 +
    1.29 +#  ifdef __GNUC__
    1.30 +#    define STIN static __inline__
    1.31 +#  elif _WIN32
    1.32 +#    define STIN static __inline
    1.33 +#  endif
    1.34 +#else
    1.35 +#  define STIN static
    1.36 +#endif
    1.37 +
    1.38 +#ifndef M_PI
    1.39 +#  define M_PI (3.1415926536f)
    1.40 +#endif
    1.41 +
    1.42 +#ifdef _WIN32
    1.43 +#  include <malloc.h>
    1.44 +#  define rint(x)   (floor((x)+0.5f)) 
    1.45 +#  define NO_FLOAT_MATH_LIB
    1.46 +#  define FAST_HYPOT(a, b) sqrt((a)*(a) + (b)*(b))
    1.47 +#  define LITTLE_ENDIAN 1
    1.48 +#  define BYTE_ORDER LITTLE_ENDIAN
    1.49 +#endif
    1.50 +
    1.51 +#ifdef HAVE_ALLOCA_H
    1.52 +#  include <alloca.h>
    1.53 +#endif
    1.54 +
    1.55 +#ifdef USE_MEMORY_H
    1.56 +#  include <memory.h>
    1.57 +#endif
    1.58 +
    1.59 +#ifndef min
    1.60 +#  define min(x,y)  ((x)>(y)?(y):(x))
    1.61 +#endif
    1.62 +
    1.63 +#ifndef max
    1.64 +#  define max(x,y)  ((x)<(y)?(y):(x))
    1.65 +#endif
    1.66 +
    1.67 +#endif /* _OS_H */

mercurial