summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNick Wellnhofer <wellnhofer@aevum.de>2022-02-20 18:19:27 +0100
committerNick Wellnhofer <wellnhofer@aevum.de>2022-02-20 21:49:04 +0100
commita2fe74c08a9bd03cf5515b9e44d2005538b9f619 (patch)
treeb373bc12685bb4ba00dd8d363387a39b6fdd9ca2 /include
parent346c3a930c50b20d6f65dd7d751b8b7284582214 (diff)
downloadlibxml2-a2fe74c08a9bd03cf5515b9e44d2005538b9f619.tar.gz
Add XML_DEPRECATED macro
__attribute__((deprecated)) is available since at least GCC 3.1, so an exact version check is probably unnecessary.
Diffstat (limited to 'include')
-rw-r--r--include/libxml/xmlversion.h.in18
1 files changed, 18 insertions, 0 deletions
diff --git a/include/libxml/xmlversion.h.in b/include/libxml/xmlversion.h.in
index f9f79a2f..b1d2a208 100644
--- a/include/libxml/xmlversion.h.in
+++ b/include/libxml/xmlversion.h.in
@@ -456,6 +456,15 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
# define LIBXML_ATTR_FORMAT(fmt,args)
#endif
+#ifndef XML_DEPRECATED
+# ifdef IN_LIBXML
+# define XML_DEPRECATED
+# else
+/* Available since at least GCC 3.1 */
+# define XML_DEPRECATED __attribute__((deprecated))
+# endif
+#endif
+
#else /* ! __GNUC__ */
/**
* ATTRIBUTE_UNUSED:
@@ -475,6 +484,15 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
* Macro used to indicate to GCC the parameter are printf like
*/
#define LIBXML_ATTR_FORMAT(fmt,args)
+/**
+ * XML_DEPRECATED:
+ *
+ * Macro used to indicate that a function, variable, type or struct member
+ * is deprecated.
+ */
+#ifndef XML_DEPRECATED
+#define XML_DEPRECATED
+#endif
#endif /* __GNUC__ */
#ifdef __cplusplus