Re: INADDR_NONE' undeclared in Squid 1.0.17

From: Miquel van Smoorenburg <miquels@dont-contact.us>
Date: Fri, 27 Sep 1996 20:02:35 +0200 (MET DST)

You (Jens Elkner) wrote:
> > Compilation of Squid 1.0.17 under Solaris 2.5 with gcc breaks
> > with the following error message:
> >
> > cachemgr.c: In function `client_comm_connect':
> > cachemgr.c:851: `INADDR_NONE' undeclared (first use this function)
> =================================simple patch starts here============
> *** cachemgr.c~ Tue Sep 24 22:16:39 1996
> --- cachemgr.c Fri Sep 27 05:03:05 1996
> ***************
> *** 198,203 ****
> --- 198,207 ----
> #include "ansiproto.h"
> #include "util.h"
>
> + #ifndef INADDR_NONE
> + #define INADDR_NONE ((unsigned long) -1)
> + #endif
> +

It would be better to define INADDR_NONE as 0xFFFFFFFF because otherwise it
doesn't work on non-32 bit architectures (actually on architectures where
a long is not 32 bits).

Mike.

-- 
   Miquel van      | Cistron Internet Services   --    Alphen aan den Rijn.
   Smoorenburg,    | mailto:info@cistron.nl          http://www.cistron.nl/
miquels@cistron.nl |           The truth is out there. 42.
Received on Fri Sep 27 1996 - 11:03:20 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:33:05 MST