summaryrefslogtreecommitdiff
path: root/handy.h
diff options
context:
space:
mode:
authorYves Orton <demerphq@gmail.com>2022-09-03 16:27:39 +0200
committerYves Orton <demerphq@gmail.com>2022-09-05 07:57:17 +0200
commitf31da5f4a2666ea564a2ccf880fc3ccd9dce8ee5 (patch)
tree7b7f5b50a6d883cba1eece7d78af020fa8617f85 /handy.h
parent59e36a288a938081959bdd2241f66aec60f8b7bf (diff)
downloadperl-f31da5f4a2666ea564a2ccf880fc3ccd9dce8ee5.tar.gz
cop.h - show function name
Also add SAFE_FUNCTION__ which ensures that the value is "UNKNOWN" on platforms that dont support __func__.
Diffstat (limited to 'handy.h')
-rw-r--r--handy.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/handy.h b/handy.h
index ed32a180c8..26b9a8b28c 100644
--- a/handy.h
+++ b/handy.h
@@ -132,10 +132,13 @@ required, but is kept for backwards compatibility.
* XXX Similarly, a Configure probe for __FILE__ and __LINE__ is needed. */
#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || (defined(__SUNPRO_C)) /* C99 or close enough. */
# define FUNCTION__ __func__
+# define SAFE_FUNCTION__ __func__
#elif (defined(__DECC_VER)) /* Tru64 or VMS, and strict C89 being used, but not modern enough cc (in Tur64, -c99 not known, only -std1). */
-# define FUNCTION__ ""
+# define FUNCTION__ ("")
+# define SAFE_FUNCTION__ ("UNKNOWN")
#else
# define FUNCTION__ __FUNCTION__ /* Common extension. */
+# define SAFE_FUNCTION__ __FUNCTION__ /* Common extension. */
#endif
/* XXX A note on the perl source internal type system. The