summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-libs/libxml2/files/libxml2-2.7.3-printf-rename.patch')
-rw-r--r--dev-libs/libxml2/files/libxml2-2.7.3-printf-rename.patch409
1 files changed, 409 insertions, 0 deletions
diff --git a/dev-libs/libxml2/files/libxml2-2.7.3-printf-rename.patch b/dev-libs/libxml2/files/libxml2-2.7.3-printf-rename.patch
new file mode 100644
index 000000000..2211a702d
--- /dev/null
+++ b/dev-libs/libxml2/files/libxml2-2.7.3-printf-rename.patch
@@ -0,0 +1,409 @@
+Author: Jose Luis Rivero <yoswink@gentoo.org>
+Source: patch extrated from libxml2 svn. Diff between 3826 .. 3827
+
+Description: the patch fix the problems between libxml2 and wxGTK
+described in http://mail.gnome.org/archives/xml/2009-April/msg00021.html.
+It is basically a renaming of the macro function to avoid collisions
+with other libraries.
+
+This patch should only be applied to version 2.7.3
+
+Index: include/libxml/parser.h
+===================================================================
+--- include/libxml/parser.h (rev: 3826)
++++ include/libxml/parser.h (working copy)
+@@ -594,7 +594,7 @@
+ * Display and format a warning messages, callback.
+ */
+ typedef void (XMLCDECL *warningSAXFunc) (void *ctx,
+- const char *msg, ...) ATTRIBUTE_PRINTF(2,3);
++ const char *msg, ...) LIBXML_ATTR_FORMAT(2,3);
+ /**
+ * errorSAXFunc:
+ * @ctx: an XML parser context
+@@ -604,7 +604,7 @@
+ * Display and format an error messages, callback.
+ */
+ typedef void (XMLCDECL *errorSAXFunc) (void *ctx,
+- const char *msg, ...) ATTRIBUTE_PRINTF(2,3);
++ const char *msg, ...) LIBXML_ATTR_FORMAT(2,3);
+ /**
+ * fatalErrorSAXFunc:
+ * @ctx: an XML parser context
+@@ -616,7 +616,7 @@
+ * get all the callbacks for errors.
+ */
+ typedef void (XMLCDECL *fatalErrorSAXFunc) (void *ctx,
+- const char *msg, ...) ATTRIBUTE_PRINTF(2,3);
++ const char *msg, ...) LIBXML_ATTR_FORMAT(2,3);
+ /**
+ * isStandaloneSAXFunc:
+ * @ctx: the user data (XML parser context)
+Index: include/libxml/xmlwriter.h
+===================================================================
+--- include/libxml/xmlwriter.h (rev: 3826)
++++ include/libxml/xmlwriter.h (working copy)
+@@ -70,12 +70,12 @@
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterWriteFormatComment(xmlTextWriterPtr writer,
+ const char *format, ...)
+- ATTRIBUTE_PRINTF(2,3);
++ LIBXML_ATTR_FORMAT(2,3);
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterWriteVFormatComment(xmlTextWriterPtr writer,
+ const char *format,
+ va_list argptr)
+- ATTRIBUTE_PRINTF(2,0);
++ LIBXML_ATTR_FORMAT(2,0);
+ XMLPUBFUN int XMLCALL xmlTextWriterWriteComment(xmlTextWriterPtr
+ writer,
+ const xmlChar *
+@@ -105,13 +105,13 @@
+ xmlTextWriterWriteFormatElement(xmlTextWriterPtr writer,
+ const xmlChar * namme,
+ const char *format, ...)
+- ATTRIBUTE_PRINTF(3,4);
++ LIBXML_ATTR_FORMAT(3,4);
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterWriteVFormatElement(xmlTextWriterPtr writer,
+ const xmlChar * name,
+ const char *format,
+ va_list argptr)
+- ATTRIBUTE_PRINTF(3,0);
++ LIBXML_ATTR_FORMAT(3,0);
+ XMLPUBFUN int XMLCALL xmlTextWriterWriteElement(xmlTextWriterPtr
+ writer,
+ const xmlChar * name,
+@@ -123,7 +123,7 @@
+ const xmlChar * name,
+ const xmlChar * namespaceURI,
+ const char *format, ...)
+- ATTRIBUTE_PRINTF(5,6);
++ LIBXML_ATTR_FORMAT(5,6);
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterWriteVFormatElementNS(xmlTextWriterPtr writer,
+ const xmlChar * prefix,
+@@ -131,7 +131,7 @@
+ const xmlChar * namespaceURI,
+ const char *format,
+ va_list argptr)
+- ATTRIBUTE_PRINTF(5,0);
++ LIBXML_ATTR_FORMAT(5,0);
+ XMLPUBFUN int XMLCALL xmlTextWriterWriteElementNS(xmlTextWriterPtr
+ writer,
+ const xmlChar *
+@@ -148,11 +148,11 @@
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterWriteFormatRaw(xmlTextWriterPtr writer,
+ const char *format, ...)
+- ATTRIBUTE_PRINTF(2,3);
++ LIBXML_ATTR_FORMAT(2,3);
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterWriteVFormatRaw(xmlTextWriterPtr writer,
+ const char *format, va_list argptr)
+- ATTRIBUTE_PRINTF(2,0);
++ LIBXML_ATTR_FORMAT(2,0);
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterWriteRawLen(xmlTextWriterPtr writer,
+ const xmlChar * content, int len);
+@@ -163,13 +163,13 @@
+ writer,
+ const char
+ *format, ...)
+- ATTRIBUTE_PRINTF(2,3);
++ LIBXML_ATTR_FORMAT(2,3);
+ XMLPUBFUN int XMLCALL xmlTextWriterWriteVFormatString(xmlTextWriterPtr
+ writer,
+ const char
+ *format,
+ va_list argptr)
+- ATTRIBUTE_PRINTF(2,0);
++ LIBXML_ATTR_FORMAT(2,0);
+ XMLPUBFUN int XMLCALL xmlTextWriterWriteString(xmlTextWriterPtr writer,
+ const xmlChar *
+ content);
+@@ -204,13 +204,13 @@
+ xmlTextWriterWriteFormatAttribute(xmlTextWriterPtr writer,
+ const xmlChar * name,
+ const char *format, ...)
+- ATTRIBUTE_PRINTF(3,4);
++ LIBXML_ATTR_FORMAT(3,4);
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterWriteVFormatAttribute(xmlTextWriterPtr writer,
+ const xmlChar * name,
+ const char *format,
+ va_list argptr)
+- ATTRIBUTE_PRINTF(3,0);
++ LIBXML_ATTR_FORMAT(3,0);
+ XMLPUBFUN int XMLCALL xmlTextWriterWriteAttribute(xmlTextWriterPtr
+ writer,
+ const xmlChar * name,
+@@ -222,7 +222,7 @@
+ const xmlChar * name,
+ const xmlChar * namespaceURI,
+ const char *format, ...)
+- ATTRIBUTE_PRINTF(5,6);
++ LIBXML_ATTR_FORMAT(5,6);
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterWriteVFormatAttributeNS(xmlTextWriterPtr writer,
+ const xmlChar * prefix,
+@@ -230,7 +230,7 @@
+ const xmlChar * namespaceURI,
+ const char *format,
+ va_list argptr)
+- ATTRIBUTE_PRINTF(5,0);
++ LIBXML_ATTR_FORMAT(5,0);
+ XMLPUBFUN int XMLCALL xmlTextWriterWriteAttributeNS(xmlTextWriterPtr
+ writer,
+ const xmlChar *
+@@ -257,12 +257,12 @@
+ xmlTextWriterWriteFormatPI(xmlTextWriterPtr writer,
+ const xmlChar * target,
+ const char *format, ...)
+- ATTRIBUTE_PRINTF(3,4);
++ LIBXML_ATTR_FORMAT(3,4);
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterWriteVFormatPI(xmlTextWriterPtr writer,
+ const xmlChar * target,
+ const char *format, va_list argptr)
+- ATTRIBUTE_PRINTF(3,0);
++ LIBXML_ATTR_FORMAT(3,0);
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterWritePI(xmlTextWriterPtr writer,
+ const xmlChar * target,
+@@ -287,11 +287,11 @@
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterWriteFormatCDATA(xmlTextWriterPtr writer,
+ const char *format, ...)
+- ATTRIBUTE_PRINTF(2,3);
++ LIBXML_ATTR_FORMAT(2,3);
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterWriteVFormatCDATA(xmlTextWriterPtr writer,
+ const char *format, va_list argptr)
+- ATTRIBUTE_PRINTF(2,0);
++ LIBXML_ATTR_FORMAT(2,0);
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterWriteCDATA(xmlTextWriterPtr writer,
+ const xmlChar * content);
+@@ -315,14 +315,14 @@
+ const xmlChar * pubid,
+ const xmlChar * sysid,
+ const char *format, ...)
+- ATTRIBUTE_PRINTF(5,6);
++ LIBXML_ATTR_FORMAT(5,6);
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterWriteVFormatDTD(xmlTextWriterPtr writer,
+ const xmlChar * name,
+ const xmlChar * pubid,
+ const xmlChar * sysid,
+ const char *format, va_list argptr)
+- ATTRIBUTE_PRINTF(5,0);
++ LIBXML_ATTR_FORMAT(5,0);
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterWriteDTD(xmlTextWriterPtr writer,
+ const xmlChar * name,
+@@ -353,13 +353,13 @@
+ xmlTextWriterWriteFormatDTDElement(xmlTextWriterPtr writer,
+ const xmlChar * name,
+ const char *format, ...)
+- ATTRIBUTE_PRINTF(3,4);
++ LIBXML_ATTR_FORMAT(3,4);
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterWriteVFormatDTDElement(xmlTextWriterPtr writer,
+ const xmlChar * name,
+ const char *format,
+ va_list argptr)
+- ATTRIBUTE_PRINTF(3,0);
++ LIBXML_ATTR_FORMAT(3,0);
+ XMLPUBFUN int XMLCALL xmlTextWriterWriteDTDElement(xmlTextWriterPtr
+ writer,
+ const xmlChar *
+@@ -383,13 +383,13 @@
+ xmlTextWriterWriteFormatDTDAttlist(xmlTextWriterPtr writer,
+ const xmlChar * name,
+ const char *format, ...)
+- ATTRIBUTE_PRINTF(3,4);
++ LIBXML_ATTR_FORMAT(3,4);
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterWriteVFormatDTDAttlist(xmlTextWriterPtr writer,
+ const xmlChar * name,
+ const char *format,
+ va_list argptr)
+- ATTRIBUTE_PRINTF(3,0);
++ LIBXML_ATTR_FORMAT(3,0);
+ XMLPUBFUN int XMLCALL xmlTextWriterWriteDTDAttlist(xmlTextWriterPtr
+ writer,
+ const xmlChar *
+@@ -414,14 +414,14 @@
+ int pe,
+ const xmlChar * name,
+ const char *format, ...)
+- ATTRIBUTE_PRINTF(4,5);
++ LIBXML_ATTR_FORMAT(4,5);
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterWriteVFormatDTDInternalEntity(xmlTextWriterPtr writer,
+ int pe,
+ const xmlChar * name,
+ const char *format,
+ va_list argptr)
+- ATTRIBUTE_PRINTF(4,0);
++ LIBXML_ATTR_FORMAT(4,0);
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterWriteDTDInternalEntity(xmlTextWriterPtr writer,
+ int pe,
+Index: include/libxml/relaxng.h
+===================================================================
+--- include/libxml/relaxng.h (rev: 3826)
++++ include/libxml/relaxng.h (working copy)
+@@ -32,7 +32,7 @@
+ *
+ * Signature of an error callback from a Relax-NG validation
+ */
+-typedef void (XMLCDECL *xmlRelaxNGValidityErrorFunc) (void *ctx, const char *msg, ...) ATTRIBUTE_PRINTF(2,3);
++typedef void (XMLCDECL *xmlRelaxNGValidityErrorFunc) (void *ctx, const char *msg, ...) LIBXML_ATTR_FORMAT(2,3);
+
+ /**
+ * xmlRelaxNGValidityWarningFunc:
+@@ -42,7 +42,7 @@
+ *
+ * Signature of a warning callback from a Relax-NG validation
+ */
+-typedef void (XMLCDECL *xmlRelaxNGValidityWarningFunc) (void *ctx, const char *msg, ...) ATTRIBUTE_PRINTF(2,3);
++typedef void (XMLCDECL *xmlRelaxNGValidityWarningFunc) (void *ctx, const char *msg, ...) LIBXML_ATTR_FORMAT(2,3);
+
+ /**
+ * A schemas validation context
+Index: include/libxml/xmlversion.h.in
+===================================================================
+--- include/libxml/xmlversion.h.in (rev: 3826)
++++ include/libxml/xmlversion.h.in (working copy)
+@@ -414,19 +414,19 @@
+ #endif
+
+ /**
+- * ATTRIBUTE_PRINTF:
++ * LIBXML_ATTR_FORMAT:
+ *
+ * Macro used to indicate to GCC the parameter are printf like
+ */
+
+-#ifndef ATTRIBUTE_PRINTF
++#ifndef LIBXML_ATTR_FORMAT
+ # if ((__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)))
+-# define ATTRIBUTE_PRINTF(fmt,args) __attribute__((__format__(__printf__,fmt,args)))
++# define LIBXML_ATTR_FORMAT(fmt,args) __attribute__((__format__(__printf__,fmt,args)))
+ # else
+-# define ATTRIBUTE_PRINTF(fmt,args)
++# define LIBXML_ATTR_FORMAT(fmt,args)
+ # endif
+ #else
+-# define ATTRIBUTE_PRINTF(fmt,args)
++# define LIBXML_ATTR_FORMAT(fmt,args)
+ #endif
+
+ #else /* ! __GNUC__ */
+@@ -443,11 +443,11 @@
+ */
+ #define ATTRIBUTE_ALLOC_SIZE(x)
+ /**
+- * ATTRIBUTE_PRINTF:
++ * LIBXML_ATTR_FORMAT:
+ *
+ * Macro used to indicate to GCC the parameter are printf like
+ */
+-#define ATTRIBUTE_PRINTF(fmt,args)
++#define LIBXML_ATTR_FORMAT(fmt,args)
+ #endif /* __GNUC__ */
+
+ #ifdef __cplusplus
+
+Index: include/libxml/valid.h
+===================================================================
+--- include/libxml/valid.h (rev: 3826)
++++ include/libxml/valid.h (working copy)
+@@ -41,7 +41,7 @@
+ */
+ typedef void (XMLCDECL *xmlValidityErrorFunc) (void *ctx,
+ const char *msg,
+- ...) ATTRIBUTE_PRINTF(2,3);
++ ...) LIBXML_ATTR_FORMAT(2,3);
+
+ /**
+ * xmlValidityWarningFunc:
+@@ -56,7 +56,7 @@
+ */
+ typedef void (XMLCDECL *xmlValidityWarningFunc) (void *ctx,
+ const char *msg,
+- ...) ATTRIBUTE_PRINTF(2,3);
++ ...) LIBXML_ATTR_FORMAT(2,3);
+
+ #ifdef IN_LIBXML
+ /**
+Index: include/libxml/xmlschemas.h
+===================================================================
+--- include/libxml/xmlschemas.h (rev: 3826)
++++ include/libxml/xmlschemas.h (working copy)
+@@ -92,7 +92,7 @@
+ *
+ * Signature of an error callback from an XSD validation
+ */
+-typedef void (XMLCDECL *xmlSchemaValidityErrorFunc) (void *ctx, const char *msg, ...) ATTRIBUTE_PRINTF(2,3);
++typedef void (XMLCDECL *xmlSchemaValidityErrorFunc) (void *ctx, const char *msg, ...) LIBXML_ATTR_FORMAT(2,3);
+
+ /**
+ * xmlSchemaValidityWarningFunc:
+@@ -102,7 +102,7 @@
+ *
+ * Signature of a warning callback from an XSD validation
+ */
+-typedef void (XMLCDECL *xmlSchemaValidityWarningFunc) (void *ctx, const char *msg, ...) ATTRIBUTE_PRINTF(2,3);
++typedef void (XMLCDECL *xmlSchemaValidityWarningFunc) (void *ctx, const char *msg, ...) LIBXML_ATTR_FORMAT(2,3);
+
+ /**
+ * A schemas validation context
+Index: include/libxml/xmlerror.h
+===================================================================
+--- include/libxml/xmlerror.h (rev: 3826)
++++ include/libxml/xmlerror.h (working copy)
+@@ -843,7 +843,7 @@
+ */
+ typedef void (XMLCDECL *xmlGenericErrorFunc) (void *ctx,
+ const char *msg,
+- ...) ATTRIBUTE_PRINTF(2,3);
++ ...) LIBXML_ATTR_FORMAT(2,3);
+ /**
+ * xmlStructuredErrorFunc:
+ * @userData: user provided data for the error callback
+@@ -874,19 +874,19 @@
+ XMLPUBFUN void XMLCDECL
+ xmlParserError (void *ctx,
+ const char *msg,
+- ...) ATTRIBUTE_PRINTF(2,3);
++ ...) LIBXML_ATTR_FORMAT(2,3);
+ XMLPUBFUN void XMLCDECL
+ xmlParserWarning (void *ctx,
+ const char *msg,
+- ...) ATTRIBUTE_PRINTF(2,3);
++ ...) LIBXML_ATTR_FORMAT(2,3);
+ XMLPUBFUN void XMLCDECL
+ xmlParserValidityError (void *ctx,
+ const char *msg,
+- ...) ATTRIBUTE_PRINTF(2,3);
++ ...) LIBXML_ATTR_FORMAT(2,3);
+ XMLPUBFUN void XMLCDECL
+ xmlParserValidityWarning (void *ctx,
+ const char *msg,
+- ...) ATTRIBUTE_PRINTF(2,3);
++ ...) LIBXML_ATTR_FORMAT(2,3);
+ XMLPUBFUN void XMLCALL
+ xmlParserPrintFileInfo (xmlParserInputPtr input);
+ XMLPUBFUN void XMLCALL
+@@ -930,7 +930,7 @@
+ int int1,
+ int col,
+ const char *msg,
+- ...) ATTRIBUTE_PRINTF(16,17);
++ ...) LIBXML_ATTR_FORMAT(16,17);
+ XMLPUBFUN void XMLCALL
+ __xmlSimpleError (int domain,
+ int code,