diff options
Diffstat (limited to '3rdParty/Expat/src/expat_external.h')
-rw-r--r-- | 3rdParty/Expat/src/expat_external.h | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/3rdParty/Expat/src/expat_external.h b/3rdParty/Expat/src/expat_external.h index 2c03284..892eb4b 100644 --- a/3rdParty/Expat/src/expat_external.h +++ b/3rdParty/Expat/src/expat_external.h @@ -67,2 +67,5 @@ +#if !defined(XMLIMPORT) && defined(__GNUC__) && (__GNUC__ >= 4) +#define XMLIMPORT __attribute__ ((visibility ("default"))) +#endif @@ -73,2 +76,13 @@ +#if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)) +#define XML_ATTR_MALLOC __attribute__((__malloc__)) +#else +#define XML_ATTR_MALLOC +#endif + +#if defined(__GNUC__) && ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) +#define XML_ATTR_ALLOC_SIZE(x) __attribute__((__alloc_size__(x))) +#else +#define XML_ATTR_ALLOC_SIZE(x) +#endif @@ -81,3 +95,6 @@ extern "C" { #ifdef XML_UNICODE_WCHAR_T -#define XML_UNICODE +# define XML_UNICODE +# if defined(__SIZEOF_WCHAR_T__) && (__SIZEOF_WCHAR_T__ != 2) +# error "sizeof(wchar_t) != 2; Need -fshort-wchar for both Expat and libc" +# endif #endif |