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>
48 # define strcasecmp stricmp
50 # define strncasecmp strnicmp
51 # define sleep WinSleep
53 # define S_ISREG(m) (((m) & _S_IFMT) == _S_IFREG)
54 # define S_ISDIR(m) (((m) & _S_IFMT) == _S_IFDIR)
67 # define utimbuf _utimbuf
70 # define getpid _getpid
72 # define pclose _pclose
75 # define unlink remove
80 # ifndef FOPEN_READ_TEXT
81 # define FOPEN_READ_TEXT "rt"
82 # define FOPEN_WRITE_TEXT "wt"
83 # define FOPEN_APPEND_TEXT "at"
86 # if defined(AIX) || defined(_AIX)
87 # define _ALL_SOURCE 1
92 # include <sys/types.h>
93 # include <sys/stat.h>
94 # include <sys/socket.h>
95 # include <sys/wait.h>
96 # ifdef CAN_USE_SYS_SELECT_H
97 # include <sys/select.h>
99 # if defined(HAVE_SYS_UTSNAME_H) && defined(HAVE_UNAME)
100 # include <sys/utsname.h>
102 # include <netinet/in.h>
103 # include <arpa/inet.h>
108 # ifdef HAVE_STRINGS_H
109 # include <strings.h>
121 # if defined(HAVE_SYS_IOCTL_H) && defined(HAVE_TERMIOS_H)
122 # include <sys/ioctl.h>
123 # include <termios.h>
125 # ifdef HAVE_LOCALE_H
129 # ifndef HAVE_UNISTD_H
130 extern char *getcwd();
134 # include <sys/param.h>
136 # define MAXPATHLEN 1024
138 extern char *getwd(char *);
141 # ifndef FOPEN_READ_TEXT
142 # define FOPEN_READ_TEXT "r"
143 # define FOPEN_WRITE_TEXT "w"
144 # define FOPEN_APPEND_TEXT "a"
149 # define STDIN_FILENO 0
150 # define STDOUT_FILENO 1
151 # define STDERR_FILENO 2
154 #define NDEBUG 1 /* For assertions. */
156 #if defined(HAVE_LONG_LONG) && defined(HAVE_OPEN64)
162 #if defined(HAVE_LONG_LONG) && defined(HAVE_STAT64) && defined(HAVE_STRUCT_STAT64)
165 # define Fstat fstat64
170 # define Lstat lstat64
180 #if defined(HAVE_LONG_LONG) && defined(HAVE_LSEEK64)
181 # define Lseek(a,b,c) lseek64(a, (longest_int) b, c)
182 #elif defined(HAVE_LONG_LONG) && defined(HAVE_LLSEEK)
184 # if defined(LINUX) && (LINUX <= 23000)
185 # define Lseek(a,b,c) lseek(a, (off_t) b, c)
187 # define Lseek(a,b,c) llseek(a, (longest_int) b, c)
190 # define Lseek(a,b,c) lseek(a, (off_t) b, c)
193 # define Lseek(a,b,c) lseek(a, (off_t) b, c)
197 #include "Strn/Strn.h" /* Library header. */
198 #include "libncftp/ncftp.h" /* Library header. */