diff options
author | Konstantin Osipov <kostja@sun.com> | 2009-12-03 00:24:10 +0300 |
---|---|---|
committer | Konstantin Osipov <kostja@sun.com> | 2009-12-03 00:24:10 +0300 |
commit | f744a841342aab98adcd01b053e1dc1f8b5a94e3 (patch) | |
tree | a01fd3fc8d2b32d544216a890dd85e0ba0e05845 /include/my_global.h | |
parent | 669258ab54b454e7faee232c5aa6e758afb3c692 (diff) | |
download | mariadb-git-f744a841342aab98adcd01b053e1dc1f8b5a94e3.tar.gz |
Backport of:
------------------------------------------------------------
revno: 2630.4.37
committer: Dmitry Lenev <dlenev@mysql.com>
branch nick: mysql-6.0-3726-w2
timestamp: Wed 2008-06-25 20:28:57 +0400
message:
Fix build failure of mysql-6.0-3726 tree on Windows.
The failure was caused by the fact that sql/mdl.cc was
using __func__ macro without including sql_profile.h
header which contained definition of this macro for
those platforms that miss it.
This patch solves this problem by moving this define to
include/my_global.h which makes it available in modules
which don't/can't include sql/mysql_priv.h.
This is a patch that is part of WL#3726.
Diffstat (limited to 'include/my_global.h')
-rw-r--r-- | include/my_global.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/include/my_global.h b/include/my_global.h index 815be622b16..0f2aea62438 100644 --- a/include/my_global.h +++ b/include/my_global.h @@ -1574,6 +1574,25 @@ inline void operator delete[](void*, void*) { /* Do nothing */ } #define bool In_C_you_should_use_my_bool_instead() #endif +/* Provide __func__ macro definition for platforms that miss it. */ +#if __STDC_VERSION__ < 199901L +# if __GNUC__ >= 2 +# define __func__ __FUNCTION__ +# else +# define __func__ "<unknown>" +# endif +#elif defined(_MSC_VER) +# if _MSC_VER < 1300 +# define __func__ "<unknown>" +# else +# define __func__ __FUNCTION__ +# endif +#elif defined(__BORLANDC__) +# define __func__ __FUNC__ +#else +# define __func__ "<unknown>" +#endif + #ifndef HAVE_RINT /** All integers up to this number can be represented exactly as double precision |