Use __func__ only if the compiler supports it (ticket #148).
authorAkos Ladanyi <ladanyi@tmit.bme.hu>
Sun, 21 Sep 2008 14:46:01 +0100
changeset 266112ed801139d
parent 265 983d8c23aff8
child 271 cea3cb3bbcd7
child 274 2a33883915bb
Use __func__ only if the compiler supports it (ticket #148).
lemon/assert.h
     1.1 --- a/lemon/assert.h	Wed Sep 17 15:04:38 2008 +0100
     1.2 +++ b/lemon/assert.h	Sun Sep 21 14:46:01 2008 +0100
     1.3 @@ -107,8 +107,10 @@
     1.4  #    define LEMON_FUNCTION_NAME (__PRETTY_FUNCTION__)
     1.5  #  elif defined _MSC_VER
     1.6  #    define LEMON_FUNCTION_NAME (__FUNCSIG__)
     1.7 +#  elif __STDC_VERSION__ >= 199901L
     1.8 +#    define LEMON_FUNCTION_NAME (__func__)
     1.9  #  else
    1.10 -#    define LEMON_FUNCTION_NAME (__func__)
    1.11 +#    define LEMON_FUNCTION_NAME ("<unknown>")
    1.12  #  endif
    1.13  #endif
    1.14