Main Page | Class List | Directories | File List | Class Members | File Members

os_types.h

Go to the documentation of this file.
00001 /********************************************************************
00002  *                                                                  *
00003  * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE.   *
00004  * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *
00005  * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
00006  * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
00007  *                                                                  *
00008  * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2002             *
00009  * by the Xiph.Org Foundation http://www.xiph.org/                  *
00010  *                                                                  *
00011  ********************************************************************
00012 
00013  function: #ifdef jail to whip a few platforms into the UNIX ideal.
00014  last mod: $Id: os_types.h 7524 2004-08-11 04:20:36Z conrad $
00015 
00016  ********************************************************************/
00017 #ifndef _OS_TYPES_H
00018 #define _OS_TYPES_H
00019 
00020 /* make it easy on the folks that want to compile the libs with a
00021    different malloc than stdlib */
00022 #define _ogg_malloc  malloc
00023 #define _ogg_calloc  calloc
00024 #define _ogg_realloc realloc
00025 #define _ogg_free    free
00026 
00027 #if defined(_WIN32) 
00028 
00029 #  if defined(__CYGWIN__)
00030 #    include <_G_config.h>
00031      typedef _G_int64_t ogg_int64_t;
00032      typedef _G_int32_t ogg_int32_t;
00033      typedef _G_uint32_t ogg_uint32_t;
00034      typedef _G_int16_t ogg_int16_t;
00035      typedef _G_uint16_t ogg_uint16_t;
00036 #  elif defined(__MINGW32__)
00037      typedef short ogg_int16_t;                                                                             
00038      typedef unsigned short ogg_uint16_t;                                                                   
00039      typedef int ogg_int32_t;                                                                               
00040      typedef unsigned int ogg_uint32_t;                                                                     
00041      typedef long long ogg_int64_t;                                                                         
00042      typedef unsigned long long ogg_uint64_t;  
00043 #  elif defined(__MWERKS__)
00044      typedef long long ogg_int64_t;
00045      typedef int ogg_int32_t;
00046      typedef unsigned int ogg_uint32_t;
00047      typedef short ogg_int16_t;
00048      typedef unsigned short ogg_uint16_t;
00049 #  else
00050      /* MSVC/Borland */
00051      typedef __int64 ogg_int64_t;
00052      typedef __int32 ogg_int32_t;
00053      typedef unsigned __int32 ogg_uint32_t;
00054      typedef __int16 ogg_int16_t;
00055      typedef unsigned __int16 ogg_uint16_t;
00056 #  endif
00057 
00058 #elif defined(__MACOS__)
00059 
00060 #  include <sys/types.h>
00061    typedef SInt16 ogg_int16_t;
00062    typedef UInt16 ogg_uint16_t;
00063    typedef SInt32 ogg_int32_t;
00064    typedef UInt32 ogg_uint32_t;
00065    typedef SInt64 ogg_int64_t;
00066 
00067 #elif defined(__MACOSX__) /* MacOS X Framework build */
00068 
00069 #  include <sys/types.h>
00070    typedef int16_t ogg_int16_t;
00071    typedef u_int16_t ogg_uint16_t;
00072    typedef int32_t ogg_int32_t;
00073    typedef u_int32_t ogg_uint32_t;
00074    typedef int64_t ogg_int64_t;
00075 
00076 #elif defined(__BEOS__)
00077 
00078    /* Be */
00079 #  include <inttypes.h>
00080    typedef int16_t ogg_int16_t;
00081    typedef u_int16_t ogg_uint16_t;
00082    typedef int32_t ogg_int32_t;
00083    typedef u_int32_t ogg_uint32_t;
00084    typedef int64_t ogg_int64_t;
00085 
00086 #elif defined (__EMX__)
00087 
00088    /* OS/2 GCC */
00089    typedef short ogg_int16_t;
00090    typedef unsigned short ogg_uint16_t;
00091    typedef int ogg_int32_t;
00092    typedef unsigned int ogg_uint32_t;
00093    typedef long long ogg_int64_t;
00094 
00095 #elif defined (DJGPP)
00096 
00097    /* DJGPP */
00098    typedef short ogg_int16_t;
00099    typedef int ogg_int32_t;
00100    typedef unsigned int ogg_uint32_t;
00101    typedef long long ogg_int64_t;
00102 
00103 #elif defined(R5900)
00104 
00105    /* PS2 EE */
00106    typedef long ogg_int64_t;
00107    typedef int ogg_int32_t;
00108    typedef unsigned ogg_uint32_t;
00109    typedef short ogg_int16_t;
00110 
00111 #elif defined(__SYMBIAN32__)
00112 
00113    /* Symbian GCC */
00114    typedef signed short ogg_int16_t;
00115    typedef unsigned short ogg_uint16_t;
00116    typedef signed int ogg_int32_t;
00117    typedef unsigned int ogg_uint32_t;
00118    typedef long long int ogg_int64_t;
00119 
00120 #else
00121 
00122 #  include <sys/types.h>
00123 #  include <ogg/config_types.h>
00124 
00125 #endif
00126 
00127 #endif  /* _OS_TYPES_H */

© sourcejam.com 2005-2008