summaryrefslogtreecommitdiff
path: root/mysys/my_winthread.c
diff options
context:
space:
mode:
authorVladislav Vaintroub <wlad@mariadb.com>2017-09-19 17:45:17 +0000
committerVladislav Vaintroub <wlad@mariadb.com>2017-09-28 17:20:46 +0000
commiteba44874ca9fc317696630cb371623142289fa99 (patch)
treef67cd5dbcaf102abef2fb26f76357d14feaded04 /mysys/my_winthread.c
parentde7c2e5e545df90fc9814c60a8a5a8d20f22b2c3 (diff)
downloadmariadb-git-eba44874ca9fc317696630cb371623142289fa99.tar.gz
MDEV-13844 : Fix Windows warnings. Fix DBUG_PRINT.
- Fix win64 pointer truncation warnings (usually coming from misusing 0x%lx and long cast in DBUG) - Also fix printf-format warnings Make the above mentioned warnings fatal. - fix pthread_join on Windows to set return value.
Diffstat (limited to 'mysys/my_winthread.c')
-rw-r--r--mysys/my_winthread.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/mysys/my_winthread.c b/mysys/my_winthread.c
index 31385fad360..f3335621c38 100644
--- a/mysys/my_winthread.c
+++ b/mysys/my_winthread.c
@@ -121,6 +121,15 @@ int pthread_join(pthread_t thread, void **value_ptr)
goto error_return;
}
+ if (!GetExitCodeThread(handle, &ret))
+ {
+ errno= EINVAL;
+ goto error_return;
+ }
+
+ if (value_ptr)
+ *value_ptr= (void *)(size_t)ret;
+
CloseHandle(handle);
return 0;