VisualC/vorbis/include/ogg/os_types.h
author Sam Lantinga <slouken@libsdl.org>
Tue, 18 Jan 2011 11:11:21 -0800
changeset 495 b4d178cd982d
child 532 b8e8ae4852b2
permissions -rwxr-xr-x
Updated version to 1.2.12
slouken@495
     1
/********************************************************************
slouken@495
     2
 *                                                                  *
slouken@495
     3
 * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE.   *
slouken@495
     4
 * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *
slouken@495
     5
 * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
slouken@495
     6
 * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
slouken@495
     7
 *                                                                  *
slouken@495
     8
 * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2002             *
slouken@495
     9
 * by the Xiph.Org Foundation http://www.xiph.org/                  *
slouken@495
    10
 *                                                                  *
slouken@495
    11
 ********************************************************************
slouken@495
    12
slouken@495
    13
 function: #ifdef jail to whip a few platforms into the UNIX ideal.
slouken@495
    14
 last mod: $Id: os_types.h 14997 2008-06-04 03:27:18Z ivo $
slouken@495
    15
slouken@495
    16
 ********************************************************************/
slouken@495
    17
#ifndef _OS_TYPES_H
slouken@495
    18
#define _OS_TYPES_H
slouken@495
    19
slouken@495
    20
/* make it easy on the folks that want to compile the libs with a
slouken@495
    21
   different malloc than stdlib */
slouken@495
    22
#define _ogg_malloc  malloc
slouken@495
    23
#define _ogg_calloc  calloc
slouken@495
    24
#define _ogg_realloc realloc
slouken@495
    25
#define _ogg_free    free
slouken@495
    26
slouken@495
    27
#if defined(_WIN32) 
slouken@495
    28
slouken@495
    29
#  if defined(__CYGWIN__)
slouken@495
    30
#    include <stdint.h>
slouken@495
    31
     typedef int16_t ogg_int16_t;
slouken@495
    32
     typedef uint16_t ogg_uint16_t;
slouken@495
    33
     typedef int32_t ogg_int32_t;
slouken@495
    34
     typedef uint32_t ogg_uint32_t;
slouken@495
    35
     typedef int64_t ogg_int64_t;
slouken@495
    36
     typedef uint64_t ogg_uint64_t;
slouken@495
    37
#  elif defined(__MINGW32__)
slouken@495
    38
#    include <sys/types.h>
slouken@495
    39
     typedef short ogg_int16_t;
slouken@495
    40
     typedef unsigned short ogg_uint16_t;
slouken@495
    41
     typedef int ogg_int32_t;
slouken@495
    42
     typedef unsigned int ogg_uint32_t;
slouken@495
    43
     typedef long long ogg_int64_t;
slouken@495
    44
     typedef unsigned long long ogg_uint64_t;
slouken@495
    45
#  elif defined(__MWERKS__)
slouken@495
    46
     typedef long long ogg_int64_t;
slouken@495
    47
     typedef int ogg_int32_t;
slouken@495
    48
     typedef unsigned int ogg_uint32_t;
slouken@495
    49
     typedef short ogg_int16_t;
slouken@495
    50
     typedef unsigned short ogg_uint16_t;
slouken@495
    51
#  else
slouken@495
    52
     /* MSVC/Borland */
slouken@495
    53
     typedef __int64 ogg_int64_t;
slouken@495
    54
     typedef __int32 ogg_int32_t;
slouken@495
    55
     typedef unsigned __int32 ogg_uint32_t;
slouken@495
    56
     typedef __int16 ogg_int16_t;
slouken@495
    57
     typedef unsigned __int16 ogg_uint16_t;
slouken@495
    58
#  endif
slouken@495
    59
slouken@495
    60
#elif defined(__MACOS__)
slouken@495
    61
slouken@495
    62
#  include <sys/types.h>
slouken@495
    63
   typedef SInt16 ogg_int16_t;
slouken@495
    64
   typedef UInt16 ogg_uint16_t;
slouken@495
    65
   typedef SInt32 ogg_int32_t;
slouken@495
    66
   typedef UInt32 ogg_uint32_t;
slouken@495
    67
   typedef SInt64 ogg_int64_t;
slouken@495
    68
slouken@495
    69
#elif (defined(__APPLE__) && defined(__MACH__)) /* MacOS X Framework build */
slouken@495
    70
slouken@495
    71
#  include <sys/types.h>
slouken@495
    72
   typedef int16_t ogg_int16_t;
slouken@495
    73
   typedef u_int16_t ogg_uint16_t;
slouken@495
    74
   typedef int32_t ogg_int32_t;
slouken@495
    75
   typedef u_int32_t ogg_uint32_t;
slouken@495
    76
   typedef int64_t ogg_int64_t;
slouken@495
    77
slouken@495
    78
#elif defined(__HAIKU__)
slouken@495
    79
slouken@495
    80
  /* Haiku */
slouken@495
    81
#  include <sys/types.h>
slouken@495
    82
   typedef short ogg_int16_t;
slouken@495
    83
   typedef unsigned short ogg_uint16_t;
slouken@495
    84
   typedef int ogg_int32_t;
slouken@495
    85
   typedef unsigned int ogg_uint32_t;
slouken@495
    86
   typedef long long ogg_int64_t;
slouken@495
    87
slouken@495
    88
#elif defined(__BEOS__)
slouken@495
    89
slouken@495
    90
   /* Be */
slouken@495
    91
#  include <inttypes.h>
slouken@495
    92
   typedef int16_t ogg_int16_t;
slouken@495
    93
   typedef u_int16_t ogg_uint16_t;
slouken@495
    94
   typedef int32_t ogg_int32_t;
slouken@495
    95
   typedef u_int32_t ogg_uint32_t;
slouken@495
    96
   typedef int64_t ogg_int64_t;
slouken@495
    97
slouken@495
    98
#elif defined (__EMX__)
slouken@495
    99
slouken@495
   100
   /* OS/2 GCC */
slouken@495
   101
   typedef short ogg_int16_t;
slouken@495
   102
   typedef unsigned short ogg_uint16_t;
slouken@495
   103
   typedef int ogg_int32_t;
slouken@495
   104
   typedef unsigned int ogg_uint32_t;
slouken@495
   105
   typedef long long ogg_int64_t;
slouken@495
   106
slouken@495
   107
#elif defined (DJGPP)
slouken@495
   108
slouken@495
   109
   /* DJGPP */
slouken@495
   110
   typedef short ogg_int16_t;
slouken@495
   111
   typedef int ogg_int32_t;
slouken@495
   112
   typedef unsigned int ogg_uint32_t;
slouken@495
   113
   typedef long long ogg_int64_t;
slouken@495
   114
slouken@495
   115
#elif defined(R5900)
slouken@495
   116
slouken@495
   117
   /* PS2 EE */
slouken@495
   118
   typedef long ogg_int64_t;
slouken@495
   119
   typedef int ogg_int32_t;
slouken@495
   120
   typedef unsigned ogg_uint32_t;
slouken@495
   121
   typedef short ogg_int16_t;
slouken@495
   122
slouken@495
   123
#elif defined(__SYMBIAN32__)
slouken@495
   124
slouken@495
   125
   /* Symbian GCC */
slouken@495
   126
   typedef signed short ogg_int16_t;
slouken@495
   127
   typedef unsigned short ogg_uint16_t;
slouken@495
   128
   typedef signed int ogg_int32_t;
slouken@495
   129
   typedef unsigned int ogg_uint32_t;
slouken@495
   130
   typedef long long int ogg_int64_t;
slouken@495
   131
slouken@495
   132
#else
slouken@495
   133
slouken@495
   134
#  include <sys/types.h>
slouken@495
   135
#  include <ogg/config_types.h>
slouken@495
   136
slouken@495
   137
#endif
slouken@495
   138
slouken@495
   139
#endif  /* _OS_TYPES_H */