Subject: Re: The sys_errlist[] screw
To: None <tech-userlevel@NetBSD.ORG>
From: Charles M. Hannum <>
List: tech-userlevel
Date: 02/21/1998 17:58:58
> Do the symbol renaming hack for both sys_errlist and sys_nerr, making
> the new version of sys_errlist a *pointer* to the table (i.e. a `char
> **').  Any application using sys_errlist[] that was compiled before
> this change or does not use errno.h, will not be able to see the
> messages for new errors.  Any application using strerror() or which is
> compiled afterwards and uses sys_errlist[] will DTRT.  By making the
> new version a pointer, entries can be added later without the problem
> recurring.

BTW, there's a subtlety here I should point out:

Even with this change, an application explicitly referring to sys_nerr
will have the value copied into its data segment.  Said application
will never be able to see new error strings unless it is recompiled.