From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5753 invoked from network); 15 Dec 1998 15:08:54 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 15 Dec 1998 15:08:54 -0000 Received: (from list@localhost) by math.gatech.edu (8.9.1/8.9.1) id KAA09386; Tue, 15 Dec 1998 10:01:56 -0500 (EST) Resent-Date: Tue, 15 Dec 1998 10:01:56 -0500 (EST) Message-Id: <9812151445.AA48261@ibmth.df.unipi.it> To: zsh-workers@math.gatech.edu Subject: PATCH: 3.1.5-pws-3: INADDR_NONE In-Reply-To: "Bruce Stephens"'s message of "15 Dec 1998 14:03:40 NFT." Date: Tue, 15 Dec 1998 15:45:31 +0100 From: Peter Stephenson Resent-Message-ID: <"SeCdu.0.bI2.ZddTs"@math> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/4805 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu Bruce Stephens wrote: > zftp.c fails to compile: > > /* bet there are machines which have neither INADDR_NONE nor in_addr_t. */ > > Lucky guess! Solaris 2.5.1 seems to have s_addr as a u_long, so I > just replaced (in_addr_t) with (u_long), and it seems to work. I > think, anyway. I'm assuming this either catches the case when a > hostname can't be resolved (which I checked using a name that doesn't > exist), or when DNS server can't be contacted (which I haven't > checked). It was there on 2.6. The definition I have is just 32 bits all ones, and I think that's standard. It's only used when trying to match an IP number in dot format, before it tries a name lookup, so if name lookup is working at all it means it understands what you did. *** Src/Modules/zftp.c.zftp3 Fri Dec 11 11:17:15 1998 --- Src/Modules/zftp.c Tue Dec 15 15:40:18 1998 *************** *** 62,70 **** /* it's a TELNET based protocol, but don't think I like doing this */ #include ! /* bet there are machines which have neither INADDR_NONE nor in_addr_t. */ #ifndef INADDR_NONE ! #define INADDR_NONE (in_addr_t)-1 #endif /* --- 62,70 ---- /* it's a TELNET based protocol, but don't think I like doing this */ #include ! /* pinch the definition from for deficient headers */ #ifndef INADDR_NONE ! #define INADDR_NONE 0xffffffff #endif /* -- Peter Stephenson Tel: +39 050 844536 WWW: http://www.ifh.de/~pws/ Dipartimento di Fisica, Via Buonarroti 2, 56127 Pisa, Italy