summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Dröge <slomo@coaxion.net>2019-06-10 12:15:55 +0000
committerSebastian Dröge <slomo@coaxion.net>2019-06-10 12:15:55 +0000
commitacdccff4d24784bc428e3492ff31b86c88a2b0c4 (patch)
tree9fe8b5065f7ad1fb805948c4f6c2dae35c6a696e
parentdbd8193a871427d49b5c91b0fc3a646f23f098b3 (diff)
parent7f7f7e3cc348a1d3df518db54dcbc0dc12e7d46c (diff)
downloadglib-acdccff4d24784bc428e3492ff31b86c88a2b0c4.tar.gz
Merge branch 'backport-799-func-macro-glib-2-60' into 'glib-2-60'
Backport !799 “Revert "macros: Try to use the standard __func__ first in G_STRFUNC"” to glib-2-60 See merge request GNOME/glib!899
-rw-r--r--glib/gmacros.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/glib/gmacros.h b/glib/gmacros.h
index b0384ccf0..1fe6e760c 100644
--- a/glib/gmacros.h
+++ b/glib/gmacros.h
@@ -304,10 +304,10 @@
#endif
/* Provide a string identifying the current function, non-concatenatable */
-#if defined (__func__)
-#define G_STRFUNC ((const char*) (__func__))
-#elif defined (__GNUC__) && defined (__cplusplus)
+#if defined (__GNUC__) && defined (__cplusplus)
#define G_STRFUNC ((const char*) (__PRETTY_FUNCTION__))
+#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+#define G_STRFUNC ((const char*) (__func__))
#elif defined (__GNUC__) || (defined(_MSC_VER) && (_MSC_VER > 1300))
#define G_STRFUNC ((const char*) (__FUNCTION__))
#else