mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2024-10-26 12:25:09 +03:00
Visual Studio: Define XML_DEPRECATED
We can mark APIs as deprecated using __declspec(deprecated) with Visual Studio 2005 and later, so add a definition of that so that we can help users avoid using deprecated APIs when using Visual Studio as well. For the existing GCC definition, check whether we are on GCC 3.1+ before enabling the definition.
This commit is contained in:
parent
b1f9c19383
commit
b9590d5d81
@ -440,10 +440,10 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
|
||||
#endif
|
||||
|
||||
#ifndef XML_DEPRECATED
|
||||
# ifdef IN_LIBXML
|
||||
# if defined (IN_LIBXML) || (__GNUC__ * 100 + __GNUC_MINOR__ < 301)
|
||||
# define XML_DEPRECATED
|
||||
# else
|
||||
/* Available since at least GCC 3.1 */
|
||||
# else
|
||||
# define XML_DEPRECATED __attribute__((deprecated))
|
||||
# endif
|
||||
#endif
|
||||
@ -487,7 +487,12 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
|
||||
* is deprecated.
|
||||
*/
|
||||
#ifndef XML_DEPRECATED
|
||||
#define XML_DEPRECATED
|
||||
# if defined (IN_LIBXML) || !defined (_MSC_VER)
|
||||
# define XML_DEPRECATED
|
||||
/* Available since Visual Studio 2005 */
|
||||
# elif defined (_MSC_VER) && (_MSC_VER >= 1400)
|
||||
# define XML_DEPRECATED __declspec(deprecated)
|
||||
# endif
|
||||
#endif
|
||||
/**
|
||||
* LIBXML_IGNORE_FPTR_CAST_WARNINGS:
|
||||
|
Loading…
Reference in New Issue
Block a user