diff options
author | Ralph Giles <giles@xiph.org> | 2004-03-14 17:26:27 +0000 |
---|---|---|
committer | Ralph Giles <giles@xiph.org> | 2004-03-14 17:26:27 +0000 |
commit | edd9f25b5fe279f2a2664317a238ee6c1d5c46ac (patch) | |
tree | 5df237150504cfd5e49f5687a3a928c0df2c81a9 /include/ogg/os_types.h | |
parent | 3535689473cf09d4e3ea5fb00c86dafe265cfe02 (diff) | |
download | ogg-edd9f25b5fe279f2a2664317a238ee6c1d5c46ac.tar.gz |
Add platform-specific int types for MingW32. After a patch from John Edwards.
Jan posted a different patch:
http://www.xiph.org/archives/vorbis-dev/200402/0039.html
Most everyone (but MSVC) ships stdint types in either stdint.h or inttypes.h these days, but there
can be some tricky collisions with older installations, so I'd rather avoid a new portability
refinement tail this close to release.
git-svn-id: http://svn.xiph.org/trunk/ogg@5948 0101bb08-14d6-0310-b084-bc0e0c8e3800
Diffstat (limited to 'include/ogg/os_types.h')
-rw-r--r-- | include/ogg/os_types.h | 40 |
1 files changed, 23 insertions, 17 deletions
diff --git a/include/ogg/os_types.h b/include/ogg/os_types.h index 92ccb4b..93e9cfd 100644 --- a/include/ogg/os_types.h +++ b/include/ogg/os_types.h @@ -11,7 +11,7 @@ ******************************************************************** function: #ifdef jail to whip a few platforms into the UNIX ideal. - last mod: $Id: os_types.h,v 1.14 2003/09/02 05:09:14 xiphmont Exp $ + last mod: $Id: os_types.h,v 1.15 2004/03/14 17:26:27 giles Exp $ ********************************************************************/ #ifndef _OS_TYPES_H @@ -24,23 +24,29 @@ #define _ogg_realloc realloc #define _ogg_free free -#ifdef _WIN32 - -# ifndef __GNUC__ - /* MSVC/Borland */ - typedef __int64 ogg_int64_t; - typedef __int32 ogg_int32_t; - typedef unsigned __int32 ogg_uint32_t; - typedef __int16 ogg_int16_t; - typedef unsigned __int16 ogg_uint16_t; +#if defined(_WIN32) + +# if defined(__CYGWIN__) +# include <_G_config.h> + typedef _G_int64_t ogg_int64_t; + typedef _G_int32_t ogg_int32_t; + typedef _G_uint32_t ogg_uint32_t; + typedef _G_int16_t ogg_int16_t; + typedef _G_uint16_t ogg_uint16_t; +# if defined(__MINGW32__) + typedef short ogg_int16_t; + typedef unsigned short ogg_uint16_t; + typedef int ogg_int32_t; + typedef unsigned int ogg_uint32_t; + typedef long long ogg_int64_t; + typedef unsigned long long ogg_uint64_t; # else - /* Cygwin */ - #include <_G_config.h> - typedef _G_int64_t ogg_int64_t; - typedef _G_int32_t ogg_int32_t; - typedef _G_uint32_t ogg_uint32_t; - typedef _G_int16_t ogg_int16_t; - typedef _G_uint16_t ogg_uint16_t; + /* MSVC/Borland */ + typedef __int64 ogg_int64_t; + typedef __int32 ogg_int32_t; + typedef unsigned __int32 ogg_uint32_t; + typedef __int16 ogg_int16_t; + typedef unsigned __int16 ogg_uint16_t; # endif #elif defined(__MACOS__) |