summaryrefslogtreecommitdiff
path: root/include/my_global.h
diff options
context:
space:
mode:
authorunknown <guilhem@gbichot3.local>2006-12-18 21:04:35 +0100
committerunknown <guilhem@gbichot3.local>2006-12-18 21:04:35 +0100
commit51bb36a0e2200a56d7dc9cb83b79c81f996a00d9 (patch)
tree7a864dde21704080d6914c9071db33518e42aa4e /include/my_global.h
parentf7e7f20ba8df2767ca057510793bc523e88489d9 (diff)
parent7199c905590391f64802913369aab7d288eff4c8 (diff)
downloadmariadb-git-51bb36a0e2200a56d7dc9cb83b79c81f996a00d9.tar.gz
Merge gbichot3.local:/home/mysql_src/mysql-5.1-clean
into gbichot3.local:/home/mysql_src/mysql-maria BitKeeper/etc/ignore: auto-union BUILD/SETUP.sh: Auto merged Makefile.am: Auto merged config/ac-macros/plugins.m4: Auto merged configure.in: Auto merged include/Makefile.am: Auto merged include/my_base.h: Auto merged include/my_dbug.h: Auto merged include/my_global.h: Auto merged include/my_sys.h: Auto merged libmysqld/Makefile.am: Auto merged mysql-test/mysql-test-run.pl: Auto merged mysys/Makefile.am: Auto merged mysys/my_pread.c: Auto merged sql/Makefile.am: Auto merged sql/handler.h: Auto merged sql/item_func.cc: Auto merged sql/item_func.h: Auto merged sql/log.cc: Auto merged sql/mysql_priv.h: Auto merged sql/set_var.cc: Auto merged sql/sql_class.h: Auto merged sql/sql_parse.cc: Auto merged sql/sql_select.cc: Auto merged sql/unireg.cc: Auto merged storage/csv/ha_tina.cc: Auto merged storage/myisam/ha_myisam.cc: Auto merged storage/myisam/ha_myisam.h: Auto merged storage/myisam/mi_open.c: Auto merged storage/myisam/mi_packrec.c: Auto merged storage/myisam/mi_range.c: Auto merged storage/myisam/myisampack.c: Auto merged storage/myisam/sort.c: Auto merged storage/myisammrg/ha_myisammrg.h: Auto merged unittest/mytap/tap.c: Auto merged include/myisam.h: merge sql/mysqld.cc: merge storage/myisam/mi_check.c: merge storage/myisam/myisamdef.h: merge
Diffstat (limited to 'include/my_global.h')
-rw-r--r--include/my_global.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/include/my_global.h b/include/my_global.h
index a7ec41068b3..2434208e23f 100644
--- a/include/my_global.h
+++ b/include/my_global.h
@@ -192,6 +192,8 @@
#endif
#undef inline_test_2
#undef inline_test_1
+/* helper macro for "instantiating" inline functions */
+#define STATIC_INLINE static inline
/*
The following macros are used to control inlining a bit more than
@@ -426,6 +428,14 @@ C_MODE_END
*/
#include <assert.h>
+/* an assert that works at compile-time. only for constant expression */
+#define compile_time_assert(X) \
+ do \
+ { \
+ char compile_time_assert[(X) ? 1 : -1] \
+ __attribute__ ((unused)); \
+ } while(0)
+
/* Go around some bugs in different OS and compilers */
#if defined (HPUX11) && defined(_LARGEFILE_SOURCE)
#define _LARGEFILE64_SOURCE
@@ -970,6 +980,14 @@ typedef unsigned __int64 my_ulonglong;
typedef unsigned long long my_ulonglong;
#endif
+#if SIZEOF_CHARP == SIZEOF_INT
+typedef int intptr;
+#elif SIZEOF_CHARP == SIZEOF_LONG
+typedef long intptr;
+#else
+#error
+#endif
+
#ifdef USE_RAID
/*
The following is done with a if to not get problems with pre-processors
@@ -1465,4 +1483,12 @@ do { doubleget_union _tmp; \
#define dlerror() ""
#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.
+*/
+#ifdef TARGET_OS_LINUX
+#define NEED_EXPLICIT_SYNC_DIR 1
+#endif
+
#endif /* my_global_h */