summaryrefslogtreecommitdiff
path: root/mysys/waiting_threads.c
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mysql.com>2008-10-21 20:10:49 +0200
committerSergei Golubchik <serg@mysql.com>2008-10-21 20:10:49 +0200
commita58d20053dbd9192905bb4525f089a32f16b88f5 (patch)
treea66fe1250952b215446ba4d41adb700fc3880f95 /mysys/waiting_threads.c
parentf8fc47f062c0b30ecf491cd1e4e9eeba84565044 (diff)
downloadmariadb-git-a58d20053dbd9192905bb4525f089a32f16b88f5.tar.gz
win32: compilation failures, maria.test failure
include/my_global.h: enable compile_time_assert for all compilers include/waiting_threads.h: 1. don't #extern "C" system includes, they don't like it. 2. remove any padding from WT_RESOURCE_ID structure - we want to compare it with memcmp mysys/waiting_threads.c: assert that WT_RESOURCE_ID can be compared with memcmp and has no random padding bytes
Diffstat (limited to 'mysys/waiting_threads.c')
-rw-r--r--mysys/waiting_threads.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/mysys/waiting_threads.c b/mysys/waiting_threads.c
index 255317ea4cc..489be6edbad 100644
--- a/mysys/waiting_threads.c
+++ b/mysys/waiting_threads.c
@@ -347,6 +347,8 @@ void wt_thd_destroy(WT_THD *thd)
*/
int wt_resource_id_memcmp(void *a, void *b)
{
+ /* assert that the structure is not padded with random bytes */
+ compile_time_assert(sizeof(WT_RESOURCE_ID)==sizeof(ulonglong)+sizeof(void*));
return memcmp(a, b, sizeof(WT_RESOURCE_ID));
}