summaryrefslogtreecommitdiff
path: root/errno.c
diff options
context:
space:
mode:
authorrpj <rpj>1999-04-06 22:02:54 +0000
committerrpj <rpj>1999-04-06 22:02:54 +0000
commit5ad9bc631048467dba8964ab840a71990aabeae3 (patch)
treee1d0a9bb098ab9d46ed460b0343a9792e38355aa /errno.c
parent5d920cbde2800a019934b7a3748c7afc070a3505 (diff)
Wed Apr 7 14:09:52 1999 Ross Johnson <rpj@swan.canberra.edu.au>snap-1999-04-07
* errno.c (_REENTRANT || _MT): Invert #if condition. * pthread.h (_errno): Conditionally include prototype.
Diffstat (limited to 'errno.c')
-rw-r--r--errno.c13
1 files changed, 4 insertions, 9 deletions
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 */