diff options
author | acurtis/antony@ltamd64.xiphis.org <> | 2007-05-04 23:35:14 -0700 |
---|---|---|
committer | acurtis/antony@ltamd64.xiphis.org <> | 2007-05-04 23:35:14 -0700 |
commit | a4dbc0990cc2f89a1b7f256f6d1d838f25f070c4 (patch) | |
tree | 56b4a36694de3fd3fdb494ae00d38cd3f38d7c3d /include/my_global.h | |
parent | 5558019733b64303837c6428a215d69f21bdf971 (diff) | |
parent | 0f0ef2fe14dd3082808b767abb6a995f255183c5 (diff) | |
download | mariadb-git-a4dbc0990cc2f89a1b7f256f6d1d838f25f070c4.tar.gz |
Merge xiphis.org:/home/antony/work2/mysql-5.1-engines
into xiphis.org:/home/antony/work2/mysql-5.1-engines.merge
Diffstat (limited to 'include/my_global.h')
-rw-r--r-- | include/my_global.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/my_global.h b/include/my_global.h index 71a2d087a43..b78c7120565 100644 --- a/include/my_global.h +++ b/include/my_global.h @@ -465,6 +465,18 @@ C_MODE_END */ #include <assert.h> +/* an assert that works at compile-time. only for constant expression */ +#ifndef __GNUC__ +#define compile_time_assert(X) do { } while(0) +#else +#define compile_time_assert(X) \ + do \ + { \ + char compile_time_assert[(X) ? 1 : -1] \ + __attribute__ ((unused)); \ + } while(0) +#endif + /* Go around some bugs in different OS and compilers */ #if defined (HPUX11) && defined(_LARGEFILE_SOURCE) #define _LARGEFILE64_SOURCE |