From owner-freebsd-hackers Wed May 21 09:44:18 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id JAA19841 for hackers-outgoing; Wed, 21 May 1997 09:44:18 -0700 (PDT) Received: from phaeton.artisoft.com (phaeton.Artisoft.COM [198.17.250.50]) by hub.freebsd.org (8.8.5/8.8.5) with SMTP id JAA19836 for ; Wed, 21 May 1997 09:44:16 -0700 (PDT) Received: (from terry@localhost) by phaeton.artisoft.com (8.6.11/8.6.9) id JAA03451; Wed, 21 May 1997 09:43:03 -0700 From: Terry Lambert Message-Id: <199705211643.JAA03451@phaeton.artisoft.com> Subject: Re: Porting question To: jgrosch@superior.mooseriver.com Date: Wed, 21 May 1997 09:43:03 -0700 (MST) Cc: hackers@FreeBSD.ORG In-Reply-To: <199705210519.WAA08921@superior.mooseriver.com> from "Josef Grosch" at May 20, 97 10:19:11 pm X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > I know this issue has been beat to death several times before BUT..... > > I am porting a piece of code to FreeBSD and gcc bitches about this; > > extern char* sys_errlist[]; > > Now the fast way to handle this is; > > #ifndef __FreeBSD__ > extern char* sys_errlist[]; > #endif > > But this is very non-portable. Any suggestions as the correct way to > handle this would be helpful. Do not directly reference sys_errlist[] in your code, use strerror() instead. Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers.