Subject: An errno for all seasons
To: None <tech-userlevel@NetBSD.ORG>
From: John Birrell <cimaxp1!jb@werple.net.au>
List: tech-userlevel
Date: 10/29/1995 11:33:18
G'day,

We're living with a threaded version of NetBSD's libc where errno is thread
specific. By changing errno.h to define errno as:

extern  int *__error();
#define errno (*__error())

we get the thread-specific functionality we require, provided that we compile
the source. This leaves us out in the cold when we try to use libraries built
by others.

Is there any support for NetBSD changing its definition of errno so that all
compiled code has a thread-safe errno?

This (obviously) affects errno.h and the few places in asm code where errno
is written (like cerror) and any files (such as stdio.h) where errno has been
separately defined as  'extern int'.

-- 
John Birrell                                CIMlogic Pty Ltd
jb@cimlogic.com.au                          119 Cecil Street
Ph  +61  3 9690 9600                        South Melbourne Vic 3205
Fax +61  3 9690 6650                        Australia
Mob +61 18  353  137