Fix pragma usage
authorBehdad Esfahbod <behdad@behdad.org>
Sun, 5 Jul 2015 21:43:17 +0000 (22:43 +0100)
committerBehdad Esfahbod <behdad@behdad.org>
Sun, 5 Jul 2015 21:43:17 +0000 (22:43 +0100)
https://bugs.freedesktop.org/show_bug.cgi?id=91228

Commit cdcdfe61b97a0a48ccf834b6d924d187da9609be changed two `#pragma
message` to `#pragma error` in hb-unicode.cc, however MSVC uses #error,
just like the #else branch. `#pragma error` is an unknown pragma so
MSVC does not fail the build because of it, which I believe was the
intention of that commit.

If it's meant to be an #error, then the #ifdef for _MSC_VER can be
removed entirely.

src/hb-unicode.cc
src/hb-warning.cc

index cf2032f..6b32faf 100644 (file)
@@ -146,14 +146,9 @@ hb_unicode_funcs_get_default (void)
 }
 
 #if !defined(HB_NO_UNICODE_FUNCS) && defined(HB_UNICODE_FUNCS_NIL)
-#ifdef _MSC_VER
-#pragma error("Could not find any Unicode functions implementation, you have to provide your own.")
-#pragma error("Consider building hb-ucdn.c.  If you absolutely want to build without any, check the code.")
-#else
 #error "Could not find any Unicode functions implementation, you have to provide your own"
 #error "Consider building hb-ucdn.c.  If you absolutely want to build without any, check the code."
 #endif
-#endif
 
 /**
  * hb_unicode_funcs_create: (Xconstructor)
index e69fff2..8f322bc 100644 (file)
 
 
 #if defined(HB_ATOMIC_INT_NIL)
-#ifdef _MSC_VER
-#pragma error("Could not find any system to define atomic_int macros, library WILL NOT be thread-safe")
-#pragma error("Check hb-atomic-private.hh for possible resolutions.")
-#else
 #error "Could not find any system to define atomic_int macros, library WILL NOT be thread-safe"
 #error "Check hb-atomic-private.hh for possible resolutions."
 #endif
-#endif
 
 #if defined(HB_MUTEX_IMPL_NIL)
-#ifdef _MSC_VER
-#pragma error("Could not find any system to define mutex macros, library WILL NOT be thread-safe")
-#pragma error("Check hb-mutex-private.hh for possible resolutions.")
-#else
 #error "Could not find any system to define mutex macros, library WILL NOT be thread-safe"
 #error "Check hb-mutex-private.hh for possible resolutions."
 #endif
-#endif