[ROSAPPS] put -Wno-unused-but-set-variable between a if(NOT MSVC) to really make...
[reactos.git] / rosapps / applications / net / ncftp / ncftp / syshdrs.h
1 /* syshdrs.h
2 *
3 * Copyright (c) 1992-2001 by Mike Gleason.
4 * All rights reserved.
5 *
6 */
7
8 #if defined(HAVE_CONFIG_H)
9 # include <config.h>
10 #endif
11
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>
25 # ifdef HAVE_UNISTD_H
26 # include <unistd.h>
27 # else
28 # include <process.h>
29 # endif
30 # include <errno.h>
31 # include <stdio.h>
32 # include <string.h>
33 # ifdef HAVE_STRINGS_H
34 # include <strings.h>
35 # endif
36 # include <stddef.h>
37 # include <stdlib.h>
38 # include <ctype.h>
39 # include <stdarg.h>
40 # include <time.h>
41 # include <io.h>
42 # include <sys/types.h>
43 # include <sys/stat.h>
44 # include <fcntl.h>
45 # include <signal.h>
46 # include <assert.h>
47 # include <utime.h>
48 # include <direct.h>
49 # undef strcasecmp
50 # define strcasecmp stricmp
51 # undef strncasecmp
52 # define strncasecmp strnicmp
53 # define sleep WinSleep
54 # ifndef S_ISREG
55 # define S_ISREG(m) (((m) & _S_IFMT) == _S_IFREG)
56 # define S_ISDIR(m) (((m) & _S_IFMT) == _S_IFDIR)
57 # endif
58 # ifndef open
59 # define open _open
60 # define write _write
61 # define read _read
62 # define close _close
63 # define lseek _lseek
64 # define stat _stat
65 # define lstat _stat
66 # define fstat _fstat
67 # define dup _dup
68 # define utime _utime
69 # define utimbuf _utimbuf
70 # define chdir _chdir
71 # define rmdir _rmdir
72 # define getpid _getpid
73 # define popen _popen
74 # define pclose _pclose
75 # endif
76 # ifndef unlink
77 # define unlink remove
78 # endif
79 # define uid_t int
80 # define NO_SIGNALS 1
81 # define USE_SIO 1
82 # ifndef FOPEN_READ_TEXT
83 # define FOPEN_READ_TEXT "rt"
84 # define FOPEN_WRITE_TEXT "wt"
85 # define FOPEN_APPEND_TEXT "at"
86 # endif
87 #else /* UNIX */
88 # if defined(AIX) || defined(_AIX)
89 # define _ALL_SOURCE 1
90 # endif
91 # ifdef HAVE_UNISTD_H
92 # include <unistd.h>
93 # endif
94 # include <sys/types.h>
95 # include <sys/stat.h>
96 # include <sys/socket.h>
97 # include <sys/wait.h>
98 # ifdef CAN_USE_SYS_SELECT_H
99 # include <sys/select.h>
100 # endif
101 # if defined(HAVE_SYS_UTSNAME_H) && defined(HAVE_UNAME)
102 # include <sys/utsname.h>
103 # endif
104 # include <netinet/in.h>
105 # include <arpa/inet.h>
106 # include <netdb.h>
107 # include <errno.h>
108 # include <stdio.h>
109 # include <string.h>
110 # ifdef HAVE_STRINGS_H
111 # include <strings.h>
112 # endif
113 # include <stddef.h>
114 # include <stdlib.h>
115 # include <ctype.h>
116 # include <signal.h>
117 # include <setjmp.h>
118 # include <stdarg.h>
119 # include <assert.h>
120 # include <time.h>
121 # include <pwd.h>
122 # include <fcntl.h>
123 # if defined(HAVE_SYS_IOCTL_H) && defined(HAVE_TERMIOS_H)
124 # include <sys/ioctl.h>
125 # include <termios.h>
126 # endif
127 # ifdef HAVE_LOCALE_H
128 # include <locale.h>
129 # endif
130 # ifdef HAVE_GETCWD
131 # ifndef HAVE_UNISTD_H
132 extern char *getcwd();
133 # endif
134 # else
135 # ifdef HAVE_GETWD
136 # include <sys/param.h>
137 # ifndef MAXPATHLEN
138 # define MAXPATHLEN 1024
139 # endif
140 extern char *getwd(char *);
141 # endif
142 # endif
143 # ifndef FOPEN_READ_TEXT
144 # define FOPEN_READ_TEXT "r"
145 # define FOPEN_WRITE_TEXT "w"
146 # define FOPEN_APPEND_TEXT "a"
147 # endif
148 #endif /* UNIX */
149
150 #ifndef STDIN_FILENO
151 # define STDIN_FILENO 0
152 # define STDOUT_FILENO 1
153 # define STDERR_FILENO 2
154 #endif
155
156 #define NDEBUG 1 /* For assertions. */
157
158 #if defined(HAVE_LONG_LONG) && defined(HAVE_OPEN64)
159 # define Open open64
160 #else
161 # define Open open
162 #endif
163
164 #if defined(HAVE_LONG_LONG) && defined(HAVE_STAT64) && defined(HAVE_STRUCT_STAT64)
165 # define Stat stat64
166 # ifdef HAVE_FSTAT64
167 # define Fstat fstat64
168 # else
169 # define Fstat fstat
170 # endif
171 # ifdef HAVE_LSTAT64
172 # define Lstat lstat64
173 # else
174 # define Lstat lstat
175 # endif
176 #else
177 # define Stat stat
178 # define Fstat fstat
179 # define Lstat lstat
180 #endif
181
182 #if defined(HAVE_LONG_LONG) && defined(HAVE_LSEEK64)
183 # define Lseek(a,b,c) lseek64(a, (longest_int) b, c)
184 #elif defined(HAVE_LONG_LONG) && defined(HAVE_LLSEEK)
185 # if 1
186 # if defined(LINUX) && (LINUX <= 23000)
187 # define Lseek(a,b,c) lseek(a, (off_t) b, c)
188 # else
189 # define Lseek(a,b,c) llseek(a, (longest_int) b, c)
190 # endif
191 # else
192 # define Lseek(a,b,c) lseek(a, (off_t) b, c)
193 # endif
194 #else
195 # define Lseek(a,b,c) lseek(a, (off_t) b, c)
196 #endif
197
198
199 #include "Strn/Strn.h" /* Library header. */
200 #include "libncftp/ncftp.h" /* Library header. */