Index: trunk/src/odincrt/critsect.cpp
===================================================================
--- trunk/src/odincrt/critsect.cpp	(revision 9329)
+++ trunk/src/odincrt/critsect.cpp	(revision 9331)
@@ -1,3 +1,3 @@
-/* $Id: critsect.cpp,v 1.5 2002-07-22 05:58:02 achimha Exp $ */
+/* $Id: critsect.cpp,v 1.6 2002-10-07 16:28:13 sandervl Exp $ */
 /*
  * Critical sections in the Win32 sense
@@ -72,5 +72,5 @@
  *           DosInitializeCriticalSection
  */
-VOID WIN32API DosInitializeCriticalSection(CRITICAL_SECTION_OS2 *crit, PSZ pszSemName)
+ULONG WIN32API DosInitializeCriticalSection(CRITICAL_SECTION_OS2 *crit, PSZ pszSemName)
 {
     APIRET rc;
@@ -85,6 +85,8 @@
         DebugInt3();
         crit->hmtxLock = 0;
+        return rc;
     }
     crit->Reserved       = GetCurrentProcessId();
+    return NO_ERROR;
 }
 
@@ -93,5 +95,5 @@
  *           DosAccessCriticalSection
  */
-VOID WIN32API DosAccessCriticalSection(CRITICAL_SECTION_OS2 *, PSZ pszSemName)
+ULONG WIN32API DosAccessCriticalSection(CRITICAL_SECTION_OS2 *, PSZ pszSemName)
 {
     HMTX   hmtxLock = 0;
@@ -100,5 +102,5 @@
     if(pszSemName == NULL) {
         DebugInt3();
-        return;
+        return ERROR_INVALID_PARAMETER;
     }
 
@@ -106,10 +108,12 @@
     if(rc != NO_ERROR) {
         DebugInt3();
-    }
+        return rc;
+    }
+    return NO_ERROR;
 }
 /***********************************************************************
  *           DosDeleteCriticalSection
  */
-void WIN32API DosDeleteCriticalSection( CRITICAL_SECTION_OS2 *crit )
+ULONG WIN32API DosDeleteCriticalSection( CRITICAL_SECTION_OS2 *crit )
 {
     if (crit->hmtxLock)
@@ -126,4 +130,5 @@
         crit->Reserved       = (DWORD)-1;
     }
+    return NO_ERROR;
 }
 
@@ -132,5 +137,5 @@
  *           DosEnterCriticalSection
  */
-void WIN32API DosEnterCriticalSection( CRITICAL_SECTION_OS2 *crit )
+ULONG WIN32API DosEnterCriticalSection( CRITICAL_SECTION_OS2 *crit, ULONG ulTimeout )
 {
     DWORD res;
@@ -151,5 +156,5 @@
         {
             crit->RecursionCount++;
-            return;
+            return NO_ERROR;
         }
         // do an atomic operation where we compare the owning thread id with 0
@@ -162,8 +167,8 @@
 
             /* Now wait for it */
-            APIRET rc = DosWaitEventSem(crit->hmtxLock, SEM_INDEFINITE_WAIT);
+            APIRET rc = DosWaitEventSem(crit->hmtxLock, ulTimeout);
             if(rc != NO_ERROR) {
                 DebugInt3();
-                return;
+                return rc;
             }
             DosResetEventSem(crit->hmtxLock, &ulnrposts);
@@ -175,4 +180,5 @@
     crit->OwningThread   = GetCurrentThreadId();
     crit->RecursionCount = 1;
+    return NO_ERROR;
 }
 
@@ -202,12 +208,15 @@
  *           DosLeaveCriticalSection
  */
-void WIN32API DosLeaveCriticalSection( CRITICAL_SECTION_OS2 *crit )
-{
-    if (crit->OwningThread != GetCurrentThreadId()) return;
+ULONG WIN32API DosLeaveCriticalSection( CRITICAL_SECTION_OS2 *crit )
+{
+    if (crit->OwningThread != GetCurrentThreadId()) {
+        DebugInt3();
+        return ERROR_INVALID_PARAMETER;
+    }
        
     if (--crit->RecursionCount)
     {
         DosInterlockedDecrement( &crit->LockCount );
-        return;
+        return NO_ERROR;
     }
     crit->OwningThread = 0;
@@ -217,3 +226,4 @@
         DosPostEventSem(crit->hmtxLock);
     }
-}
+    return NO_ERROR;
+}
Index: trunk/src/odincrt/odin36.def
===================================================================
--- trunk/src/odincrt/odin36.def	(revision 9329)
+++ trunk/src/odincrt/odin36.def	(revision 9331)
@@ -1,3 +1,3 @@
-; $Id: odin36.def,v 1.5 2002-04-07 14:35:25 sandervl Exp $
+; $Id: odin36.def,v 1.6 2002-10-07 16:28:13 sandervl Exp $
 ; Odin VAC++ 3.6.5 shared multithreaded runtime
 LIBRARY ODINCRT INITINSTANCE TERMINSTANCE
@@ -978,5 +978,5 @@
 
     _DosDeleteCriticalSection@4                        @1200 NONAME
-    _DosEnterCriticalSection@4                         @1201 NONAME
+    _DosEnterCriticalSection@8                         @1201 NONAME
     _DosInitializeCriticalSection@8                    @1202 NONAME
     _DosAccessCriticalSection@8                        @1203 NONAME
Index: trunk/src/odincrt/odin36d.def
===================================================================
--- trunk/src/odincrt/odin36d.def	(revision 9329)
+++ trunk/src/odincrt/odin36d.def	(revision 9331)
@@ -1,3 +1,3 @@
-; $Id: odin36d.def,v 1.5 2002-04-07 14:35:25 sandervl Exp $
+; $Id: odin36d.def,v 1.6 2002-10-07 16:28:14 sandervl Exp $
 ; Odin VAC++ 3.6.5 shared multithreaded runtime
 LIBRARY ODINCRTD INITINSTANCE TERMINSTANCE
@@ -986,5 +986,5 @@
 
     _DosDeleteCriticalSection@4                        @1200 NONAME
-    _DosEnterCriticalSection@4                         @1201 NONAME
+    _DosEnterCriticalSection@8                         @1201 NONAME
     _DosInitializeCriticalSection@8                    @1202 NONAME
     _DosAccessCriticalSection@8                        @1203 NONAME
Index: trunk/src/odincrt/odincrt.def
===================================================================
--- trunk/src/odincrt/odincrt.def	(revision 9329)
+++ trunk/src/odincrt/odincrt.def	(revision 9331)
@@ -1,3 +1,3 @@
-; $Id: odincrt.def,v 1.25 2002-04-07 14:35:25 sandervl Exp $
+; $Id: odincrt.def,v 1.26 2002-10-07 16:28:14 sandervl Exp $
 ; Odin VAC++ 3.08 shared multithreaded runtime
 LIBRARY ODINCRT INITINSTANCE TERMINSTANCE
@@ -956,5 +956,5 @@
 
     _DosDeleteCriticalSection@4                        @1200 NONAME
-    _DosEnterCriticalSection@4                         @1201 NONAME
+    _DosEnterCriticalSection@8                         @1201 NONAME
     _DosInitializeCriticalSection@8                    @1202 NONAME
     _DosAccessCriticalSection@8                        @1203 NONAME
Index: trunk/src/odincrt/odincrtd.def
===================================================================
--- trunk/src/odincrt/odincrtd.def	(revision 9329)
+++ trunk/src/odincrt/odincrtd.def	(revision 9331)
@@ -1,3 +1,3 @@
-; $Id: odincrtd.def,v 1.6 2002-04-07 14:35:26 sandervl Exp $
+; $Id: odincrtd.def,v 1.7 2002-10-07 16:28:14 sandervl Exp $
 ; Odin VAC++ 3.08 shared multithreaded runtime
 LIBRARY ODINCRTD INITINSTANCE TERMINSTANCE
@@ -958,5 +958,5 @@
 
     _DosDeleteCriticalSection@4                        @1200 NONAME
-    _DosEnterCriticalSection@4                         @1201 NONAME
+    _DosEnterCriticalSection@8                         @1201 NONAME
     _DosInitializeCriticalSection@8                    @1202 NONAME
     _DosAccessCriticalSection@8                        @1203 NONAME
Index: trunk/src/odincrt/odincrtp.def
===================================================================
--- trunk/src/odincrt/odincrtp.def	(revision 9329)
+++ trunk/src/odincrt/odincrtp.def	(revision 9331)
@@ -1,3 +1,3 @@
-; $Id: odincrtp.def,v 1.3 2002-04-07 14:35:26 sandervl Exp $
+; $Id: odincrtp.def,v 1.4 2002-10-07 16:28:15 sandervl Exp $
 ; Odin VAC++ 3.08 shared multithreaded runtime
 LIBRARY ODINCRTP INITINSTANCE TERMINSTANCE
@@ -979,5 +979,5 @@
 
     _DosDeleteCriticalSection@4                        @1200 NONAME
-    _DosEnterCriticalSection@4                         @1201 NONAME
+    _DosEnterCriticalSection@8                         @1201 NONAME
     _DosInitializeCriticalSection@8                    @1202 NONAME
     _DosAccessCriticalSection@8                        @1203 NONAME
