misc/libtremor/os_types.h
author nemo
Tue, 06 Sep 2011 17:10:03 -0400
changeset 5796 663eea4da344
parent 5170 f7e49eff3708
permissions -rw-r--r--
Another mass hat rename, because people were just about finished fixing their teams.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
5170
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
     1
/********************************************************************
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
     2
 *                                                                  *
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
     3
 * THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE.   *
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
     4
 *                                                                  *
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
     5
 * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
     6
 * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
     7
 * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
     8
 *                                                                  *
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
     9
 * THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2002    *
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    10
 * BY THE Xiph.Org FOUNDATION http://www.xiph.org/                  *
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    11
 *                                                                  *
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    12
 ********************************************************************
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    13
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    14
 function: #ifdef jail to whip a few platforms into the UNIX ideal.
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    15
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    16
 ********************************************************************/
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    17
#ifndef _OS_TYPES_H
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    18
#define _OS_TYPES_H
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    19
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    20
#ifdef _LOW_ACCURACY_
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    21
#  define X(n) (((((n)>>22)+1)>>1) - ((((n)>>22)+1)>>9))
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    22
#  define LOOKUP_T const unsigned char
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    23
#else
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    24
#  define X(n) (n)
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    25
#  define LOOKUP_T const ogg_int32_t
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    26
#endif
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    27
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    28
/* make it easy on the folks that want to compile the libs with a
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    29
   different malloc than stdlib */
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    30
#define _ogg_malloc  malloc
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    31
#define _ogg_calloc  calloc
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    32
#define _ogg_realloc realloc
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    33
#define _ogg_free    free
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    34
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    35
#ifdef _WIN32 
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    36
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    37
#  ifndef __GNUC__
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    38
   /* MSVC/Borland */
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    39
   typedef __int64 ogg_int64_t;
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    40
   typedef __int32 ogg_int32_t;
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    41
   typedef unsigned __int32 ogg_uint32_t;
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    42
   typedef __int16 ogg_int16_t;
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    43
#  else
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    44
   /* Cygwin */
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    45
   #include <_G_config.h>
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    46
   typedef _G_int64_t ogg_int64_t;
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    47
   typedef _G_int32_t ogg_int32_t;
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    48
   typedef _G_uint32_t ogg_uint32_t;
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    49
   typedef _G_int16_t ogg_int16_t;
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    50
#  endif
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    51
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    52
#elif defined(__MACOS__)
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    53
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    54
#  include <sys/types.h>
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    55
   typedef SInt16 ogg_int16_t;
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    56
   typedef SInt32 ogg_int32_t;
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    57
   typedef UInt32 ogg_uint32_t;
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    58
   typedef SInt64 ogg_int64_t;
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    59
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    60
#elif (defined(__APPLE__) && defined(__MACH__)) /* MacOS X Framework build */
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    61
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    62
#  include <sys/types.h>
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    63
   typedef int16_t ogg_int16_t;
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    64
   typedef int32_t ogg_int32_t;
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    65
   typedef u_int32_t ogg_uint32_t;
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    66
   typedef int64_t ogg_int64_t;
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    67
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    68
#elif defined(__BEOS__)
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    69
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    70
   /* Be */
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    71
#  include <inttypes.h>
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    72
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    73
#elif defined (__EMX__)
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    74
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    75
   /* OS/2 GCC */
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    76
   typedef short ogg_int16_t;
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    77
   typedef int ogg_int32_t;
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    78
   typedef unsigned int ogg_uint32_t;
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    79
   typedef long long ogg_int64_t;
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    80
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    81
#else
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    82
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    83
#  include <sys/types.h>
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    84
#  include "config_types.h"
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    85
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    86
#endif
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    87
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    88
#endif  /* _OS_TYPES_H */