Fix GCC detection in RBuild (first check TARGET_CC).
[reactos.git] / rosapps / applications / net / ncftp / sio / syshdrs.h
1 /* syshdrs.h
2 *
3 * Copyright (c) 1999 Mike Gleason, NCEMRSoft.
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 /* Include "wincfg.h" in place of "config.h" */
14 # include "wincfg.h"
15 # include <winsock2.h> /* includes <windows.h> */
16 # define _POSIX_ 1
17 # ifdef HAVE_UNISTD_H
18 # include <unistd.h>
19 # endif
20 # include <errno.h>
21 # include <stdio.h>
22 # include <string.h>
23 # ifdef HAVE_STRINGS_H
24 # include <strings.h>
25 # endif
26 # include <stddef.h>
27 # include <stdlib.h>
28 # include <ctype.h>
29 # include <stdarg.h>
30 # include <time.h>
31 # include <io.h>
32 # include <sys/types.h>
33 # include <sys/stat.h>
34 # include <fcntl.h>
35 # define strcasecmp stricmp
36 # define strncasecmp strnicmp
37 # define sleep(a) Sleep(a * 1000)
38 # ifndef S_ISREG
39 # define S_ISREG(m) (((m) & _S_IFMT) == _S_IFREG)
40 # define S_ISDIR(m) (((m) & _S_IFMT) == _S_IFDIR)
41 # endif
42 # ifndef open
43 # define open _open
44 # define write _write
45 # define read _read
46 # define close _close
47 # define lseek _lseek
48 # define stat _stat
49 # define fstat _fstat
50 # define dup _dup
51 # endif
52 # ifndef unlink
53 # define unlink remove
54 # endif
55 # define NO_SIGNALS 1
56 # define NO_UNIX_DOMAIN_SOCKETS 1
57 #else /* UNIX */
58
59 #if defined(AIX) || defined(_AIX)
60 # define _ALL_SOURCE 1
61 #endif
62 #ifdef HAVE_UNISTD_H
63 # include <unistd.h>
64 #endif
65 #include <sys/types.h>
66 #include <sys/time.h>
67 #include <sys/stat.h>
68 #include <sys/socket.h>
69 #include <sys/un.h>
70 #include <sys/ioctl.h>
71 #if !defined(HAVE_GETCWD) && defined(HAVE_GETWD)
72 # include <sys/param.h>
73 #endif
74
75 #include <netinet/in.h>
76 #include <netinet/tcp.h>
77 #include <arpa/inet.h>
78 #include <arpa/telnet.h>
79 #include <netdb.h>
80 #include <errno.h>
81 #include <stdio.h>
82 #include <string.h>
83 #ifdef HAVE_STRINGS_H
84 # include <strings.h>
85 #endif
86 #include <stddef.h>
87 #include <stdlib.h>
88 #include <ctype.h>
89 #include <signal.h>
90 #include <setjmp.h>
91 #include <stdarg.h>
92 #include <time.h>
93 #include <fcntl.h>
94
95 #ifdef HAVE_NET_ERRNO_H
96 # include <net/errno.h>
97 #endif
98 #ifdef HAVE_ARPA_NAMESER_H
99 # include <arpa/nameser.h>
100 #endif
101 #ifdef HAVE_NSERVE_H
102 # include <nserve.h>
103 #endif
104 #ifdef HAVE_RESOLV_H
105 # include <resolv.h>
106 #endif
107 #ifdef CAN_USE_SYS_SELECT_H
108 # include <sys/select.h>
109 #endif
110
111 #ifdef HAVE_GETCWD
112 # ifndef HAVE_UNISTD_H
113 extern char *getcwd();
114 # endif
115 #else
116 # ifdef HAVE_GETWD
117 # include <sys/param.h>
118 # ifndef MAXPATHLEN
119 # define MAXPATHLEN 1024
120 # endif
121 extern char *getwd(char *);
122 # endif
123 #endif
124
125 #define HAVE_RECVMSG 1
126
127 #endif /* UNIX */
128
129 #if defined(HAVE_LONG_LONG) && defined(HAVE_OPEN64)
130 # define Open open64
131 #else
132 # define Open open
133 #endif
134
135 #if defined(HAVE_LONG_LONG) && defined(HAVE_STAT64) && defined(HAVE_STRUCT_STAT64)
136 # define Stat stat64
137 # ifdef HAVE_FSTAT64
138 # define Fstat fstat64
139 # else
140 # define Fstat fstat
141 # endif
142 # ifdef HAVE_LSTAT64
143 # define Lstat lstat64
144 # else
145 # define Lstat lstat
146 # endif
147 #else
148 # define Stat stat
149 # define Fstat fstat
150 # define Lstat lstat
151 #endif
152
153 #if defined(HAVE_LONG_LONG) && defined(HAVE_LSEEK64)
154 # define Lseek(a,b,c) lseek64(a, (longest_int) b, c)
155 #elif defined(HAVE_LONG_LONG) && defined(HAVE_LLSEEK)
156 # if 1
157 # if defined(LINUX) && (LINUX <= 23000)
158 # define Lseek(a,b,c) lseek(a, (off_t) b, c)
159 # else
160 # define Lseek(a,b,c) llseek(a, (longest_int) b, c)
161 # endif
162 # else
163 # define Lseek(a,b,c) lseek(a, (off_t) b, c)
164 # endif
165 #else
166 # define Lseek(a,b,c) lseek(a, (off_t) b, c)
167 #endif
168
169
170 #ifndef IAC
171
172 /*
173 * Definitions for the TELNET protocol.
174 */
175 #define IAC 255 /* interpret as command: */
176 #define DONT 254 /* you are not to use option */
177 #define DO 253 /* please, you use option */
178 #define WONT 252 /* I won't use option */
179 #define WILL 251 /* I will use option */
180 #define SB 250 /* interpret as subnegotiation */
181 #define GA 249 /* you may reverse the line */
182 #define EL 248 /* erase the current line */
183 #define EC 247 /* erase the current character */
184 #define AYT 246 /* are you there */
185 #define AO 245 /* abort output--but let prog finish */
186 #define IP 244 /* interrupt process--permanently */
187 #define BREAK 243 /* break */
188 #define DM 242 /* data mark--for connect. cleaning */
189 #define NOP 241 /* nop */
190 #define SE 240 /* end sub negotiation */
191 #define EOR 239 /* end of record (transparent mode) */
192 #define ABORT 238 /* Abort process */
193 #define SUSP 237 /* Suspend process */
194 #define xEOF 236 /* End of file: EOF is already used... */
195
196 #define SYNCH 242 /* for telfunc calls */
197 #endif
198
199 #include "sio.h" /* Library header. */
200 #ifndef NO_UNIX_DOMAIN_SOCKETS
201 # include "usio.h"
202 #endif
203 /* eof */