Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

os_types.h

Go to the documentation of this file.
00001 /********************************************************************
00002  *                                                                  *
00003  * THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE.   *
00004  *                                                                  *
00005  * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *
00006  * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
00007  * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
00008  *                                                                  *
00009  * THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2002    *
00010  * BY THE Xiph.Org FOUNDATION http://www.xiph.org/                  *
00011  *                                                                  *
00012  ********************************************************************
00013 
00014  function: #ifdef jail to whip a few platforms into the UNIX ideal.
00015 
00016  ********************************************************************/
00017 #ifndef _OS_TYPES_H
00018 #define _OS_TYPES_H
00019 
00020 #ifdef _LOW_ACCURACY_
00021 #  define X(n) (((((n)>>22)+1)>>1) - ((((n)>>22)+1)>>9))
00022 #  define LOOKUP_T const unsigned char
00023 #else
00024 #  define X(n) (n)
00025 #  define LOOKUP_T const ogg_int32_t
00026 #endif
00027 
00028 /* make it easy on the folks that want to compile the libs with a
00029    different malloc than stdlib */
00030 #define _ogg_malloc  malloc
00031 #define _ogg_calloc  calloc
00032 #define _ogg_realloc realloc
00033 #define _ogg_free    free
00034 
00035 #ifdef _WIN32 
00036 
00037 #  ifndef __GNUC__
00038    /* MSVC/Borland */
00039    typedef __int64 ogg_int64_t;
00040    typedef __int32 ogg_int32_t;
00041    typedef unsigned __int32 ogg_uint32_t;
00042    typedef __int16 ogg_int16_t;
00043 #  else
00044    /* Cygwin */
00045    #include <_G_config.h>
00046    typedef _G_int64_t ogg_int64_t;
00047    typedef _G_int32_t ogg_int32_t;
00048    typedef _G_uint32_t ogg_uint32_t;
00049    typedef _G_int16_t ogg_int16_t;
00050 #  endif
00051 
00052 #elif defined(__MACOS__)
00053 
00054 #  include <sys/types.h>
00055    typedef SInt16 ogg_int16_t;
00056    typedef SInt32 ogg_int32_t;
00057    typedef UInt32 ogg_uint32_t;
00058    typedef SInt64 ogg_int64_t;
00059 
00060 #elif defined(__MACOSX__) /* MacOS X Framework build */
00061 
00062 #  include <sys/types.h>
00063    typedef int16_t ogg_int16_t;
00064    typedef int32_t ogg_int32_t;
00065    typedef u_int32_t ogg_uint32_t;
00066    typedef int64_t ogg_int64_t;
00067 
00068 #elif defined(__BEOS__)
00069 
00070    /* Be */
00071 #  include <inttypes.h>
00072 
00073 #elif defined (__EMX__)
00074 
00075    /* OS/2 GCC */
00076    typedef short ogg_int16_t;
00077    typedef int ogg_int32_t;
00078    typedef unsigned int ogg_uint32_t;
00079    typedef long long ogg_int64_t;
00080 
00081 #else
00082 
00083 #  include <sys/types.h>
00084 #  include "config_types.h"
00085 
00086 #endif
00087 
00088 #endif  /* _OS_TYPES_H */

Generated on Sat Nov 5 16:15:44 2005 for OPIE by  doxygen 1.4.2