From c1f7196a3b1d069248c8155e593b53ae44b24c62 Mon Sep 17 00:00:00 2001 From: rpj Date: Tue, 22 Aug 2000 08:28:24 +0000 Subject: 2000-08-22 Ross Johnson * private.c (ptw32_throw): Fix exception test; move exceptionInformation declaration. * tsd.c (pthread_key_create): newkey wrongly declared. * pthread.h: Fix comment block. --- ChangeLog | 11 ++++++++++- private.c | 10 +++++++--- pthread.h | 2 +- tsd.c | 2 +- 4 files changed, 19 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7c6b731..447bc68 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,13 @@ -2000-08-18 Ross Johnson +2000-08-22 Ross Johnson + + * private.c (ptw32_throw): Fix exception test; + move exceptionInformation declaration. + + * tsd.c (pthread_key_create): newkey wrongly declared. + + * pthread.h: Fix comment block. + +2000-08-18 Ross Johnson * mutex.c (pthread_mutex_destroy): Check that the mutex isn't held; invalidate the mutex as early as possible to avoid diff --git a/private.c b/private.c index 905a7f6..37cb910 100644 --- a/private.c +++ b/private.c @@ -824,7 +824,13 @@ ptw32_get_exception_services_code(void) void ptw32_throw(DWORD exception) { - if (exception != PTW32_EPS_CANCEL || +#if defined(_MSC_VER) && !defined(__cplusplus) + + DWORD exceptionInformation[3]; + +#endif + + if (exception != PTW32_EPS_CANCEL && exception != PTW32_EPS_EXIT) { /* Should never enter here */ @@ -833,8 +839,6 @@ ptw32_throw(DWORD exception) #if defined(_MSC_VER) && !defined(__cplusplus) - DWORD exceptionInformation[3]; - exceptionInformation[0] = (DWORD) (exception); exceptionInformation[1] = (DWORD) (0); exceptionInformation[2] = (DWORD) (0); diff --git a/pthread.h b/pthread.h index ead9424..7f43f43 100644 --- a/pthread.h +++ b/pthread.h @@ -984,7 +984,7 @@ class ptw32_exception_exit : public ptw32_exception {}; #ifndef PTW32_BUILD /* FIXME: This is only required if the library was built using SEH */ - * +/* * Get internal SEH tag */ DWORD ptw32_get_exception_services_code(void); diff --git a/tsd.c b/tsd.c index 491769f..cd80ff9 100644 --- a/tsd.c +++ b/tsd.c @@ -64,7 +64,7 @@ pthread_key_create (pthread_key_t * key, void (*destructor) (void *)) */ { int result = 0; - pthread_key_t *newkey; + pthread_key_t newkey; if ((newkey = (pthread_key_t) calloc (1, sizeof (*newkey))) == NULL) { -- cgit v1.2.3