Fix visibility warnings with MinGW32
This commit is contained in:
parent
ac2085d4b3
commit
fa2dfcd560
|
@ -31,14 +31,19 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#define HB_BEGIN_VISIBILITY _Pragma ("GCC visibility push(hidden)")
|
#if defined(__GNUC__) && (__GNUC__ >= 4) && !defined(__MINGW32__)
|
||||||
#define HB_END_VISIBILITY _Pragma ("GCC visibility pop")
|
# define HB_BEGIN_VISIBILITY _Pragma ("GCC visibility push(hidden)")
|
||||||
#ifdef __cplusplus
|
# define HB_END_VISIBILITY _Pragma ("GCC visibility pop")
|
||||||
#define HB_BEGIN_HEADER extern "C" { HB_BEGIN_VISIBILITY
|
|
||||||
#define HB_END_HEADER HB_END_VISIBILITY }
|
|
||||||
#else
|
#else
|
||||||
#define HB_BEGIN_HEADER HB_BEGIN_VISIBILITY
|
# define HB_BEGIN_VISIBILITY
|
||||||
#define HB_END_HEADER HB_END_VISIBILITY
|
# define HB_END_VISIBILITY
|
||||||
|
#endif
|
||||||
|
#ifdef __cplusplus
|
||||||
|
# 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
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
HB_BEGIN_HEADER
|
HB_BEGIN_HEADER
|
||||||
|
|
|
@ -33,7 +33,11 @@
|
||||||
HB_BEGIN_HEADER
|
HB_BEGIN_HEADER
|
||||||
|
|
||||||
#ifndef HB_INTERNAL
|
#ifndef HB_INTERNAL
|
||||||
# define HB_INTERNAL __attribute__((visibility("hidden")))
|
# ifndef __MINGW32__
|
||||||
|
# define HB_INTERNAL __attribute__((__visibility__("hidden")))
|
||||||
|
# else
|
||||||
|
# define HB_INTERNAL
|
||||||
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef NULL
|
#ifndef NULL
|
||||||
|
|
Loading…
Reference in New Issue