[Commits] f9e63b7: MariaRocks port: __PRETTY_FUNCTION__ is a gcc extension. Use __func__ when it is not available

Sergei Petrunia psergey at askmonty.org
Tue Mar 7 10:38:26 EET 2017


revision-id: f9e63b7c59557efd36dfa4b3254cbe8b0af4ff06
parent(s): 48a5dd945b8f22ba4bceda7558b9f650fbc0fa43
committer: Sergei Petrunia
branch nick: 10.2-mariarocks
timestamp: 2017-03-07 11:38:26 +0300
message:

MariaRocks port: __PRETTY_FUNCTION__ is a gcc extension. Use __func__ when it is not available

For example, on Windows.

---
 storage/rocksdb/rdb_utils.h | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/storage/rocksdb/rdb_utils.h b/storage/rocksdb/rdb_utils.h
index a1d630d..6cd4740 100644
--- a/storage/rocksdb/rdb_utils.h
+++ b/storage/rocksdb/rdb_utils.h
@@ -113,7 +113,11 @@ namespace myrocks {
   contains the signature of the function as well as its bare name and provides
   therefore more context when interpreting the logs.
 */
-#define DBUG_ENTER_FUNC() DBUG_ENTER(__PRETTY_FUNCTION__)
+#ifdef __GNUC__
+#  define DBUG_ENTER_FUNC() DBUG_ENTER(__PRETTY_FUNCTION__)
+#else
+#  define DBUG_ENTER_FUNC() DBUG_ENTER(__func__)
+#endif
 
 /*
   Error handling pattern used across MySQL abides by the following rules: "All


More information about the commits mailing list