84 |
|
|
85 |
#include "ftp_var.h" |
#include "ftp_var.h" |
86 |
|
|
87 |
#ifndef HAVE_DECL_FCLOSE |
#if !HAVE_DECL_FCLOSE |
88 |
/* Some systems don't declare fclose in <stdio.h>, so do it ourselves. */ |
/* Some systems don't declare fclose in <stdio.h>, so do it ourselves. */ |
89 |
extern int fclose __P ((FILE *)); |
extern int fclose __P ((FILE *)); |
90 |
#endif |
#endif |
91 |
|
|
92 |
#ifndef HAVE_DECL_PCLOSE |
#if !HAVE_DECL_PCLOSE |
93 |
/* Some systems don't declare pclose in <stdio.h>, so do it ourselves. */ |
/* Some systems don't declare pclose in <stdio.h>, so do it ourselves. */ |
94 |
extern int pclose __P ((FILE *)); |
extern int pclose __P ((FILE *)); |
95 |
#endif |
#endif |
140 |
} |
} |
141 |
hisctladdr.sin_family = hp->h_addrtype; |
hisctladdr.sin_family = hp->h_addrtype; |
142 |
memmove((caddr_t)&hisctladdr.sin_addr, |
memmove((caddr_t)&hisctladdr.sin_addr, |
143 |
#ifdef HAVE_HOSTENT_H_ADDR_LIST |
#ifdef HAVE_STRUCT_HOSTENT_H_ADDR_LIST |
144 |
hp->h_addr_list[0], |
hp->h_addr_list[0], |
145 |
#else |
#else |
146 |
hp->h_addr, |
hp->h_addr, |
157 |
} |
} |
158 |
hisctladdr.sin_port = port; |
hisctladdr.sin_port = port; |
159 |
while (connect(s, (struct sockaddr *)&hisctladdr, sizeof (hisctladdr)) < 0) { |
while (connect(s, (struct sockaddr *)&hisctladdr, sizeof (hisctladdr)) < 0) { |
160 |
#ifdef HAVE_HOSTENT_H_ADDR_LIST |
#ifdef HAVE_STRUCT_HOSTENT_H_ADDR_LIST |
161 |
if (hp && hp->h_addr_list[1]) { |
if (hp && hp->h_addr_list[1]) { |
162 |
int oerrno = errno; |
int oerrno = errno; |
163 |
char *ia; |
char *ia; |