From ee0fe29c0f10877dfb147ace6036c66a0d2e3786 Mon Sep 17 00:00:00 2001 From: Ralph Giles Date: Sun, 14 Mar 2004 17:26:27 +0000 Subject: 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. svn path=/trunk/ogg/; revision=5948 --- include/ogg/os_types.h | 40 +++++++++++++++++++++++----------------- 1 file changed, 23 insertions(+), 17 deletions(-) (limited to 'include') 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__) -- cgit v1.2.1