Skip to content
Snippets Groups Projects
Commit d49e9cc0cef8 authored by Nick Wellnhofer's avatar Nick Wellnhofer
Browse files

Add XML_DEPRECATED macro

__attribute__((deprecated)) is available since at least GCC 3.1, so an
exact version check is probably unnecessary.
parent ab5bdd4c1c8b
No related branches found
No related tags found
No related merge requests found
......@@ -456,6 +456,15 @@
# 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 @@
* 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
......
......@@ -8,6 +8,9 @@
* daniel@veillard.com
*/
 
/* Disable deprecation warnings */
#define XML_DEPRECATED
#include "libxml.h"
#include <stdio.h>
 
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment