# HG changeset patch # User bsmith@81767d24-ef19-dc11-ae90-00e081727c95 # Date 1378757023 0 # Node ID 0df3fc47002e9a56ba41d1e88ba04c1357e13ff2 # Parent 09860ba329a4a3e8055c76f35928c3baed29e6f7 Fix build issues with last commit on OS/2... Compile error with VAC and GCC... additionally... Watcom does not support _threadstore() so currently Watcom builds will leak anchor block and message queue handles when threads terminate, looking for a fix. Also fixed a minor warning with GCC. diff -r 09860ba329a4 -r 0df3fc47002e os2/dw.c --- a/os2/dw.c Mon Sep 09 19:18:36 2013 +0000 +++ b/os2/dw.c Mon Sep 09 20:03:43 2013 +0000 @@ -10457,7 +10457,6 @@ void API dw_container_delete_row_by_data(HWND handle, void *data) { PRECORDCORE pCore = WinSendMsg(handle, CM_QUERYRECORD, (MPARAM)0L, MPFROM2SHORT(CMA_FIRST, CMA_ITEMORDER)); - int textcomp = DW_POINTER_TO_INT(dw_window_get_data(handle, "_dw_textcomp")); while(pCore) { @@ -11922,13 +11921,15 @@ { HAB thishab = WinInitialize(0); HMQ thishmq = WinCreateMsgQueue(thishab, 0); +#ifndef __WATCOMC__ void **threadinfo = (void **)malloc(sizeof(void *) * 2); - + threadinfo[0] = (void *)thishab; threadinfo[1] = (void *)thishmq; - _threadstore() = (void *)threadinfo; - + *_threadstore() = (void *)threadinfo; +#endif + #ifdef UNICODE /* Set the codepage to 1208 (UTF-8) */ WinSetCp(thishmq, 1208); @@ -11943,7 +11944,8 @@ */ void API _dw_deinit_thread(void) { - void **threadinfo = (void **)_threadstore(); +#ifndef __WATCOMC__ + void **threadinfo = (void **)*_threadstore(); if(threadinfo) { @@ -11954,6 +11956,7 @@ WinTerminate(thishab); free(threadinfo); } +#endif } /*