Index: third_party/libxml/include/libxml/xmlversion.h.in |
diff --git a/third_party/libxml/include/libxml/xmlversion.h.in b/third_party/libxml/include/libxml/xmlversion.h.in |
index 0a9bafaa8a544a5e96e4943f92e52d02eb5ae410..95856541617009e037de8ea0cd8c3469992ff34b 100644 |
--- a/third_party/libxml/include/libxml/xmlversion.h.in |
+++ b/third_party/libxml/include/libxml/xmlversion.h.in |
@@ -391,22 +391,74 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version); |
#define LIBXML_ZLIB_ENABLED |
#endif |
+#ifdef __GNUC__ |
+#ifdef HAVE_ANSIDECL_H |
+#include <ansidecl.h> |
+#endif |
+ |
/** |
* ATTRIBUTE_UNUSED: |
* |
* Macro used to signal to GCC unused function parameters |
*/ |
-#ifdef __GNUC__ |
-#ifdef HAVE_ANSIDECL_H |
-#include <ansidecl.h> |
-#endif |
+ |
#ifndef ATTRIBUTE_UNUSED |
#define ATTRIBUTE_UNUSED __attribute__((unused)) |
#endif |
+ |
+/** |
+ * LIBXML_ATTR_ALLOC_SIZE: |
+ * |
+ * Macro used to indicate to GCC this is an allocator function |
+ */ |
+ |
+#ifndef LIBXML_ATTR_ALLOC_SIZE |
+# if ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3))) |
+# define LIBXML_ATTR_ALLOC_SIZE(x) __attribute__((alloc_size(x))) |
+# else |
+# define LIBXML_ATTR_ALLOC_SIZE(x) |
+# endif |
#else |
-#define ATTRIBUTE_UNUSED |
+# define LIBXML_ATTR_ALLOC_SIZE(x) |
+#endif |
+ |
+/** |
+ * LIBXML_ATTR_FORMAT: |
+ * |
+ * Macro used to indicate to GCC the parameter are printf like |
+ */ |
+ |
+#ifndef LIBXML_ATTR_FORMAT |
+# if ((__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3))) |
+# define LIBXML_ATTR_FORMAT(fmt,args) __attribute__((__format__(__printf__,fmt,args))) |
+# else |
+# define LIBXML_ATTR_FORMAT(fmt,args) |
+# endif |
+#else |
+# define LIBXML_ATTR_FORMAT(fmt,args) |
#endif |
+#else /* ! __GNUC__ */ |
+/** |
+ * ATTRIBUTE_UNUSED: |
+ * |
+ * Macro used to signal to GCC unused function parameters |
+ */ |
+#define ATTRIBUTE_UNUSED |
+/** |
+ * LIBXML_ATTR_ALLOC_SIZE: |
+ * |
+ * Macro used to indicate to GCC this is an allocator function |
+ */ |
+#define LIBXML_ATTR_ALLOC_SIZE(x) |
+/** |
+ * LIBXML_ATTR_FORMAT: |
+ * |
+ * Macro used to indicate to GCC the parameter are printf like |
+ */ |
+#define LIBXML_ATTR_FORMAT(fmt,args) |
+#endif /* __GNUC__ */ |
+ |
#ifdef __cplusplus |
} |
#endif /* __cplusplus */ |