Date: Thu, 7 Aug 1997 09:58:44 +0930 (CST) From: Greg Lehey <grog@lemis.com> To: helbig@MX.BA-Stuttgart.De (Wolfgang Helbig) Cc: kehlet@dt.wdc.com, cwm@Marlar.phys.du.edu, freebsd-questions@FreeBSD.ORG Subject: Re: stdio declaration Message-ID: <199708070028.JAA01485@freebie.lemis.com> In-Reply-To: <199708062257.AAA18085@helbig.informatik.ba-stuttgart.de> from Wolfgang Helbig at "Aug 7, 97 00:57:33 am"
next in thread | previous in thread | raw e-mail | index | archive | help
Wolfgang Helbig writes: >> I've had this same problem bite me a number of times. >> >> The problem is FreeBSD declares sys_errlist (in <stdio.h>) 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 <cwm@Marlar.phys.du.edu> >>> 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 >>> >> >> > >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199708070028.JAA01485>