[nas] Gcc 4.0 fixes for nas 1.7
Steve McIntyre
steve at einval.com
Sat Jan 1 12:25:04 MST 2005
On Thu, Dec 30, 2004 at 02:33:19PM -0700, Jon Trulson wrote:
>On Sun, 26 Dec 2004, Steve McIntyre wrote:
>
>>Hi Jon,
>>
>>Gcc 4.0 is much pickier about function prototypes. It throws lots of
>>warnings when compiling nas 1.7, and one error in auutil.c. The
>>attached patch fixes them for me (mainly by simply including standard
>>headers!).
>>
>
> Hello Steve,
>
> Unfortunately the issue with this is that not all systems provide
>stdlib.h.
Christ. How many old broken systems does nas still support? stdlib.h
is part of the standard library from C89...!
>I added an autoconf confgure script in config/ (run during the
>make includes phase) to try to figure out this stuff on a per system basis
>in v1.7. John Wehle provided some of these stdlib.h includes for FreeBSD
>in 1.7, prompting the addition of this simple autoconf script in config/.
>I will need to go through the patch, wrapping the #includes with:
>
> #if defined(HAVE_STDLIB_H)
> ...
> #endif
>
> same for string.h/strings.h .
I'll see if I can add wrappers in a newer version of the patch.
> The one thing I'm not sure about is the socklen_t changes... How
>portable is this? It seems like every system has a different idea about
>it :) Maybe I need an autoconf rule to detect when this typedef is
>available as well?
Maybe, yes. Using http://www.freebsd.org/cgi/man.cgi says that Linux,
FreeBSD and Solaris all have socklen_t, at least. It would be nice to
see what other systems use here.
--
Steve McIntyre, Cambridge, UK. steve at einval.com
Can't keep my eyes from the circling sky,
Tongue-tied & twisted, Just an earth-bound misfit, I...
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://radscan.com/pipermail/nas/attachments/20050101/2cdc7764/attachment.pgp>
More information about the Nas
mailing list