From ffbe0a853d5e7defa85d0eef53814c22d1ecb412 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Tue, 3 Nov 2009 10:52:45 -0500 Subject: [PATCH] More MSVC fixes from Jonathan Kew --- src/hb-common.h | 7 ++++++- src/hb-private.h | 5 +++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/hb-common.h b/src/hb-common.h index 1275b8c..4411ed5 100644 --- a/src/hb-common.h +++ b/src/hb-common.h @@ -28,13 +28,18 @@ #define HB_COMMON_H #ifdef _MSC_VER -#warning "Not using stdint.h. Integer types may have wrong size." +#define __STR2__(x) #x +#define __STR1__(x) __STR2__(x) +#define __LOC__ __FILE__ "("__STR1__(__LINE__)") : Warning Msg: " +#pragma message(__LOC__"Not using stdint.h; integer types may have wrong size") typedef signed char int8_t; typedef unsigned char uint8_t; typedef signed short int16_t; typedef unsigned short uint16_t; typedef signed int int32_t; typedef unsigned int uint32_t; +typedef signed long long int64_t; +typedef unsigned long long uint64_t; #ifndef __cplusplus #define inline __inline #endif diff --git a/src/hb-private.h b/src/hb-private.h index fcebe56..61bd972 100644 --- a/src/hb-private.h +++ b/src/hb-private.h @@ -66,7 +66,12 @@ typedef GStaticMutex hb_mutex_t; #define hb_mutex_unlock(M) g_static_mutex_unlock (&M) #else + +#ifdef _MSC_VER +#pragma message(__LOC__"Could not find any system to define platform macros, library will NOT be thread-safe") +#else #warning "Could not find any system to define platform macros, library will NOT be thread-safe" +#endif typedef int hb_atomic_int_t; #define hb_atomic_int_fetch_and_add(AI, V) ((AI) += (V), (AI) - (V)) -- 2.7.4