Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: zftp without inet_aton()
- X-seq: zsh-workers 8826
- From: zefram@xxxxxxxx
- To: zsh-workers@xxxxxxxxxxxxxx
- Subject: PATCH: zftp without inet_aton()
- Date: Tue, 30 Nov 1999 18:15:27 +0000
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author