Index: third_party/expat/files/lib/expat_external.h |
diff --git a/third_party/expat/files/lib/expat_external.h b/third_party/expat/files/lib/expat_external.h |
index 2c03284ea265bc62bbae15e29e48f7b0df4cef0d..124c7777f14a889a2c28fe86a531969e5688fc8e 100644 |
--- a/third_party/expat/files/lib/expat_external.h |
+++ b/third_party/expat/files/lib/expat_external.h |
@@ -65,12 +65,27 @@ |
#endif |
#endif /* not defined XML_STATIC */ |
+/* Don't change symbol visibility if used as a static link libraray */ |
+#if !defined(XML_STATIC) && !defined(XMLIMPORT) && defined(__GNUC__) && (__GNUC__ >= 4) |
+#define XMLIMPORT __attribute__ ((visibility ("default"))) |
+#endif |
/* If we didn't define it above, define it away: */ |
#ifndef XMLIMPORT |
#define XMLIMPORT |
#endif |
+#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 |
#define XMLPARSEAPI(type) XMLIMPORT type XMLCALL |