From owner-freebsd-current Wed Mar 26 16:54:42 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id QAA18006 for current-outgoing; Wed, 26 Mar 1997 16:54:42 -0800 (PST) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id QAA18000 for ; Wed, 26 Mar 1997 16:54:38 -0800 (PST) Received: (from bde@localhost) by godzilla.zeta.org.au (8.8.5/8.6.9) id LAA00483; Thu, 27 Mar 1997 11:50:21 +1100 Date: Thu, 27 Mar 1997 11:50:21 +1100 From: Bruce Evans Message-Id: <199703270050.LAA00483@godzilla.zeta.org.au> To: bde@zeta.org.au, imp@village.org Subject: Re: make world fails on libmytinfo Cc: current@FreeBSD.org, helbig@MX.BA-Stuttgart.De Sender: owner-current@FreeBSD.org X-Loop: FreeBSD.org Precedence: bulk >: > /* for quit.c */ >: > extern int sys_nerr; >: >! #if __FreeBSD__ != 2 && __FreeBSD__ != 3 >: > extern char *sys_errlist[]; >: > #endif >: > extern char *prg_name; >: >: It is just harmful. Const'ness of sys_errlist has nothing to do with >: FreeBSD. >: >: BTW, sys_nerr is also const in FreeBSD, but the type mismatch is only >: warned about if gcc is invoked with -pedantic. > >And it is even esier to fix. Most modern systems have errno.h. Just >include that. Since it is in our CVS tree, that seems will be >acceptible. errno.h is the problem, not the solution. It pollutes the application namespace by declaring sys_nerr and sys_errlist. libmytinfo is chummy with the implementation in using (*) these variables instead of the public interface (strerror()), but not chummy enough to get the declarations right (except using an ifdef hack). (*) libmytinfo doesn't actually use these variables. It just miscdeclares them. It claims to use them ``/* for quit.c */'', but quit.c isn't in FreeBSD. Bruce