3 * Copyright (c) 1996-2001 Mike Gleason, NCEMRSoft.
8 #if defined(HAVE_CONFIG_H)
12 #if defined(WIN32) || defined(_WINDOWS)
14 # include <winsock2.h> /* Includes <windows.h> */
15 //# include <shlobj.h>
22 # ifdef HAVE_STRINGS_H
31 # include <sys/types.h>
32 # include <sys/stat.h>
35 # define strcasecmp stricmp
37 # define strncasecmp strnicmp
38 # define sleep WinSleep
40 # define S_ISREG(m) (((m) & _S_IFMT) == _S_IFREG)
41 # define S_ISDIR(m) (((m) & _S_IFMT) == _S_IFDIR)
54 # define utimbuf _utimbuf
57 # define unlink remove
63 #if defined(AIX) || defined(_AIX)
64 # define _ALL_SOURCE 1
69 #include <sys/types.h>
72 #include <sys/socket.h>
73 #include <sys/ioctl.h>
75 #if !defined(HAVE_GETCWD) && defined(HAVE_GETWD)
76 # include <sys/param.h>
79 #include <netinet/in.h>
80 #include <arpa/inet.h>
81 #include <arpa/telnet.h>
100 #ifdef HAVE_NET_ERRNO_H
101 # include <net/errno.h>
103 #ifdef HAVE_ARPA_NAMESER_H
104 # include <arpa/nameser.h>
112 #ifdef CAN_USE_SYS_SELECT_H
113 # include <sys/select.h>
117 # ifndef HAVE_UNISTD_H
118 extern char *getcwd();
122 # include <sys/param.h>
124 # define MAXPATHLEN 1024
126 extern char *getwd(char *);
133 #if defined(HAVE_LONG_LONG) && defined(HAVE_OPEN64)
139 #if defined(HAVE_LONG_LONG) && defined(HAVE_STAT64) && defined(HAVE_STRUCT_STAT64)
142 # define Fstat fstat64
147 # define Lstat lstat64
157 #if defined(HAVE_LONG_LONG) && defined(HAVE_LSEEK64)
158 # define Lseek(a,b,c) lseek64(a, (longest_int) b, c)
159 #elif defined(HAVE_LONG_LONG) && defined(HAVE_LLSEEK)
161 # if defined(LINUX) && (LINUX <= 23000)
162 # define Lseek(a,b,c) lseek(a, (off_t) b, c)
164 # define Lseek(a,b,c) llseek(a, (longest_int) b, c)
167 # define Lseek(a,b,c) lseek(a, (off_t) b, c)
170 # define Lseek(a,b,c) lseek(a, (off_t) b, c)
177 * Definitions for the TELNET protocol.
179 #define IAC 255 /* interpret as command: */
180 #define DONT 254 /* you are not to use option */
181 #define DO 253 /* please, you use option */
182 #define WONT 252 /* I won't use option */
183 #define WILL 251 /* I will use option */
184 #define SB 250 /* interpret as subnegotiation */
185 #define GA 249 /* you may reverse the line */
186 #define EL 248 /* erase the current line */
187 #define EC 247 /* erase the current character */
188 #define AYT 246 /* are you there */
189 #define AO 245 /* abort output--but let prog finish */
190 #define IP 244 /* interrupt process--permanently */
191 #define BREAK 243 /* break */
192 #define DM 242 /* data mark--for connect. cleaning */
193 #define NOP 241 /* nop */
194 #define SE 240 /* end sub negotiation */
195 #define EOR 239 /* end of record (transparent mode) */
196 #define ABORT 238 /* Abort process */
197 #define SUSP 237 /* Suspend process */
198 #define xEOF 236 /* End of file: EOF is already used... */
200 #define SYNCH 242 /* for telfunc calls */
206 struct utimbuf
{ time_t actime
, modtime
; };
210 #ifdef HAVE_LIBSOCKS5
215 #if 1 /* %config2% -- set by configure script -- do not modify */
220 # define NO_SIGNALS 1
226 /* #undef NO_SIGNALS */
230 # include "sio/sio.h" /* Library header. */
233 #include "Strn/Strn.h" /* Library header. */
234 #include "ncftp.h" /* Library header. */