3 * Copyright (c) 1992-2001 by Mike Gleason.
8 #if defined(HAVE_CONFIG_H)
12 #if defined(WIN32) || defined(_WINDOWS)
13 # define SELECT_TYPE_ARG1 int
14 # define SELECT_TYPE_ARG234 (fd_set *)
15 # define SELECT_TYPE_ARG5 (struct timeval *)
16 # define STDC_HEADERS 1
17 # define HAVE_GETHOSTNAME 1
18 # define HAVE_MKTIME 1
19 # define HAVE_SOCKET 1
20 # define HAVE_STRSTR 1
21 # define HAVE_MEMMOVE 1
22 # define HAVE_LONG_FILE_NAMES 1
23 # include <winsock2.h> /* Includes <windows.h> */
24 //# include <shlobj.h>
31 # ifdef HAVE_STRINGS_H
40 # include <sys/types.h>
41 # include <sys/stat.h>
45 # define strcasecmp stricmp
46 # define strncasecmp strnicmp
47 # define sleep WinSleep
49 # define S_ISREG(m) (((m) & _S_IFMT) == _S_IFREG)
50 # define S_ISDIR(m) (((m) & _S_IFMT) == _S_IFDIR)
63 # define utimbuf _utimbuf
66 # define getpid _getpid
68 # define pclose _pclose
71 # define unlink remove
76 # ifndef FOPEN_READ_TEXT
77 # define FOPEN_READ_TEXT "rt"
78 # define FOPEN_WRITE_TEXT "wt"
79 # define FOPEN_APPEND_TEXT "at"
82 # if defined(AIX) || defined(_AIX)
83 # define _ALL_SOURCE 1
88 # include <sys/types.h>
89 # include <sys/stat.h>
90 # include <sys/socket.h>
91 # include <sys/wait.h>
92 # ifdef CAN_USE_SYS_SELECT_H
93 # include <sys/select.h>
95 # if defined(HAVE_SYS_UTSNAME_H) && defined(HAVE_UNAME)
96 # include <sys/utsname.h>
98 # include <netinet/in.h>
99 # include <arpa/inet.h>
104 # ifdef HAVE_STRINGS_H
105 # include <strings.h>
117 # if defined(HAVE_SYS_IOCTL_H) && defined(HAVE_TERMIOS_H)
118 # include <sys/ioctl.h>
119 # include <termios.h>
121 # ifdef HAVE_LOCALE_H
125 # ifndef HAVE_UNISTD_H
126 extern char *getcwd();
130 # include <sys/param.h>
132 # define MAXPATHLEN 1024
134 extern char *getwd(char *);
137 # ifndef FOPEN_READ_TEXT
138 # define FOPEN_READ_TEXT "r"
139 # define FOPEN_WRITE_TEXT "w"
140 # define FOPEN_APPEND_TEXT "a"
145 # define STDIN_FILENO 0
146 # define STDOUT_FILENO 1
147 # define STDERR_FILENO 2
150 #define NDEBUG 1 /* For assertions. */
152 #if defined(HAVE_LONG_LONG) && defined(HAVE_OPEN64)
158 #if defined(HAVE_LONG_LONG) && defined(HAVE_STAT64) && defined(HAVE_STRUCT_STAT64)
161 # define Fstat fstat64
166 # define Lstat lstat64
176 #if defined(HAVE_LONG_LONG) && defined(HAVE_LSEEK64)
177 # define Lseek(a,b,c) lseek64(a, (longest_int) b, c)
178 #elif defined(HAVE_LONG_LONG) && defined(HAVE_LLSEEK)
180 # if defined(LINUX) && (LINUX <= 23000)
181 # define Lseek(a,b,c) lseek(a, (off_t) b, c)
183 # define Lseek(a,b,c) llseek(a, (longest_int) b, c)
186 # define Lseek(a,b,c) lseek(a, (off_t) b, c)
189 # define Lseek(a,b,c) lseek(a, (off_t) b, c)
193 #include "Strn/Strn.h" /* Library header. */
194 #include "libncftp/ncftp.h" /* Library header. */