Subject: Re: sys_errlist definition
To: Curt Sampson <>
From: Chris G Demetriou <>
List: current-users
Date: 07/02/1996 08:18:15
> Now that sys_errlist is defined in errno.h, and defined correctly,
> a lot of non-ANSI programs break slightly when compiled because
> they also define it as just extern char * (without the const).
> What's the easiest and simplist way to determine, in the general
> case, whether one is running on a system that already has this
> defined? I'm currently using a #ifdef __NetBSD__ around the code,
> but I'd rather send back more general patches to the authors if I
> can, since I'm fairly certain this change needs to be made for
> FreeBSD and the like as well.

The problem with this is that NetBSD changed the location of the
errlist definition from its location in 4.4-Lite (and Lite-2)

In Lite, it was in <stdio.h>, but it was moved to <errno.h> in NetBSD.

So, in other words, unless the code in question uses bother <stdio.h>
and <errno.h>, you won't be able to safely do a 'general' (i.e. not
NetBSD specific) change...

I'll go on the record as saying that, though <errno.h> is probably a
better place for the defition, it was REALLY STUPID to lose source
code compatibility with other Lite-derived OSes to move the definition
into "a better place."

Virtually every package that i've seen which relied on the previous
'correct' way of fixing the problem on Lite-derived systems breaks
with NetBSD, with trivial but REALLY ANNOYING compile errors.

"stupid, stupid, stupid" especially since the "NetBSD API" which
had that definition in <stdio.h> had been around for a while.