summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorunknown <knielsen@knielsen-hq.org>2009-11-06 18:22:32 +0100
committerunknown <knielsen@knielsen-hq.org>2009-11-06 18:22:32 +0100
commitad368a2b54f4177daf5abd17fa7533f1626f6feb (patch)
treec762060dc3c06f7b35460ef22fecc08cf8adee55 /include
parent716c09936365c9cfeb2304ca54ffdd95c1031c6e (diff)
parenta6793a48e20c2aebb1391e2f4f916cf147ff1900 (diff)
downloadmariadb-git-ad368a2b54f4177daf5abd17fa7533f1626f6feb.tar.gz
Merge Mysql 5.1.39 merge into MariaDB trunk
Diffstat (limited to 'include')
-rw-r--r--include/my_global.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/include/my_global.h b/include/my_global.h
index 597a3a803c1..ef056d0249c 100644
--- a/include/my_global.h
+++ b/include/my_global.h
@@ -578,6 +578,25 @@ int __void__;
#define IF_VALGRIND(A,B) (B)
#endif
+/*
+ Suppress uninitialized variable warning without generating code.
+
+ The _cplusplus is a temporary workaround for C++ code pending a fix
+ for a g++ bug (http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34772).
+*/
+#if defined(_lint) || defined(FORCE_INIT_OF_VARS) || defined(__cplusplus) || \
+ !defined(__GNUC__)
+#define UNINIT_VAR(x) x= 0
+#else
+#define UNINIT_VAR(x) x= x
+#endif
+
+/* Define some useful general macros */
+#if !defined(max)
+#define max(a, b) ((a) > (b) ? (a) : (b))
+#define min(a, b) ((a) < (b) ? (a) : (b))
+#endif
+
#if !defined(HAVE_UINT)
#undef HAVE_UINT
#define HAVE_UINT