summaryrefslogtreecommitdiff
path: root/src/include/mhd_options.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/mhd_options.h')
-rw-r--r--src/include/mhd_options.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/include/mhd_options.h b/src/include/mhd_options.h
index 5a5b7fee..821407a9 100644
--- a/src/include/mhd_options.h
+++ b/src/include/mhd_options.h
@@ -172,4 +172,19 @@
#endif /* ! (MHD_ASAN_ACTIVE && HAVE_SANITIZER_ASAN_INTERFACE_H &&
(FUNC_ATTR_PTRCOMPARE_WORKS || FUNC_ATTR_NOSANITIZE_WORKS)) */
+
+/**
+ * Automatic string with the name of the current function
+ */
+#if defined(HAVE___FUNC__)
+#define MHD_FUNC_ __func__
+#elif defined(HAVE___FUNCTION__)
+#define MHD_FUNC_ __FUNCTION__
+#elif defined(HAVE___PRETTY_FUNCTION__)
+#define MHD_FUNC_ __PRETTY_FUNCTION__
+#else
+#define MHD_FUNC_ "**name unavailable**"
+#endif
+
+
#endif /* MHD_OPTIONS_H */