[REDEXPL]
[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 /* Include "wincfg.h" in place of "config.h" */
13 # include "wincfg.h"
14 # include <winsock2.h> /* includes <windows.h> */
15 # include <io.h>
16 # ifdef HAVE_UNISTD_H
17 # include <unistd.h>
18 # endif
19 # include <errno.h>
20 # include <stdio.h>
21 # include <string.h>
22 # ifdef HAVE_STRINGS_H
23 # include <strings.h>
24 # endif
25 # include <stddef.h>
26 # include <stdlib.h>
27 # include <ctype.h>
28 # include <stdarg.h>
29 # include <time.h>
30 # include <sys/types.h>
31 # include <sys/stat.h>
32 # include <fcntl.h>
33 # undef strcasecmp
34 # define strcasecmp stricmp
35 # undef strncasecmp
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
58 #if defined(HAVE_LONG_LONG) && defined(HAVE_OPEN64)
59 # define Open open64
60 #else
61 # define Open open
62 #endif
63
64 #if defined(HAVE_LONG_LONG) && defined(HAVE_STAT64) && defined(HAVE_STRUCT_STAT64)
65 # define Stat stat64
66 # ifdef HAVE_FSTAT64
67 # define Fstat fstat64
68 # else
69 # define Fstat fstat
70 # endif
71 # ifdef HAVE_LSTAT64
72 # define Lstat lstat64
73 # else
74 # define Lstat lstat
75 # endif
76 #else
77 # define Stat stat
78 # define Fstat fstat
79 # define Lstat lstat
80 #endif
81
82 #if defined(HAVE_LONG_LONG) && defined(HAVE_LSEEK64)
83 # define Lseek(a,b,c) lseek64(a, (longest_int) b, c)
84 #elif defined(HAVE_LONG_LONG) && defined(HAVE_LLSEEK)
85 # if 1
86 # if defined(LINUX) && (LINUX <= 23000)
87 # define Lseek(a,b,c) lseek(a, (off_t) b, c)
88 # else
89 # define Lseek(a,b,c) llseek(a, (longest_int) b, c)
90 # endif
91 # else
92 # define Lseek(a,b,c) lseek(a, (off_t) b, c)
93 # endif
94 #else
95 # define Lseek(a,b,c) lseek(a, (off_t) b, c)
96 #endif
97
98
99 #ifndef IAC
100
101 /*
102 * Definitions for the TELNET protocol.
103 */
104 #define IAC 255 /* interpret as command: */
105 #define DONT 254 /* you are not to use option */
106 #define DO 253 /* please, you use option */
107 #define WONT 252 /* I won't use option */
108 #define WILL 251 /* I will use option */
109 #define SB 250 /* interpret as subnegotiation */
110 #define GA 249 /* you may reverse the line */
111 #define EL 248 /* erase the current line */
112 #define EC 247 /* erase the current character */
113 #define AYT 246 /* are you there */
114 #define AO 245 /* abort output--but let prog finish */
115 #define IP 244 /* interrupt process--permanently */
116 #define BREAK 243 /* break */
117 #define DM 242 /* data mark--for connect. cleaning */
118 #define NOP 241 /* nop */
119 #define SE 240 /* end sub negotiation */
120 #define EOR 239 /* end of record (transparent mode) */
121 #define ABORT 238 /* Abort process */
122 #define SUSP 237 /* Suspend process */
123 #define xEOF 236 /* End of file: EOF is already used... */
124
125 #define SYNCH 242 /* for telfunc calls */
126 #endif
127
128 #include "sio.h" /* Library header. */
129 #ifndef NO_UNIX_DOMAIN_SOCKETS
130 # include "usio.h"
131 #endif
132 /* eof */