Index: include/FLAC/ordinals.h |
diff --git a/include/FLAC/ordinals.h b/include/FLAC/ordinals.h |
index a7a5cd96135929ad078755f16d8f4d16a9d3f386..b1e1acfce1a9d681c6dec22263852e11de83a673 100644 |
--- a/include/FLAC/ordinals.h |
+++ b/include/FLAC/ordinals.h |
@@ -1,5 +1,6 @@ |
/* libFLAC - Free Lossless Audio Codec library |
- * Copyright (C) 2000,2001,2002,2003,2004,2005,2006,2007 Josh Coalson |
+ * Copyright (C) 2000-2009 Josh Coalson |
+ * Copyright (C) 2011-2014 Xiph.Org Foundation |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
@@ -32,40 +33,45 @@ |
#ifndef FLAC__ORDINALS_H |
#define FLAC__ORDINALS_H |
-#if !(defined(_MSC_VER) || defined(__BORLANDC__) || defined(__EMX__)) |
-#include <inttypes.h> |
-#endif |
+#if defined(_MSC_VER) && _MSC_VER < 1600 |
+ |
+/* Microsoft Visual Studio earlier than the 2010 version did not provide |
+ * the 1999 ISO C Standard header file <stdint.h>. |
+ */ |
-typedef signed char FLAC__int8; |
-typedef unsigned char FLAC__uint8; |
+typedef __int8 FLAC__int8; |
+typedef unsigned __int8 FLAC__uint8; |
-#if defined(_MSC_VER) || defined(__BORLANDC__) |
typedef __int16 FLAC__int16; |
typedef __int32 FLAC__int32; |
typedef __int64 FLAC__int64; |
typedef unsigned __int16 FLAC__uint16; |
typedef unsigned __int32 FLAC__uint32; |
typedef unsigned __int64 FLAC__uint64; |
-#elif defined(__EMX__) |
-typedef short FLAC__int16; |
-typedef long FLAC__int32; |
-typedef long long FLAC__int64; |
-typedef unsigned short FLAC__uint16; |
-typedef unsigned long FLAC__uint32; |
-typedef unsigned long long FLAC__uint64; |
+ |
#else |
+ |
+/* For MSVC 2010 and everything else which provides <stdint.h>. */ |
+ |
+#include <stdint.h> |
+ |
+typedef int8_t FLAC__int8; |
+typedef uint8_t FLAC__uint8; |
+ |
typedef int16_t FLAC__int16; |
typedef int32_t FLAC__int32; |
typedef int64_t FLAC__int64; |
typedef uint16_t FLAC__uint16; |
typedef uint32_t FLAC__uint32; |
typedef uint64_t FLAC__uint64; |
+ |
#endif |
typedef int FLAC__bool; |
typedef FLAC__uint8 FLAC__byte; |
+ |
#ifdef true |
#undef true |
#endif |