From 528fccade9ca5f90db376e08b2cb85b3fc822a45 Mon Sep 17 00:00:00 2001 From: rpj Date: Tue, 19 Jun 2001 04:49:08 +0000 Subject: * Made organisational-only changes to UWIN additions. * dll.c (dllMain): Moved UWIN process attach code to pthread_win32_process_attach_np(); moved instance of pthread_count to global.c. * global.c (pthread_count): Moved from dll.c. * nonportable.c (pthread_win32_process_attach_np): Moved _UWIN code to here from dll.c. * implement.h (pthread_count): Define extern int. * create.c (pthread_count): Remove extern int. * private.c (pthread_count): Likewise. * exit.c (pthread_count): Likewise. Contributed by - David Korn * dll.c: Added changes necessary to work with UWIN. * create.c: Likewise. * pthread.h: Likewise. * misc.c: Likewise. * exit.c: Likewise. * private.c: Likewise. * implement.h: Likewise. There is some room at the start of struct pthread_t_ to implement the signal semantics in UWIN's posix.dll although this is not yet complete. * Nmakefile: Compatible with UWIN's Nmake utility. * Nmakefile.tests: Likewise - for running the tests. --- pthread.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'pthread.h') diff --git a/pthread.h b/pthread.h index bf9e970..d4cfd13 100644 --- a/pthread.h +++ b/pthread.h @@ -22,6 +22,13 @@ #if !defined( PTHREAD_H ) #define PTHREAD_H +#ifdef _UWIN +# define HAVE_STRUCT_TIMESPEC 1 +# define HAVE_SIGNAL_H 1 +# undef HAVE_CONFIG_H +# pragma comment(lib, "pthread") +#endif + /* * ------------------------------------------------------------- * @@ -304,6 +311,9 @@ extern "C" #define PTHREAD_THREADS_MAX 2019 +#ifdef _UWIN +# include +#else typedef struct pthread_t_ *pthread_t; typedef struct pthread_attr_t_ *pthread_attr_t; typedef struct pthread_once_t_ pthread_once_t; @@ -312,6 +322,7 @@ typedef struct pthread_mutex_t_ *pthread_mutex_t; typedef struct pthread_mutexattr_t_ *pthread_mutexattr_t; typedef struct pthread_cond_t_ *pthread_cond_t; typedef struct pthread_condattr_t_ *pthread_condattr_t; +#endif typedef struct pthread_rwlock_t_ *pthread_rwlock_t; typedef struct pthread_rwlockattr_t_ *pthread_rwlockattr_t; @@ -853,6 +864,7 @@ int pthreadCancelableTimedWait (HANDLE waitHandle, DWORD timeout); /* * Thread-Safe C Runtime Library Mappings. */ +#ifndef _UWIN #if 1 #if (! defined(HAVE_ERRNO)) && (! defined(_REENTRANT)) && (! defined(_MT)) int * _errno( void ); @@ -866,6 +878,7 @@ int * _errno( void ); #endif #endif #endif +#endif /* * WIN32 C runtime library had been made thread-safe -- cgit v1.2.3