From 986d27c3954238761389225833a543ee35ca2d5f Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 22 Mar 2006 19:37:58 +0000 Subject: [PATCH] make it possible to predefine __WXFUNCTION__ in user code to have a different behaviour (e.g. use __PRETTY_FUNCTION instead of __FUNCTION__ with gcc) if needed git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38283 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/debug.h | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/include/wx/debug.h b/include/wx/debug.h index f0cb8a5d5e..82f7bde0ac 100644 --- a/include/wx/debug.h +++ b/include/wx/debug.h @@ -47,15 +47,17 @@ #endif /* !WXDEBUG */ #endif /* __WXDEBUG__ */ -/* TODO: add more compilers supporting __FUNCTION__ */ -#if defined(__GNUC__) || \ - (defined(_MSC_VER) && _MSC_VER >= 1300) || \ - defined(__FUNCTION__) - #define __WXFUNCTION__ __FUNCTION__ -#else - /* still define __WXFUNCTION__ to avoid #ifdefs elsewhere */ - #define __WXFUNCTION__ (NULL) -#endif +#ifndef __WXFUNCTION__ + /* TODO: add more compilers supporting __FUNCTION__ */ + #if defined(__GNUC__) || \ + (defined(_MSC_VER) && _MSC_VER >= 1300) || \ + defined(__FUNCTION__) + #define __WXFUNCTION__ __FUNCTION__ + #else + /* still define __WXFUNCTION__ to avoid #ifdefs elsewhere */ + #define __WXFUNCTION__ (NULL) + #endif +#endif /* __WXFUNCTION__ already defined */ /* ---------------------------------------------------------------------------- */ /* Debugging macros */ -- 2.47.2