summaryrefslogtreecommitdiff
path: root/include/my_global.h
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mysql.com>2008-08-27 14:15:06 +0200
committerSergei Golubchik <serg@mysql.com>2008-08-27 14:15:06 +0200
commitca23272e1e53e195169bec0609eb0168722e1879 (patch)
tree86b3438ca88d45f7642023edf639b82231659ba9 /include/my_global.h
parente2219ec965a80b2034d9debcbf12d3e73a684d89 (diff)
downloadmariadb-git-ca23272e1e53e195169bec0609eb0168722e1879.tar.gz
proc_info_hook, mysys access to thd->proc_info
include/my_global.h: move __func__ definition to my_global.h include/my_sys.h: proc_info_hook mysys/my_static.c: proc_info_hook sql/mysqld.cc: proc_info_hook sql/sql_class.cc: support thd==0 in set_thd_proc_info sql/sql_profile.cc: move __func__ definition to my_global.h sql/sql_profile.h: move __func__ definition to my_global.h
Diffstat (limited to 'include/my_global.h')
-rw-r--r--include/my_global.h21
1 files changed, 20 insertions, 1 deletions
diff --git a/include/my_global.h b/include/my_global.h
index 34b5a21beb2..6970fa5a0b6 100644
--- a/include/my_global.h
+++ b/include/my_global.h
@@ -1518,7 +1518,7 @@ inline void operator delete[](void*, void*) { /* Do nothing */ }
#if !defined(max)
#define max(a, b) ((a) > (b) ? (a) : (b))
#define min(a, b) ((a) < (b) ? (a) : (b))
-#endif
+#endif
/*
Only Linux is known to need an explicit sync of the directory to make sure a
file creation/deletion/renaming in(from,to) this directory durable.
@@ -1531,4 +1531,23 @@ 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
+
#endif /* my_global_h */