zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <pws@ibmth.df.unipi.it>
To: zsh-workers@math.gatech.edu
Subject: PATCH: 3.1.5-pws-3: INADDR_NONE
Date: Tue, 15 Dec 1998 15:45:31 +0100	[thread overview]
Message-ID: <9812151445.AA48261@ibmth.df.unipi.it> (raw)
In-Reply-To: "Bruce Stephens"'s message of "15 Dec 1998 14:03:40 NFT." <vb7lvtwlhf.fsf@snake.isode.com>

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 <arpa/telnet.h>
  
! /* 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 <arpa/telnet.h>
  
! /* pinch the definition from <netinet/in.h> for deficient headers */
  #ifndef INADDR_NONE
! #define INADDR_NONE 0xffffffff
  #endif
  
  /*

-- 
Peter Stephenson <pws@ibmth.df.unipi.it>       Tel: +39 050 844536
WWW:  http://www.ifh.de/~pws/
Dipartimento di Fisica, Via Buonarroti 2, 56127 Pisa, Italy


      parent reply	other threads:[~1998-12-15 15:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-12-15 11:59 Latest patched development version Sven Wischnowsky
1998-12-15 13:05 ` Peter Stephenson
1998-12-15 14:03 ` Bruce Stephens
1998-12-15 14:44   ` Bruce Stephens
1998-12-15 14:45   ` Peter Stephenson [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9812151445.AA48261@ibmth.df.unipi.it \
    --to=pws@ibmth.df.unipi.it \
    --cc=zsh-workers@math.gatech.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).