From: Tsuda Kageyu Date: Tue, 8 Oct 2013 10:55:44 +0000 (+0900) Subject: Workaround for when MSVC doesn't have wchar_t as a built-in type X-Git-Tag: v1.9.1~6^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=873df184fea239b382376950c5e4e337ed4c336a;p=taglib Workaround for when MSVC doesn't have wchar_t as a built-in type --- diff --git a/taglib/toolkit/unicode.h b/taglib/toolkit/unicode.h index b9de0ea2..ebf1915d 100644 --- a/taglib/toolkit/unicode.h +++ b/taglib/toolkit/unicode.h @@ -106,6 +106,11 @@ bit mask & shift operations. ------------------------------------------------------------------------ */ +// Workaround for when MSVC doesn't have wchar_t as a built-in type. +#if defined(_MSC_VER) && !defined(_WCHAR_T_DEFINED) +# include +#endif + /* Some fundamental constants */ #define UNI_REPLACEMENT_CHAR (UTF32)0x0000FFFD #define UNI_MAX_BMP (UTF32)0x0000FFFF @@ -114,10 +119,10 @@ namespace Unicode { -typedef unsigned long UTF32; /* at least 32 bits */ -typedef wchar_t UTF16; /* TagLib assumes that wchar_t is sufficient for UTF-16. */ +typedef unsigned long UTF32; /* at least 32 bits */ +typedef wchar_t UTF16; /* TagLib assumes that wchar_t is sufficient for UTF-16. */ typedef unsigned char UTF8; /* typically 8 bits */ -typedef unsigned char Boolean; /* 0 or 1 */ +typedef unsigned char Boolean; /* 0 or 1 */ typedef enum { conversionOK = 0, /* conversion successful */