/* ---------------------------------------------------------------------------- */
/* Printf-like attribute definitions to obtain warnings with GNU C/C++ */
-#ifndef ATTRIBUTE_PRINTF
+#ifndef WX_ATTRIBUTE_PRINTF
# if defined(__GNUC__) && !wxUSE_UNICODE
-# define ATTRIBUTE_PRINTF(m, n) __attribute__ ((__format__ (__printf__, m, n)))
+# define WX_ATTRIBUTE_PRINTF(m, n) __attribute__ ((__format__ (__printf__, m, n)))
# else
-# define ATTRIBUTE_PRINTF(m, n)
+# define WX_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 /* !defined(ATTRIBUTE_PRINTF) */
+# define WX_ATTRIBUTE_PRINTF_1 WX_ATTRIBUTE_PRINTF(1, 2)
+# define WX_ATTRIBUTE_PRINTF_2 WX_ATTRIBUTE_PRINTF(2, 3)
+# define WX_ATTRIBUTE_PRINTF_3 WX_ATTRIBUTE_PRINTF(3, 4)
+# define WX_ATTRIBUTE_PRINTF_4 WX_ATTRIBUTE_PRINTF(4, 5)
+# define WX_ATTRIBUTE_PRINTF_5 WX_ATTRIBUTE_PRINTF(5, 6)
+#endif /* !defined(WX_ATTRIBUTE_PRINTF) */
/* Macro to issue warning when using deprecated functions with gcc3 or MSVC7: */
static wxDebugContextDumpDelayCounter wxDebugContextDumpDelayCounter_Extra;
// Output a debug message, in a system dependent fashion.
-void WXDLLIMPEXP_BASE wxTrace(const wxChar *fmt ...) ATTRIBUTE_PRINTF_1;
-void WXDLLIMPEXP_BASE wxTraceLevel(int level, const wxChar *fmt ...) ATTRIBUTE_PRINTF_2;
+void WXDLLIMPEXP_BASE wxTrace(const wxChar *fmt ...) WX_ATTRIBUTE_PRINTF_1;
+void WXDLLIMPEXP_BASE wxTraceLevel(int level, const wxChar *fmt ...) WX_ATTRIBUTE_PRINTF_2;
#define WXTRACE wxTrace
#define WXTRACELEVEL wxTraceLevel
// these are duplicated wxString methods, they're also declared below
// if !wxNEEDS_WXSTRING_PRINTF_MIXIN:
- // static wxString Format(const wString& format, ...) ATTRIBUTE_PRINTF_1;
+ // static wxString Format(const wString& format, ...) WX_ATTRIBUTE_PRINTF_1;
WX_DEFINE_VARARG_FUNC_SANS_N0(static typename StringReturnType<T1>::type,
Format, 1, (const wxFormatString&),
DoFormatWchar, DoFormatUtf8)
// int Printf(const wxString& format, ...);
WX_DEFINE_VARARG_FUNC(int, Printf, 1, (const wxFormatString&),
DoPrintfWchar, DoPrintfUtf8)
- // int sprintf(const wxString& format, ...) ATTRIBUTE_PRINTF_2;
+ // int sprintf(const wxString& format, ...) WX_ATTRIBUTE_PRINTF_2;
WX_DEFINE_VARARG_FUNC(int, sprintf, 1, (const wxFormatString&),
DoPrintfWchar, DoPrintfUtf8)
#ifndef wxNEEDS_WXSTRING_PRINTF_MIXIN
// returns the string containing the result of Printf() to it
- // static wxString Format(const wxString& format, ...) ATTRIBUTE_PRINTF_1;
+ // static wxString Format(const wxString& format, ...) WX_ATTRIBUTE_PRINTF_1;
WX_DEFINE_VARARG_FUNC(static wxString, Format, 1, (const wxFormatString&),
DoFormatWchar, DoFormatUtf8)
#ifdef __WATCOMC__
#ifndef wxNEEDS_WXSTRING_PRINTF_MIXIN
// use Printf()
// (take 'this' into account in attribute parameter count)
- // int sprintf(const wxString& format, ...) ATTRIBUTE_PRINTF_2;
+ // int sprintf(const wxString& format, ...) WX_ATTRIBUTE_PRINTF_2;
WX_DEFINE_VARARG_FUNC(int, sprintf, 1, (const wxFormatString&),
DoPrintfWchar, DoPrintfUtf8)
#ifdef __WATCOMC__
#undef wxPrintf
#undef wxSprintf
- // NB: do _not_ use ATTRIBUTE_PRINTF here, we have some invalid formats
+ // NB: do _not_ use WX_ATTRIBUTE_PRINTF here, we have some invalid formats
// in the tests below
int wxPrintf( const wxChar *format, ... );
int wxSprintf( wxChar *str, const wxChar *format, ... );
wxString(buffer))
// this is the same as wxSnprintf() but it passes the format string to
-// wxVsnprintf() without using ATTRIBUTE_PRINTF and thus suppresses the gcc
+// wxVsnprintf() without using WX_ATTRIBUTE_PRINTF and thus suppresses the gcc
// checks (and resulting warnings) for the format string
//
// use with extreme care and only when you're really sure the warnings must be