2016-03-23 09:48:07 +01:00
|
|
|
Index: expat-2.1.1/lib/expat.h
|
|
|
|
===================================================================
|
|
|
|
--- expat-2.1.1.orig/lib/expat.h
|
|
|
|
+++ expat-2.1.1/lib/expat.h
|
2016-04-01 18:55:19 +02:00
|
|
|
@@ -973,9 +973,12 @@ XML_FreeContentModel(XML_Parser parser,
|
2011-10-31 00:18:03 +01:00
|
|
|
|
|
|
|
/* Exposing the memory handling functions used in Expat */
|
|
|
|
XMLPARSEAPI(void *)
|
|
|
|
+XML_ATTR_MALLOC
|
|
|
|
+XML_ATTR_ALLOC_SIZE(2)
|
|
|
|
XML_MemMalloc(XML_Parser parser, size_t size);
|
|
|
|
|
|
|
|
XMLPARSEAPI(void *)
|
|
|
|
+XML_ATTR_ALLOC_SIZE(3)
|
|
|
|
XML_MemRealloc(XML_Parser parser, void *ptr, size_t size);
|
|
|
|
|
|
|
|
XMLPARSEAPI(void)
|
2016-03-23 09:48:07 +01:00
|
|
|
Index: expat-2.1.1/lib/expat_external.h
|
|
|
|
===================================================================
|
|
|
|
--- expat-2.1.1.orig/lib/expat_external.h
|
|
|
|
+++ expat-2.1.1/lib/expat_external.h
|
|
|
|
@@ -70,6 +70,17 @@
|
|
|
|
#define XMLIMPORT __attribute__ ((visibility ("default")))
|
2011-10-31 00:18:03 +01:00
|
|
|
#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
|
|
|
|
|