Warn about references to the compatibility sys_errlist[] or sys_nerr, and
direct the user to include <errno.h> to generate the correct reference. Warn about references to the deprecated __sys_signame[] or __sys_nerr, and direct the user to include <errno.h> and use sys_errlist or sys_nerr instead.
This commit is contained in:
parent
7c8e3ebefb
commit
126eb1160e
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: errlist.c,v 1.9 1998/03/03 00:34:38 mycroft Exp $ */
|
||||
/* $NetBSD: errlist.c,v 1.10 1998/12/01 20:38:02 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1982, 1985, 1993
|
||||
@ -38,10 +38,20 @@
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)errlst.c 8.2 (Berkeley) 11/16/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: errlist.c,v 1.9 1998/03/03 00:34:38 mycroft Exp $");
|
||||
__RCSID("$NetBSD: errlist.c,v 1.10 1998/12/01 20:38:02 thorpej Exp $");
|
||||
#endif
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
__warn_references(sys_errlist,
|
||||
"warning: reference to compatibility sys_errlist[]; include <errno.h> for correct reference")
|
||||
__warn_references(__sys_errlist,
|
||||
"warning: reference to deprecated __sys_errlist[]; include <errno.h> and use sys_errlist")
|
||||
|
||||
__warn_references(sys_nerr,
|
||||
"warning: reference to compatibility sys_nerr; include <errno.h> for correct reference")
|
||||
__warn_references(__sys_nerr,
|
||||
"warning: reference to deprecated __sys_nerr; include <errno.h> and use sys_nerr")
|
||||
|
||||
const char *const _sys_errlist[] = {
|
||||
"Undefined error: 0", /* 0 - ENOERROR */
|
||||
"Operation not permitted", /* 1 - EPERM */
|
||||
|
Loading…
Reference in New Issue
Block a user