More MSVC fixes from Jonathan Kew
authorBehdad Esfahbod <behdad@behdad.org>
Tue, 3 Nov 2009 15:52:45 +0000 (10:52 -0500)
committerBehdad Esfahbod <behdad@behdad.org>
Tue, 3 Nov 2009 15:52:45 +0000 (10:52 -0500)
src/hb-common.h
src/hb-private.h

index 1275b8c..4411ed5 100644 (file)
 #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
index fcebe56..61bd972 100644 (file)
@@ -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))