[HarfBuzz] harfbuzz-ng: Branch 'master'
Behdad Esfahbod
behdad at kemper.freedesktop.org
Thu Jul 26 13:15:11 PDT 2012
src/hb-old/harfbuzz-global.h | 17 +++++++++++------
src/hb-old/harfbuzz-impl.h | 6 +++++-
2 files changed, 16 insertions(+), 7 deletions(-)
New commits:
commit fa2dfcd560444d8c54b6349ee106134d3536f79b
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Thu Jul 26 16:06:16 2012 -0400
Fix visibility warnings with MinGW32
diff --git a/src/hb-old/harfbuzz-global.h b/src/hb-old/harfbuzz-global.h
index c0f54d6..9ba5841 100644
--- a/src/hb-old/harfbuzz-global.h
+++ b/src/hb-old/harfbuzz-global.h
@@ -31,14 +31,19 @@
#include <stdlib.h>
#include <string.h>
-#define HB_BEGIN_VISIBILITY _Pragma ("GCC visibility push(hidden)")
-#define HB_END_VISIBILITY _Pragma ("GCC visibility pop")
+#if defined(__GNUC__) && (__GNUC__ >= 4) && !defined(__MINGW32__)
+# define HB_BEGIN_VISIBILITY _Pragma ("GCC visibility push(hidden)")
+# define HB_END_VISIBILITY _Pragma ("GCC visibility pop")
+#else
+# define HB_BEGIN_VISIBILITY
+# define HB_END_VISIBILITY
+#endif
#ifdef __cplusplus
-#define HB_BEGIN_HEADER extern "C" { HB_BEGIN_VISIBILITY
-#define HB_END_HEADER HB_END_VISIBILITY }
+# define HB_BEGIN_HEADER extern "C" { HB_BEGIN_VISIBILITY
+# define HB_END_HEADER HB_END_VISIBILITY }
#else
-#define HB_BEGIN_HEADER HB_BEGIN_VISIBILITY
-#define HB_END_HEADER HB_END_VISIBILITY
+# define HB_BEGIN_HEADER HB_BEGIN_VISIBILITY
+# define HB_END_HEADER HB_END_VISIBILITY
#endif
HB_BEGIN_HEADER
diff --git a/src/hb-old/harfbuzz-impl.h b/src/hb-old/harfbuzz-impl.h
index 01865ca..3f370b6 100644
--- a/src/hb-old/harfbuzz-impl.h
+++ b/src/hb-old/harfbuzz-impl.h
@@ -33,7 +33,11 @@
HB_BEGIN_HEADER
#ifndef HB_INTERNAL
-# define HB_INTERNAL __attribute__((visibility("hidden")))
+# ifndef __MINGW32__
+# define HB_INTERNAL __attribute__((__visibility__("hidden")))
+# else
+# define HB_INTERNAL
+# endif
#endif
#ifndef NULL
More information about the HarfBuzz
mailing list