+// ----------------------------------------------------------------------------
+
+#define DECLARE_LOG_FUNCTION_PUBLIC(level) \
+ /* void wxLog##level(const wxChar *szFormat, ...); */ \
+ WX_DEFINE_VARARG_FUNC_VOID(wxLog##level, wxDoLog##level)
+
+#define DECLARE_LOG_FUNCTION_IMPL(level) \
+ extern void WXDLLIMPEXP_BASE wxVLog##level(const wxChar *szFormat, \
+ va_list argptr); \
+ extern void WXDLLIMPEXP_BASE wxDoLog##level(const wxChar *szFormat, \
+ ...) ATTRIBUTE_PRINTF_1
+
+#define DECLARE_LOG_FUNCTION2_EXP_IMPL(level, argclass, arg, expdecl) \
+ extern void expdecl wxVLog##level(argclass arg, \
+ const wxChar *szFormat, \
+ va_list argptr); \
+ extern void expdecl wxDoLog##level(argclass arg, \
+ const wxChar *szFormat, \
+ ...) ATTRIBUTE_PRINTF_2
+
+#else // !wxUSE_LOG
+
+// log functions do nothing at all
+#define DECLARE_LOG_FUNCTION_PUBLIC(level) \
+ /* void wxLog##level(const wxChar *szFormat, ...) {} */ \
+ WX_DEFINE_VARARG_FUNC_NOP(wxLog##level)
+
+#define DECLARE_LOG_FUNCTION_IMPL(level) \
+ inline void wxVLog##level(const wxChar *WXUNUSED(szFormat), \
+ va_list WXUNUSED(argptr)) { } \
+
+#define DECLARE_LOG_FUNCTION2_EXP_IMPL(level, argclass, arg, expdecl) \
+ inline void wxVLog##level(argclass WXUNUSED(arg), \
+ const wxChar *WXUNUSED(szFormat), \
+ va_list WXUNUSED(argptr)) {}
+
+// Empty Class to fake wxLogNull
+class WXDLLIMPEXP_BASE wxLogNull
+{
+public:
+ wxLogNull() { }
+};
+
+// Dummy macros to replace some functions.
+#define wxSysErrorCode() (unsigned long)0
+#define wxSysErrorMsg( X ) (const wxChar*)NULL
+
+// Fake symbolic trace masks... for those that are used frequently
+#define wxTRACE_OleCalls wxEmptyString // OLE interface calls
+
+#endif // wxUSE_LOG/!wxUSE_LOG
+
+#define DECLARE_LOG_FUNCTION(level) \
+ DECLARE_LOG_FUNCTION_PUBLIC(level) \
+ DECLARE_LOG_FUNCTION_IMPL(level)
+
+#define DECLARE_LOG_FUNCTION2_EXP(level, argclass, arg, expdecl) \
+ DECLARE_LOG_FUNCTION_PUBLIC(level) \
+ DECLARE_LOG_FUNCTION2_EXP_IMPL(level, argclass, arg, expdecl)