Fix GCC detection in RBuild (first check TARGET_CC).
[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 # define strcasecmp stricmp
48 # define strncasecmp strnicmp
49 # define sleep WinSleep
50 # ifndef S_ISREG
51 # define S_ISREG(m) (((m) & _S_IFMT) == _S_IFREG)
52 # define S_ISDIR(m) (((m) & _S_IFMT) == _S_IFDIR)
53 # endif
54 # ifndef open
55 # define open _open
56 # define write _write
57 # define read _read
58 # define close _close
59 # define lseek _lseek
60 # define stat _stat
61 # define lstat _stat
62 # define fstat _fstat
63 # define dup _dup
64 # define utime _utime
65 # define utimbuf _utimbuf
66 # define chdir _chdir
67 # define rmdir _rmdir
68 # define getpid _getpid
69 # define popen _popen
70 # define pclose _pclose
71 # endif
72 # ifndef unlink
73 # define unlink remove
74 # endif
75 # define uid_t int
76 # define NO_SIGNALS 1
77 # define USE_SIO 1
78 # ifndef FOPEN_READ_TEXT
79 # define FOPEN_READ_TEXT "rt"
80 # define FOPEN_WRITE_TEXT "wt"
81 # define FOPEN_APPEND_TEXT "at"
82 # endif
83 #else /* UNIX */
84 # if defined(AIX) || defined(_AIX)
85 # define _ALL_SOURCE 1
86 # endif
87 # ifdef HAVE_UNISTD_H
88 # include <unistd.h>
89 # endif
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>
96 # endif
97 # if defined(HAVE_SYS_UTSNAME_H) && defined(HAVE_UNAME)
98 # include <sys/utsname.h>
99 # endif
100 # include <netinet/in.h>
101 # include <arpa/inet.h>
102 # include <netdb.h>
103 # include <errno.h>
104 # include <stdio.h>
105 # include <string.h>
106 # ifdef HAVE_STRINGS_H
107 # include <strings.h>
108 # endif
109 # include <stddef.h>
110 # include <stdlib.h>
111 # include <ctype.h>
112 # include <signal.h>
113 # include <setjmp.h>
114 # include <stdarg.h>
115 # include <assert.h>
116 # include <time.h>
117 # include <pwd.h>
118 # include <fcntl.h>
119 # if defined(HAVE_SYS_IOCTL_H) && defined(HAVE_TERMIOS_H)
120 # include <sys/ioctl.h>
121 # include <termios.h>
122 # endif
123 # ifdef HAVE_LOCALE_H
124 # include <locale.h>
125 # endif
126 # ifdef HAVE_GETCWD
127 # ifndef HAVE_UNISTD_H
128 extern char *getcwd();
129 # endif
130 # else
131 # ifdef HAVE_GETWD
132 # include <sys/param.h>
133 # ifndef MAXPATHLEN
134 # define MAXPATHLEN 1024
135 # endif
136 extern char *getwd(char *);
137 # endif
138 # endif
139 # ifndef FOPEN_READ_TEXT
140 # define FOPEN_READ_TEXT "r"
141 # define FOPEN_WRITE_TEXT "w"
142 # define FOPEN_APPEND_TEXT "a"
143 # endif
144 #endif /* UNIX */
145
146 #ifndef STDIN_FILENO
147 # define STDIN_FILENO 0
148 # define STDOUT_FILENO 1
149 # define STDERR_FILENO 2
150 #endif
151
152 #define NDEBUG 1 /* For assertions. */
153
154 #if defined(HAVE_LONG_LONG) && defined(HAVE_OPEN64)
155 # define Open open64
156 #else
157 # define Open open
158 #endif
159
160 #if defined(HAVE_LONG_LONG) && defined(HAVE_STAT64) && defined(HAVE_STRUCT_STAT64)
161 # define Stat stat64
162 # ifdef HAVE_FSTAT64
163 # define Fstat fstat64
164 # else
165 # define Fstat fstat
166 # endif
167 # ifdef HAVE_LSTAT64
168 # define Lstat lstat64
169 # else
170 # define Lstat lstat
171 # endif
172 #else
173 # define Stat stat
174 # define Fstat fstat
175 # define Lstat lstat
176 #endif
177
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)
181 # if 1
182 # if defined(LINUX) && (LINUX <= 23000)
183 # define Lseek(a,b,c) lseek(a, (off_t) b, c)
184 # else
185 # define Lseek(a,b,c) llseek(a, (longest_int) b, c)
186 # endif
187 # else
188 # define Lseek(a,b,c) lseek(a, (off_t) b, c)
189 # endif
190 #else
191 # define Lseek(a,b,c) lseek(a, (off_t) b, c)
192 #endif
193
194
195 #include "Strn/Strn.h" /* Library header. */
196 #include "libncftp/ncftp.h" /* Library header. */