diff --git a/src/hb-common.h b/src/hb-common.h index 9040f5043..e34df025f 100644 --- a/src/hb-common.h +++ b/src/hb-common.h @@ -49,6 +49,16 @@ # include #elif defined (_AIX) # include +#elif defined (_MSC_VER) && _MSC_VER < 1600 +/* VS 2010 (_MSC_VER 1600) has stdint.h */ +typedef __int8 int8_t; +typedef unsigned __int8 uint8_t; +typedef __int16 int16_t; +typedef unsigned __int16 uint16_t; +typedef __int32 int32_t; +typedef unsigned __int32 uint32_t; +typedef __int64 int64_t; +typedef unsigned __int64 uint64_t; #else # include #endif diff --git a/src/hb-private.hh b/src/hb-private.hh index 3181eb578..7e6d8e510 100644 --- a/src/hb-private.hh +++ b/src/hb-private.hh @@ -51,7 +51,7 @@ #include #include -#if defined(_MSC_VER) || defined(__MINGW32__) +#if (defined(_MSC_VER) && _MSC_VER >= 1500) || defined(__MINGW32__) #include #endif @@ -381,7 +381,7 @@ _hb_bit_storage (T v) return sizeof (unsigned long long) * 8 - __builtin_clzll (v); #endif -#if defined(_MSC_VER) || defined(__MINGW32__) +#if (defined(_MSC_VER) && _MSC_VER >= 1500) || defined(__MINGW32__) if (sizeof (T) <= sizeof (unsigned int)) { unsigned long where; @@ -454,7 +454,7 @@ _hb_ctz (T v) return __builtin_ctzll (v); #endif -#if defined(_MSC_VER) || defined(__MINGW32__) +#if (defined(_MSC_VER) && _MSC_VER >= 1500) || defined(__MINGW32__) if (sizeof (T) <= sizeof (unsigned int)) { unsigned long where; diff --git a/src/hb-ucdn/ucdn.h b/src/hb-ucdn/ucdn.h index 2d5fc3591..9b0f9d4cd 100644 --- a/src/hb-ucdn/ucdn.h +++ b/src/hb-ucdn/ucdn.h @@ -42,6 +42,16 @@ HB_BEGIN_HEADER # include #elif defined (_AIX) # include +#elif defined (_MSC_VER) && _MSC_VER < 1600 +/* VS 2010 (_MSC_VER 1600) has stdint.h */ +typedef __int8 int8_t; +typedef unsigned __int8 uint8_t; +typedef __int16 int16_t; +typedef unsigned __int16 uint16_t; +typedef __int32 int32_t; +typedef unsigned __int32 uint32_t; +typedef __int64 int64_t; +typedef unsigned __int64 uint64_t; #else # include #endif