# HG changeset patch # User Akos Ladanyi # Date 2008-04-13 20:15:45 # Node ID 8b703d1773410c87205b431e00718611c2912759 # Parent 96f81c791f0cadaff3c8f87870034edbad630bb7 Improved LEMON_FUNCTION_NAME macro. It should work fine with GCC and the MS C++ compilers. Otherwise it reverts to using the __func__ variable which is C99, but I couldn't find a better alternative. diff --git a/lemon/assert.h b/lemon/assert.h --- a/lemon/assert.h +++ b/lemon/assert.h @@ -103,7 +103,13 @@ #endif #ifndef LEMON_FUNCTION_NAME -# define LEMON_FUNCTION_NAME (__PRETTY_FUNCTION__) +# if defined __GNUC__ +# define LEMON_FUNCTION_NAME (__PRETTY_FUNCTION__) +# elif defined _MSC_VER +# define LEMON_FUNCTION_NAME (__FUNCSIG__) +# else +# define LEMON_FUNCTION_NAME (__func__) +# endif #endif #ifdef DOXYGEN