NetBSD Problem Report #1064
From gnats Fri May 19 00:34:52 1995
Received: from pain.lcs.mit.edu (pain.lcs.mit.edu [128.52.46.239]) by sun-lamp.cs.berkeley.edu (8.6.10/8.6.10) with ESMTP id AAA05462 for <gnats-bugs@sun-lamp.cs.berkeley.edu>; Fri, 19 May 1995 00:34:51 -0700
Message-Id: <199505190735.DAA06580@lola-granola.MIT.EDU>
Date: Fri, 19 May 1995 03:35:31 -0400
From: jhawk@mit.edu (John Hawkinson)
To: gnats-bugs@NetBSD.ORG
Subject: sys_errlist and sys_nerr are not documented
X-Send-Pr-Version: 3.2
>Number: 1064
>Category: lib
>Synopsis: sys_errlist and sys_nerr are not documented
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: lib-bug-people
>State: closed
>Class: doc-bug
>Submitter-Id: net
>Arrival-Date: Fri May 19 00:35:01 +0000 1995
>Closed-Date: Thu Apr 10 15:59:20 +0000 1997
>Last-Modified: Thu Apr 10 16:00:20 +0000 1997
>Originator: John Hawkinson
>Release: Fri May 19 03:28:38 EDT 1995
>Organization:
MIT SIPB
>Environment:
System: NetBSD lola-granola 1.0A NetBSD 1.0A (LOLA) #14: Thu May 18 15:17:31 EDT 1995 mycroft@limekiller:/afs/sipb.mit.edu/system/i386_nbsd1/usr/src/sys/arch/i386/compile/LOLA i386
>Description:
sys_errlist and sys_nerr are not documented.
Makefile.inc also needs a $NetBSD$
>How-To-Repeat:
>Fix:
Taking the example of psignal(3), I've added them
to the perror(3) man page (rather than either strerror(3) or
their own man page). It should be noted that sys_errlist(3) is
referenced in strerror(3).
*** perror.3 1995/05/19 07:22:32 1.1
--- /usr/src/lib/libc/stdio/perror.3 1995/05/19 07:27:19 1.2
***************
*** 37,52 ****
.\"
.\" @(#)strerror.3 6.9 (Berkeley) 6/29/91
.\"
! .Dd June 29, 1991
.Dt PERROR 3
.Os BSD 4
.Sh NAME
! .Nm perror
! .Nd write error messages to standard error
.Sh SYNOPSIS
.Fd #include <stdio.h>
.Ft void
.Fn perror "const char *string"
.Sh DESCRIPTION
The
.Fn perror
--- 37,56 ----
.\"
.\" @(#)strerror.3 6.9 (Berkeley) 6/29/91
.\"
! .Dd May 19, 1995
.Dt PERROR 3
.Os BSD 4
.Sh NAME
! .Nm perror ,
! .Nm sys_errlist ,
! .Nm sys_nerr
! .Nd system error messages
.Sh SYNOPSIS
.Fd #include <stdio.h>
.Ft void
.Fn perror "const char *string"
+ .Vt extern const char *sys_errlist[];
+ .Vt extern int sys_nerr;
.Sh DESCRIPTION
The
.Fn perror
***************
*** 71,76 ****
--- 75,89 ----
.Fn strerror
with argument
.Fa errno .
+ .Pp
+ The message strings can be accessed directly using the external array
+ .Va sys_errlist ,
+ indexed by
+ .Va errno
+ numbers. The external variable
+ .Va sys_nerr
+ contains a count of the strings in
+ .Va sys_errlist .
.Sh SEE ALSO
.Xr intro 2 ,
.Xr psignal 3 ,
*** Makefile.inc Fri May 19 03:33:02 1995
--- /usr/src/lib/libc/stdio/Makefile.inc Fri May 19 03:32:31 1995
***************
*** 1,5 ****
# from: @(#)Makefile.inc 5.7 (Berkeley) 6/27/91
! # $Id: Makefile.inc,v 1.10 1995/02/25 17:06:28 cgd Exp $
# stdio sources
.PATH: ${.CURDIR}/stdio
--- 1,5 ----
# from: @(#)Makefile.inc 5.7 (Berkeley) 6/27/91
! # $NetBSD: Makefile.inc,v 1.10 1995/02/25 17:06:28 cgd Exp $
# stdio sources
.PATH: ${.CURDIR}/stdio
***************
*** 31,36 ****
--- 31,37 ----
MLINKS+=funopen.3 fropen.3 funopen.3 fwopen.3
MLINKS+=getc.3 fgetc.3 getc.3 getchar.3 getc.3 getw.3
MLINKS+=mktemp.3 mkstemp.3
+ MLINKS+=perror.3 sys_errlist.3 sys_nerr.3
MLINKS+=printf.3 fprintf.3 printf.3 snprintf.3 printf.3 sprintf.3 \
printf.3 vfprintf.3 printf.3 vprintf.3 printf.3 vsnprintf.3 \
printf.3 vsprintf.3
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->analyzed
State-Changed-By: jtc
State-Changed-When: Mon Jul 3 18:33:38 1995
State-Changed-Why:
I think that not documenting sys_errlist and sys_nerr is a good thing,
since they are obsolete interfaces that should no longer be used.
Many commercial OS' are no longer documenting them either.
However, the cross reference to sys_errlist is definately a bug, one
I'll fix shortly.
State-Changed-From-To: analyzed->closed
State-Changed-By: is
State-Changed-When: Thu Apr 10 08:59:20 PDT 1997
State-Changed-Why:
The bogus sys_errlist(3) cross reference was removed nearly two years ago.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.