changeset 1888:0df3fc47002e

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.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Mon, 09 Sep 2013 20:03:43 +0000
parents 09860ba329a4
children fef27d312696
files os2/dw.c
diffstat 1 files changed, 8 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- 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
 }
 
 /*