Complete.Org: Mailing Lists: Archives: freeciv-dev: September 1999:
Re: [Freeciv-Dev] errno declaration, was: Updated meta patch
Home

Re: [Freeciv-Dev] errno declaration, was: Updated meta patch

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: sebauer@xxxxxxxxxxx
Cc: freeciv-dev@xxxxxxxxxxx
Subject: Re: [Freeciv-Dev] errno declaration, was: Updated meta patch
From: David Pfitzner <dwp@xxxxxxxxxxxxxx>
Date: Thu, 2 Sep 1999 11:48:38 +1000 (EST)

sebauer@xxxxxxxxxxx (Sebastian Bauer) wrote:

> BTW
> What's the reason for the line
>   extern int errno;
> in every file?
> Isn't this done in <errno.h>?

I agreed, see the comment I put in server/sernet.c:
http://www.freeciv.org/lxr/source/server/sernet.c?v=cvs#L80

 81 /* Is it necessary for us to declare errno on any platform?
 82    It should already be declared in errno.h (included above),
 83    and may really be a macro or some other magic.  If it is
 84    necessary, we should do some configure magic and only
 85    declare it when necessary.  --dwp
 86 */

I suggest we remove all such explicit errno declarations 
(making sure errno.h is included where necessary; it already
is most or maybe all such places), and see if any platforms 
break.

-- David

[Prev in Thread] Current Thread [Next in Thread]