[Lemon-commits] Akos Ladanyi: Use __func__ only if the compiler ...
Lemon HG
hg at lemon.cs.elte.hu
Sun Sep 21 18:34:23 CEST 2008
details: http://lemon.cs.elte.hu/hg/lemon/rev/112ed801139d
changeset: 266:112ed801139d
user: Akos Ladanyi <ladanyi [at] tmit.bme.hu>
date: Sun Sep 21 14:46:01 2008 +0100
description:
Use __func__ only if the compiler supports it (ticket #148).
diffstat:
1 file changed, 3 insertions(+), 1 deletion(-)
lemon/assert.h | 4 +++-
diffs (15 lines):
diff -r 983d8c23aff8 -r 112ed801139d lemon/assert.h
--- a/lemon/assert.h Wed Sep 17 15:04:38 2008 +0100
+++ b/lemon/assert.h Sun Sep 21 14:46:01 2008 +0100
@@ -107,8 +107,10 @@
# define LEMON_FUNCTION_NAME (__PRETTY_FUNCTION__)
# elif defined _MSC_VER
# define LEMON_FUNCTION_NAME (__FUNCSIG__)
+# elif __STDC_VERSION__ >= 199901L
+# define LEMON_FUNCTION_NAME (__func__)
# else
-# define LEMON_FUNCTION_NAME (__func__)
+# define LEMON_FUNCTION_NAME ("<unknown>")
# endif
#endif
More information about the Lemon-commits
mailing list