From 0bcbe88cf313117f739b98a11dbe698b75784e9d Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Tue, 24 Jul 2012 19:38:24 -0400 Subject: [PATCH] [hb-old] Add visibility attributes --- src/hb-old/harfbuzz-global.h | 10 ++++++---- src/hb-old/harfbuzz-impl.h | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/hb-old/harfbuzz-global.h b/src/hb-old/harfbuzz-global.h index d4e6b466b..c0f54d6e1 100644 --- a/src/hb-old/harfbuzz-global.h +++ b/src/hb-old/harfbuzz-global.h @@ -31,12 +31,14 @@ #include #include +#define HB_BEGIN_VISIBILITY _Pragma ("GCC visibility push(hidden)") +#define HB_END_VISIBILITY _Pragma ("GCC visibility pop") #ifdef __cplusplus -#define HB_BEGIN_HEADER extern "C" { -#define HB_END_HEADER } +#define HB_BEGIN_HEADER extern "C" { HB_BEGIN_VISIBILITY +#define HB_END_HEADER HB_END_VISIBILITY } #else -#define HB_BEGIN_HEADER /* nothing */ -#define HB_END_HEADER /* nothing */ +#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 5f430498c..01865cae8 100644 --- a/src/hb-old/harfbuzz-impl.h +++ b/src/hb-old/harfbuzz-impl.h @@ -33,7 +33,7 @@ HB_BEGIN_HEADER #ifndef HB_INTERNAL -# define HB_INTERNAL +# define HB_INTERNAL __attribute__((visibility("hidden"))) #endif #ifndef NULL