From 548fc29a8cc3fd016eba997facc9566af8fd2d75 Mon Sep 17 00:00:00 2001 From: rpj Date: Wed, 13 Sep 2000 01:21:11 +0000 Subject: 2000-09-13 Ross Johnson * 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" --- ChangeLog | 9 +++++++++ mutex.c | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 2197a8e..5bb5109 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2000-09-13 Ross Johnson + + * 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" + 2000-09-08 Ross Johnson * 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); } -- cgit v1.2.3