diff options
author | Daniel Veillard <veillard@src.gnome.org> | 2009-01-18 20:53:59 +0000 |
---|---|---|
committer | Daniel Veillard <veillard@src.gnome.org> | 2009-01-18 20:53:59 +0000 |
commit | f63085de5e33a95e326d1d810fb18d979359012b (patch) | |
tree | b12b3dd9c79fe1d35afe6142667d489eccc94f23 /include/libxml/xmlwin32version.h.in | |
parent | d032a5bc212143649e7d5a55a1180fba34b18185 (diff) | |
download | libxml2-f63085de5e33a95e326d1d810fb18d979359012b.tar.gz |
port patch from Marcus Meissner to add gcc checking for printf like
* include/libxml/parser.h include/libxml/xmlwriter.h
include/libxml/relaxng.h include/libxml/xmlversion.h.in
include/libxml/xmlwin32version.h.in include/libxml/valid.h
include/libxml/xmlschemas.h include/libxml/xmlerror.h:
port patch from Marcus Meissner to add gcc checking for
printf like functions parameters, should fix #65068
* doc/apibuild.py doc/*: modified the script accordingly
and regenerated
* xpath.c xmlmemory.c threads.c: fix a few warnings
Daniel
svn path=/trunk/; revision=3813
Diffstat (limited to 'include/libxml/xmlwin32version.h.in')
-rw-r--r-- | include/libxml/xmlwin32version.h.in | 37 |
1 files changed, 32 insertions, 5 deletions
diff --git a/include/libxml/xmlwin32version.h.in b/include/libxml/xmlwin32version.h.in index f669df44..fbaf78bb 100644 --- a/include/libxml/xmlwin32version.h.in +++ b/include/libxml/xmlwin32version.h.in @@ -242,18 +242,27 @@ extern void xmlCheckVersion(int version); #endif #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 #endif + +/** + * ATTRIBUTE_ALLOC_SIZE: + * + * Macro used to indicate to GCC this is an allocator function + */ + #ifndef ATTRIBUTE_ALLOC_SIZE # if ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3))) # define ATTRIBUTE_ALLOC_SIZE(x) __attribute__((alloc_size(x))) @@ -263,10 +272,28 @@ extern void xmlCheckVersion(int version); #else # define ATTRIBUTE_ALLOC_SIZE(x) #endif + +/** + * ATTRIBUTE_PRINTF: + * + * Macro used to indicate to GCC the parameter are printf like + */ + +#ifndef ATTRIBUTE_PRINTF +# if ((__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3))) +# define ATTRIBUTE_PRINTF(fmt,args) __attribute__((__format__(__printf__,fmt,args))) +# else +# define ATTRIBUTE_PRINTF(fmt,args) +# endif #else +# define ATTRIBUTE_PRINTF(fmt,args) +#endif + +#else /* !__GNUC__ */ #define ATTRIBUTE_UNUSED +#define ATTRIBUTE_PRINTF(fmt,args) #define ATTRIBUTE_ALLOC_SIZE(x) -#endif +#endif /* __GNUC__ */ /* * #pragma comment(lib, "iconv.lib") |