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>
33 # ifdef HAVE_STRINGS_H
42 # include <sys/types.h>
43 # include <sys/stat.h>
47 # define strcasecmp stricmp
48 # define strncasecmp strnicmp
49 # define sleep WinSleep
51 # define S_ISREG(m) (((m) & _S_IFMT) == _S_IFREG)
52 # define S_ISDIR(m) (((m) & _S_IFMT) == _S_IFDIR)
65 # define utimbuf _utimbuf
68 # define getpid _getpid
70 # define pclose _pclose
73 # define unlink remove
78 # ifndef FOPEN_READ_TEXT
79 # define FOPEN_READ_TEXT "rt"
80 # define FOPEN_WRITE_TEXT "wt"
81 # define FOPEN_APPEND_TEXT "at"
84 # if defined(AIX) || defined(_AIX)
85 # define _ALL_SOURCE 1
90 # include <sys/types.h>
91 # include <sys/stat.h>
92 # include <sys/socket.h>
93 # include <sys/wait.h>
94 # ifdef CAN_USE_SYS_SELECT_H
95 # include <sys/select.h>
97 # if defined(HAVE_SYS_UTSNAME_H) && defined(HAVE_UNAME)
98 # include <sys/utsname.h>
100 # include <netinet/in.h>
101 # include <arpa/inet.h>
106 # ifdef HAVE_STRINGS_H
107 # include <strings.h>
119 # if defined(HAVE_SYS_IOCTL_H) && defined(HAVE_TERMIOS_H)
120 # include <sys/ioctl.h>
121 # include <termios.h>
123 # ifdef HAVE_LOCALE_H
127 # ifndef HAVE_UNISTD_H
128 extern char *getcwd();
132 # include <sys/param.h>
134 # define MAXPATHLEN 1024
136 extern char *getwd(char *);
139 # ifndef FOPEN_READ_TEXT
140 # define FOPEN_READ_TEXT "r"
141 # define FOPEN_WRITE_TEXT "w"
142 # define FOPEN_APPEND_TEXT "a"
147 # define STDIN_FILENO 0
148 # define STDOUT_FILENO 1
149 # define STDERR_FILENO 2
152 #define NDEBUG 1 /* For assertions. */
154 #if defined(HAVE_LONG_LONG) && defined(HAVE_OPEN64)
160 #if defined(HAVE_LONG_LONG) && defined(HAVE_STAT64) && defined(HAVE_STRUCT_STAT64)
163 # define Fstat fstat64
168 # define Lstat lstat64
178 #if defined(HAVE_LONG_LONG) && defined(HAVE_LSEEK64)
179 # define Lseek(a,b,c) lseek64(a, (longest_int) b, c)
180 #elif defined(HAVE_LONG_LONG) && defined(HAVE_LLSEEK)
182 # if defined(LINUX) && (LINUX <= 23000)
183 # define Lseek(a,b,c) lseek(a, (off_t) b, c)
185 # define Lseek(a,b,c) llseek(a, (longest_int) b, c)
188 # define Lseek(a,b,c) lseek(a, (off_t) b, c)
191 # define Lseek(a,b,c) lseek(a, (off_t) b, c)
195 #include "Strn/Strn.h" /* Library header. */
196 #include "libncftp/ncftp.h" /* Library header. */