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>
34 # define strcasecmp stricmp
35 # define strncasecmp strnicmp
36 # define sleep WinSleep
38 # define S_ISREG(m) (((m) & _S_IFMT) == _S_IFREG)
39 # define S_ISDIR(m) (((m) & _S_IFMT) == _S_IFDIR)
52 # define utimbuf _utimbuf
55 # define unlink remove
61 #if defined(AIX) || defined(_AIX)
62 # define _ALL_SOURCE 1
67 #include <sys/types.h>
70 #include <sys/socket.h>
71 #include <sys/ioctl.h>
73 #if !defined(HAVE_GETCWD) && defined(HAVE_GETWD)
74 # include <sys/param.h>
77 #include <netinet/in.h>
78 #include <arpa/inet.h>
79 #include <arpa/telnet.h>
98 #ifdef HAVE_NET_ERRNO_H
99 # include <net/errno.h>
101 #ifdef HAVE_ARPA_NAMESER_H
102 # include <arpa/nameser.h>
110 #ifdef CAN_USE_SYS_SELECT_H
111 # include <sys/select.h>
115 # ifndef HAVE_UNISTD_H
116 extern char *getcwd();
120 # include <sys/param.h>
122 # define MAXPATHLEN 1024
124 extern char *getwd(char *);
131 #if defined(HAVE_LONG_LONG) && defined(HAVE_OPEN64)
137 #if defined(HAVE_LONG_LONG) && defined(HAVE_STAT64) && defined(HAVE_STRUCT_STAT64)
140 # define Fstat fstat64
145 # define Lstat lstat64
155 #if defined(HAVE_LONG_LONG) && defined(HAVE_LSEEK64)
156 # define Lseek(a,b,c) lseek64(a, (longest_int) b, c)
157 #elif defined(HAVE_LONG_LONG) && defined(HAVE_LLSEEK)
159 # if defined(LINUX) && (LINUX <= 23000)
160 # define Lseek(a,b,c) lseek(a, (off_t) b, c)
162 # define Lseek(a,b,c) llseek(a, (longest_int) b, c)
165 # define Lseek(a,b,c) lseek(a, (off_t) b, c)
168 # define Lseek(a,b,c) lseek(a, (off_t) b, c)
175 * Definitions for the TELNET protocol.
177 #define IAC 255 /* interpret as command: */
178 #define DONT 254 /* you are not to use option */
179 #define DO 253 /* please, you use option */
180 #define WONT 252 /* I won't use option */
181 #define WILL 251 /* I will use option */
182 #define SB 250 /* interpret as subnegotiation */
183 #define GA 249 /* you may reverse the line */
184 #define EL 248 /* erase the current line */
185 #define EC 247 /* erase the current character */
186 #define AYT 246 /* are you there */
187 #define AO 245 /* abort output--but let prog finish */
188 #define IP 244 /* interrupt process--permanently */
189 #define BREAK 243 /* break */
190 #define DM 242 /* data mark--for connect. cleaning */
191 #define NOP 241 /* nop */
192 #define SE 240 /* end sub negotiation */
193 #define EOR 239 /* end of record (transparent mode) */
194 #define ABORT 238 /* Abort process */
195 #define SUSP 237 /* Suspend process */
196 #define xEOF 236 /* End of file: EOF is already used... */
198 #define SYNCH 242 /* for telfunc calls */
204 struct utimbuf
{ time_t actime
, modtime
; };
208 #ifdef HAVE_LIBSOCKS5
213 #if 1 /* %config2% -- set by configure script -- do not modify */
218 # define NO_SIGNALS 1
224 /* #undef NO_SIGNALS */
228 # include "sio/sio.h" /* Library header. */
231 #include "Strn/Strn.h" /* Library header. */
232 #include "ncftp.h" /* Library header. */