zsh-workers
 help / color / mirror / code / Atom feed
From: zefram@fysh.org
To: zsh-workers@sunsite.auc.dk
Subject: PATCH: zftp without inet_aton()
Date: Tue, 30 Nov 1999 18:15:27 +0000	[thread overview]
Message-ID: <E11sroF-0004Kq-00@crucigera.fysh.org> (raw)

This should fix zftp for systems that lack inet_aton().  I haven't tested
it on such a system, however.

-zefram

diff -cr ../zsh-/Src/Modules/zftp.c ./Src/Modules/zftp.c
*** ../zsh-/Src/Modules/zftp.c	Sun Nov 28 17:42:28 1999
--- ./Src/Modules/zftp.c	Tue Nov 30 18:04:01 1999
***************
*** 126,131 ****
--- 126,147 ----
  #ifndef HAVE_INET_PTON
  
  /**/
+ # ifndef HAVE_INET_ATON
+ 
+ #  ifndef INADDR_NONE
+ #   define INADDR_NONE 0xffffffffUL
+ #  endif
+ 
+ /**/
+ static int inet_aton(char const *src, struct in_addr *dst)
+ {
+     return (dst->s_addr = inet_addr(src)) != INADDR_NONE;
+ }
+ 
+ /**/
+ # endif /* !HAVE_INET_ATON */
+ 
+ /**/
  static int
  inet_pton(int af, char const *src, void *dst)
  {
diff -cr ../zsh-/configure.in ./configure.in
*** ../zsh-/configure.in	Sun Nov 28 17:42:26 1999
--- ./configure.in	Tue Nov 30 17:57:13 1999
***************
*** 791,797 ****
                sigprocmask setuid seteuid setreuid setresuid setsid strerror \
                nis_list initgroups fchdir cap_get_proc readlink nice \
  	      getgrgid getgrnam getpwent getpwnam getpwuid setpgrp \
! 	      inet_pton inet_ntop getipnodebyname gethostbyname2 \
  	      fseeko ftello mmap munmap msync ftruncate setlocale)
  
  dnl ---------------
--- 791,797 ----
                sigprocmask setuid seteuid setreuid setresuid setsid strerror \
                nis_list initgroups fchdir cap_get_proc readlink nice \
  	      getgrgid getgrnam getpwent getpwnam getpwuid setpgrp \
! 	      inet_aton inet_pton inet_ntop getipnodebyname gethostbyname2 \
  	      fseeko ftello mmap munmap msync ftruncate setlocale)
  
  dnl ---------------
END


             reply	other threads:[~1999-11-30 18:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-11-30 18:15 zefram [this message]
1999-12-01  9:09 Sven Wischnowsky
1999-12-01  9:30 ` Zefram

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=E11sroF-0004Kq-00@crucigera.fysh.org \
    --to=zefram@fysh.org \
    --cc=zsh-workers@sunsite.auc.dk \
    /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).