summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorjb <jb@FreeBSD.org>1998-04-30 09:38:03 +0000
committerjb <jb@FreeBSD.org>1998-04-30 09:38:03 +0000
commit0e07a10674d32f8462443fd28f02ca71927dca4d (patch)
treeba4d11d5601c2c6554f9e9ed489d65e38d14c3b5 /sys
parentae9a13b7c7848f8fd7d426888e36b3d6ce0ef960 (diff)
downloadFreeBSD-src-0e07a10674d32f8462443fd28f02ca71927dca4d.zip
FreeBSD-src-0e07a10674d32f8462443fd28f02ca71927dca4d.tar.gz
Make errno finally and permanently thread-aware so that it is no longer
necessary to compile with _THREAD_SAFE defined. This means that people will get thread-aware code whether they like it or not. This change is required to allow a process to link against libpthread and libc to use kernel threads (and prevent each thread from clobbering another thread's errno just be doing a syscall). This is bound to break some ports, but it is strictly allowed by ANSI C, so anything that breaks as a result was already broken anyway 8-). "Sorry".
Diffstat (limited to 'sys')
-rw-r--r--sys/sys/errno.h6
1 files changed, 1 insertions, 5 deletions
diff --git a/sys/sys/errno.h b/sys/sys/errno.h
index 91a9179..0430bfe 100644
--- a/sys/sys/errno.h
+++ b/sys/sys/errno.h
@@ -36,22 +36,18 @@
* SUCH DAMAGE.
*
* @(#)errno.h 8.5 (Berkeley) 1/21/94
- * $Id: errno.h,v 1.8 1997/12/06 11:28:06 bde Exp $
+ * $Id: errno.h,v 1.9 1998/04/13 17:45:00 sos Exp $
*/
#ifndef _SYS_ERRNO_H_
#define _SYS_ERRNO_H_
#ifndef KERNEL
-#ifdef _THREAD_SAFE
#include <sys/cdefs.h>
__BEGIN_DECLS
int * __error __P((void));
__END_DECLS
#define errno (* __error())
-#else
-extern int errno; /* global error number */
-#endif
#endif
#define EPERM 1 /* Operation not permitted */
OpenPOWER on IntegriCloud