From 15fe47a80f7b0200c7654464ac04d002b8eb6bc3 Mon Sep 17 00:00:00 2001 From: stopiccot Date: Sat, 16 May 2015 16:00:45 +0300 Subject: Use stdint.h for Visual Studio 2013 and newer Signed-off-by: Erik de Castro Lopo --- include/ogg/os_types.h | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) (limited to 'include') diff --git a/include/ogg/os_types.h b/include/ogg/os_types.h index 446ca32..af44058 100644 --- a/include/ogg/os_types.h +++ b/include/ogg/os_types.h @@ -49,12 +49,22 @@ typedef short ogg_int16_t; typedef unsigned short ogg_uint16_t; # else - /* 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(_MSC_VER) && (_MSC_VER >= 1800) /* MSVC 2013 and newer */ +# include + typedef int16_t ogg_int16_t; + typedef uint16_t ogg_uint16_t; + typedef int32_t ogg_int32_t; + typedef uint32_t ogg_uint32_t; + typedef int64_t ogg_int64_t; + typedef uint64_t ogg_uint64_t; +# else + /* 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 # endif #elif defined(__MACOS__) -- cgit v1.2.1