Complete.Org: Mailing Lists: Archives: freeciv-dev: August 1999:
Re: [Freeciv-Dev] Compiler Problem in astring.c
Home

Re: [Freeciv-Dev] Compiler Problem in astring.c

[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] Compiler Problem in astring.c
From: David Pfitzner <dwp@xxxxxxxxxxxxxx>
Date: Sun, 8 Aug 1999 14:23:34 +1000 (EST)

sebauer@xxxxxxxxxxx (Sebastian Bauer) wrote:

> The compiler I use (not gcc) has problems to compile the new astring.c
> file without errors:
> 
>   struct athing zero_ath =  { 0, ( size ), 0, 0 } ;
> gg:freeciv-cvs/common/astring.c 107 Error 20: invalid constant expression

Yeah, thanks, fixed.

> It also add some
> missing includes in some files and corrects some function
> headers to match the prototype (static). The compiler warns
> otherwise.

Done, thanks.

> Also my system doesn't know about SIGPIPE. I've put
> #ifdef SIGPIPE and #endif pair around the signal function in
> sernet.c.

Hmm, but is this correct?  That is, is SIGPIPE guaranteed
to be testable with #ifdef SIGPIPE, or could it be an enum
or something, which would fail #ifdef SIGPIPE even if
SIG_PIPE really was there?

(Though #ifdef SIGPIPE does seem to work on some systems
I've tried just now.)

(If necessary an alternative would be to write an appropriate
configure check.)

> Maybe it is also possible to remove the ATHING_INIT marcro
> and use ath_init() instead (although the are no further problems)?

Agreed.  Well, ATHING_INIT could still be used where it's _known_
that size is constant (eg sizeof?) but to avoid future accidents
using gcc it's not too much of a problem to remove it.

> If you agree I will write the patch for it.

Well, I've done this already :-)

Regards,
-- David


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