Subject: lib/9496: intro.2 still says "extern int errno"
To: None <gnats-bugs@gnats.netbsd.org>
From: Jun-ichiro itojun Hagino <itojun@itojun.org>
List: netbsd-bugs
Date: 02/26/2000 20:18:33
>Number:         9496
>Category:       lib
>Synopsis:       intro.2 still says "extern int errno"
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    lib-bug-people (Library Bug People)
>State:          open
>Class:          doc-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Feb 26 20:18:00 2000
>Last-Modified:
>Originator:     Jun-ichiro itojun Hagino
>Organization:
	itojun.org
>Release:        NetBSD-current of Feb 26 2000
>Environment:

NetBSD starfruit.itojun.org 1.4T NetBSD 1.4T (STARFRUIT) #120: Sun Feb 27 01:28:17 JST 2000     itojun@starfruit.itojun.org:/usr/home/itojun/NetBSD/src/sys/arch/i386/compile/STARFRUIT i386

>Description:
	intro.2 says:

	Nearly all of the system calls provide an error number in the external
	variable errno, which is defined as:
		extern int errno;

	while errno is now a wrapper function for thread safeness.
	it may confuse users, or take the above as example and define extern
	reference by her own (not including <errno.h>).

>How-To-Repeat:
	man 2 intro
>Fix:
	don't know.  For example, this is freebsd-current intro.2:

     Nearly all of the system calls provide an error number referenced via the
     external identifier errno. This identifier is defined in <sys/errno.h> as

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

     The __error() function returns a pointer to a field in the thread specif-
     ic structure for threads other than the initial thread. For the initial
     thread and non-threaded processes, __error() returns a pointer to a glob-
     al errno variable that is compatible with the previous definition.

>Audit-Trail:
>Unformatted: