define ATTRIBUTE_PRINTF(m,n) and not just ATTRIBUTE_PRINTF as nothing when the compiler doesn't support it, otherwise it can result in compiler errors when wx/defs.h is included before a standard header using ATTRIBUTE_PRINTF() as (at least version 2.6.20 of) xmlerror.h from libxml2 does

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45110 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2007-03-29 14:03:53 +00:00
parent 7d73178688
commit e57ee9bb0c

View File

@ -491,25 +491,20 @@ typedef int wxWindowID;
/* ---------------------------------------------------------------------------- */
/* Printf-like attribute definitions to obtain warnings with GNU C/C++ */
#if defined(__GNUC__) && !wxUSE_UNICODE
#ifndef ATTRIBUTE_PRINTF
# if defined(__GNUC__) && !wxUSE_UNICODE
# define ATTRIBUTE_PRINTF(m, n) __attribute__ ((__format__ (__printf__, m, n)))
# else
# define ATTRIBUTE_PRINTF(m, n)
# endif
# define ATTRIBUTE_PRINTF_1 ATTRIBUTE_PRINTF(1, 2)
# define ATTRIBUTE_PRINTF_2 ATTRIBUTE_PRINTF(2, 3)
# define ATTRIBUTE_PRINTF_3 ATTRIBUTE_PRINTF(3, 4)
# define ATTRIBUTE_PRINTF_4 ATTRIBUTE_PRINTF(4, 5)
# define ATTRIBUTE_PRINTF_5 ATTRIBUTE_PRINTF(5, 6)
# endif /* ATTRIBUTE_PRINTF */
#else
# ifndef ATTRIBUTE_PRINTF
# define ATTRIBUTE_PRINTF
# define ATTRIBUTE_PRINTF_1
# define ATTRIBUTE_PRINTF_2
# define ATTRIBUTE_PRINTF_3
# define ATTRIBUTE_PRINTF_4
# define ATTRIBUTE_PRINTF_5
# endif /* ATTRIBUTE_PRINTF */
#endif
#endif /* !defined(ATTRIBUTE_PRINTF) */
/* Macro to issue warning when using deprecated functions with gcc3 or MSVC7: */
#if wxCHECK_GCC_VERSION(3, 1)