From owner-freebsd-questions Wed Aug 6 17:29:23 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id RAA00656 for questions-outgoing; Wed, 6 Aug 1997 17:29:23 -0700 (PDT) Received: from nico.telstra.net (nico.telstra.net [139.130.204.16]) by hub.freebsd.org (8.8.5/8.8.5) with SMTP id RAA00651 for ; Wed, 6 Aug 1997 17:29:20 -0700 (PDT) Received: from freebie.lemis.com (gregl1.lnk.telstra.net [139.130.136.133]) by nico.telstra.net (8.6.10/8.6.10) with ESMTP id KAA09415; Thu, 7 Aug 1997 10:29:43 +1000 From: Greg Lehey Received: (grog@localhost) by freebie.lemis.com (8.8.7/8.6.12) id JAA01485; Thu, 7 Aug 1997 09:58:44 +0930 (CST) Message-Id: <199708070028.JAA01485@freebie.lemis.com> Subject: Re: stdio declaration In-Reply-To: <199708062257.AAA18085@helbig.informatik.ba-stuttgart.de> from Wolfgang Helbig at "Aug 7, 97 00:57:33 am" To: helbig@MX.BA-Stuttgart.De (Wolfgang Helbig) Date: Thu, 7 Aug 1997 09:58:44 +0930 (CST) Cc: kehlet@dt.wdc.com, cwm@Marlar.phys.du.edu, freebsd-questions@FreeBSD.ORG Organisation: LEMIS, PO Box 460, Echunga SA 5153, Australia Phone: +61-8-8388-8250 Fax: +61-8-8388-8250 Mobile: +61-41-739-7062 WWW-Home-Page: http://www.lemis.com/~grog X-Mailer: ELM [version 2.4ME+ PL32 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk Wolfgang Helbig writes: >> I've had this same problem bite me a number of times. >> >> The problem is FreeBSD declares sys_errlist (in ) as: >> extern const char *const sys_errlist[] >> >> instead of just: >> extern char *sys_errlist[] >> >> like most other people. The only solution I've found is to edit the >> offending files (in your case, HTTCP.c, line 110) and change the >> declaration to match FreeBSD's. There may be a better way around this > > Or delete this declaration all together or use the port or use the > package. At least the current port provides Lynx 2.1.7 and you should > have no trouble installing Lynx from it on FreeBSD 2.2.x. The real answer should be: packages have no business declaring functions they don't supply. The system should do that. The reason that they do it anyway is because so many systems don't supply the definitions. The correct way to handle this problem portably is to insert the following at line 110 of HTTP.c: #ifndef __FreeBSD__ extern char *sys_errlist[]; #endif This will give you a source file which will still compile correctly on systems with broken header files. Greg >> but this has worked for me. >> >> Steve Kehlet >> >> >> >> On Wed, 6 Aug 1997, Chad William Monteith wrote: >> >>> Date: Wed, 6 Aug 1997 13:50:02 -0600 (MDT) >>> From: Chad William Monteith >>> To: freebsd-questions@FreeBSD.ORG >>> Subject: stdio declaration >>> >>> Hello. >>> In trying to install Lynx (2.7.1) the install gives an error which >>> the documentation does not have a fix for. Output gives thie following >>> after 'make freebsd' >>> ../../Library/Implementation/HTTCP.c:110: conflicting types for >>> 'sys_errlist' >>> /usr/include/stdio:245: previous declaration of 'sys_errlist' >>> *** Error code 1 >>> >>> Stop. >>> >>> Trying the alternate makes of freebsd-ncurses;-slang; and general give the >>> same error. Any help? >>> >>> Thanks! >>> >>> -Chad >>> >> >> > >