From cb05db9044ede1192aab44e5bd09561ee48c9146 Mon Sep 17 00:00:00 2001 From: rpj Date: Fri, 1 Jul 2011 15:29:21 +0000 Subject: See the ChangeLog --- ChangeLog | 6 ++++++ implement.h | 4 ++++ pthread.h | 1 - pthread_win32_attach_detach_np.c | 3 +++ ptw32_threadStart.c | 4 ++++ ptw32_throw.c | 4 ++++ 6 files changed, 21 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index fe9bbe7..75abe8a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -10,6 +10,12 @@ LONG for 32 bit systems and LONGLONG for 64 bit systems. * implement.h (MCS locks): nextFlag and waitFlag are now HANDLE type. * ptw32_MCS_locks.c: Likewise. + * pthread_win32_attach_detach_np.c: Set the DLL search path to exclude + the "current idrectory". + * pthread.h (#include ): Removed. + * ptw32_throw.c (#include ): Added. + * ptw32_threadStart.c (#include ): Added. + * implement.h (#include ): Added. 2011-06-30 Ross Johnson diff --git a/implement.h b/implement.h index 7a3e0a2..bae4bff 100644 --- a/implement.h +++ b/implement.h @@ -68,6 +68,10 @@ typedef VOID (APIENTRY *PAPCFUNC)(DWORD dwParam); #include #endif +#if defined(__CLEANUP_C) +# include +#endif + #if !defined(INT_MAX) #include #endif diff --git a/pthread.h b/pthread.h index acb3775..9a19788 100644 --- a/pthread.h +++ b/pthread.h @@ -225,7 +225,6 @@ typedef unsigned long ULONG_PTR; #include #endif /* HAVE_SIGNAL_H */ -#include #include /* diff --git a/pthread_win32_attach_detach_np.c b/pthread_win32_attach_detach_np.c index bd52a7f..f8940e5 100644 --- a/pthread_win32_attach_detach_np.c +++ b/pthread_win32_attach_detach_np.c @@ -67,6 +67,7 @@ pthread_win32_process_attach_np () /* * Load QUSEREX.DLL and try to get address of QueueUserAPCEx */ + SetDllDirectory(""); /* Don't search in current directory */ ptw32_h_quserex = LoadLibrary (TEXT ("QUSEREX.DLL")); if (ptw32_h_quserex != NULL) @@ -112,6 +113,8 @@ pthread_win32_process_attach_np () } } + SetDllDirectory(NULL); /* Reset DLL search path to default */ + if (ptw32_h_quserex) { ptw32_features |= PTW32_ALERTABLE_ASYNC_CANCEL; diff --git a/ptw32_threadStart.c b/ptw32_threadStart.c index 3315972..cb08403 100644 --- a/ptw32_threadStart.c +++ b/ptw32_threadStart.c @@ -39,6 +39,10 @@ #include "implement.h" #include +#if defined(__CLEANUP_C) +# include +#endif + #if defined(__CLEANUP_SEH) static DWORD diff --git a/ptw32_throw.c b/ptw32_throw.c index 4846306..1404e94 100644 --- a/ptw32_throw.c +++ b/ptw32_throw.c @@ -38,6 +38,10 @@ #include "pthread.h" #include "implement.h" +#if defined(__CLEANUP_C) +# include +#endif + /* * ptw32_throw * -- cgit v1.2.3