From 25f04a68a168a948783618910e115316eb0ed3fc Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Mon, 11 Mar 2013 18:57:22 +0100 Subject: ape: threadsafe errno store errno on the private process stack so its always per process and not just per memory space. errno itself becomes a macro dereferencing int *_errnoloc; which is initialized from main9.s pointing to the private stack location. various fixes in programs that just imported errno variable with "extern int errno;" instead of including . --- sys/src/cmd/eqn/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sys/src/cmd/eqn/main.c') diff --git a/sys/src/cmd/eqn/main.c b/sys/src/cmd/eqn/main.c index 879b979e5..a0654d867 100644 --- a/sys/src/cmd/eqn/main.c +++ b/sys/src/cmd/eqn/main.c @@ -1,4 +1,5 @@ #include "e.h" +#include #define MAXLINE 3600 /* maximum input line */ @@ -92,7 +93,6 @@ getdata(void) { int i, type, ln; char fname[100]; - extern int errno; errno = 0; curfile->lineno = 0; -- cgit v1.2.3