summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrpj <rpj>2000-09-13 01:21:11 +0000
committerrpj <rpj>2000-09-13 01:21:11 +0000
commit548fc29a8cc3fd016eba997facc9566af8fd2d75 (patch)
tree96e67d9961dcd050737fa63f27e390ffec67ac2c
parent63c486d6444d718e6fe5d785821874739e0f50f7 (diff)
2000-09-13 Ross Johnson <rpj@setup1.ise.canberra.edu.au>
* mutex.c (pthread_mutex_init): Call TryEnterCriticalSection through the pointer rather than directly so that the dll can load on Windows versions that can't resolve the function, eg. Windows 95 - "Jef Gearhart" <jgearhart@tpssys.com>
-rw-r--r--ChangeLog9
-rw-r--r--mutex.c2
2 files changed, 10 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 2197a8e..5bb5109 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2000-09-13 Ross Johnson <rpj@setup1.ise.canberra.edu.au>
+
+ * mutex.c (pthread_mutex_init): Call
+ TryEnterCriticalSection through the pointer
+ rather than directly so that the dll can load
+ on Windows versions that can't resolve the
+ function, eg. Windows 95
+ - "Jef Gearhart" <jgearhart@tpssys.com>
+
2000-09-08 Ross Johnson <rpj@special.ise.canberra.edu.au>
* GNUmakefile(_WIN32_WINNT=0x400): Define in CFLAGS;
diff --git a/mutex.c b/mutex.c
index 8da2891..091c61e 100644
--- a/mutex.c
+++ b/mutex.c
@@ -153,7 +153,7 @@ pthread_mutex_init(pthread_mutex_t *mutex, const pthread_mutexattr_t *attr)
* Check that it works ok - since InitializeCriticalSection doesn't
* return success or failure.
*/
- if (TryEnterCriticalSection(&mx->cs))
+ if ((*ptw32_try_enter_critical_section)(&mx->cs))
{
LeaveCriticalSection(&mx->cs);
}