From 5ad9bc631048467dba8964ab840a71990aabeae3 Mon Sep 17 00:00:00 2001 From: rpj Date: Tue, 6 Apr 1999 22:02:54 +0000 Subject: Wed Apr 7 14:09:52 1999 Ross Johnson * errno.c (_REENTRANT || _MT): Invert #if condition. * pthread.h (_errno): Conditionally include prototype. --- errno.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'errno.c') diff --git a/errno.c b/errno.c index e6cf5e7..69fdddd 100644 --- a/errno.c +++ b/errno.c @@ -24,7 +24,7 @@ * MA 02111-1307, USA */ -#if defined( _REENTRANT ) || defined( _MT ) +#if ! defined( _REENTRANT ) && ! defined( _MT ) #include "pthread.h" #include "implement.h" @@ -45,8 +45,7 @@ static int reallyBad = ENOMEM; * it on thread termination. We get all that for free * by simply storing the errno on the pthread_t structure. * - * Relies on the following being defined in errno.h: - * (true for MSVC and Mingw32 I think) + * MSVC and Mingw32 already have there own thread-safe errno. * * #if defined( _REENTRANT ) || defined( _MT ) * #define errno *_errno() @@ -54,7 +53,7 @@ static int reallyBad = ENOMEM; * int *_errno( void ); * #else * extern int errno; - * #endif /* _REENTRANT */ + * #endif * */ @@ -80,8 +79,4 @@ int * _errno( void ) } /* _errno */ -#else - -#error "errno: Not thread-safe." - -#endif /* _REENTRANT || _MT */ +#endif /* !_REENTRANT && !_MT */ -- cgit v1.2.3