Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
ec01aa5d
Commit
ec01aa5d
authored
Mar 12, 2017
by
Sergei Petrunia
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MariaRocks: fix compilation in Windows: don't use __PRETTY_FUNCTION__ where it is not available
parent
d49bbf12
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
7 deletions
+16
-7
storage/rocksdb/rdb_utils.h
storage/rocksdb/rdb_utils.h
+16
-7
No files found.
storage/rocksdb/rdb_utils.h
View file @
ec01aa5d
...
...
@@ -106,6 +106,18 @@ namespace myrocks {
DBUG_ASSERT(static_cast<bool>(a) == static_cast<bool>(b))
#endif
/*
Portability: use __PRETTY_FUNCTION__ when available, otherwise use __func__
which is in the standard.
*/
#ifdef __GNUC__
# define __MYROCKS_PORTABLE_PRETTY_FUNCTION__ __PRETTY_FUNCTION__
#else
# define __MYROCKS_PORTABLE_PRETTY_FUNCTION__ __func__
#endif
/*
Intent behind this macro is to avoid manually typing the function name every
time we want to add the debugging statement and use the compiler for this
...
...
@@ -116,11 +128,7 @@ namespace myrocks {
contains the signature of the function as well as its bare name and provides
therefore more context when interpreting the logs.
*/
#ifdef __GNUC__
# define DBUG_ENTER_FUNC() DBUG_ENTER(__PRETTY_FUNCTION__)
#else
# define DBUG_ENTER_FUNC() DBUG_ENTER(__func__)
#endif
#define DBUG_ENTER_FUNC() DBUG_ENTER(__MYROCKS_PORTABLE_PRETTY_FUNCTION__)
/*
Error handling pattern used across MySQL abides by the following rules: "All
...
...
@@ -143,9 +151,10 @@ namespace myrocks {
and unlocking mutexes.
*/
#define RDB_MUTEX_LOCK_CHECK(m) \
rdb_check_mutex_call_result(__PRETTY_FUNCTION__, true, mysql_mutex_lock(&m))
rdb_check_mutex_call_result(__MYROCKS_PORTABLE_PRETTY_FUNCTION__, true, \
mysql_mutex_lock(&m))
#define RDB_MUTEX_UNLOCK_CHECK(m) \
rdb_check_mutex_call_result(__
PRETTY_FUNCTION__, false,
\
rdb_check_mutex_call_result(__
MYROCKS_PORTABLE_PRETTY_FUNCTION__, false,
\
mysql_mutex_unlock(&m))
/*
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment