ReactOS 0.4.16-dev-319-g6cf4263
syshdrs.h
Go to the documentation of this file.
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# define SELECT_TYPE_ARG1 int
13# define SELECT_TYPE_ARG234 (fd_set *)
14# define SELECT_TYPE_ARG5 (struct timeval *)
15# define STDC_HEADERS 1
16# define HAVE_GETHOSTNAME 1
17# define HAVE_MKTIME 1
18# define HAVE_SOCKET 1
19# define HAVE_STRSTR 1
20# define HAVE_MEMMOVE 1
21# define HAVE_LONG_FILE_NAMES 1
22# include <winsock2.h> /* Includes <windows.h> */
23//# include <shlobj.h>
24# ifdef HAVE_UNISTD_H
25# include <unistd.h>
26# else
27# include <process.h>
28# endif
29# include <errno.h>
30# include <stdio.h>
31# include <string.h>
32# ifdef HAVE_STRINGS_H
33# include <strings.h>
34# endif
35# include <stddef.h>
36# include <stdlib.h>
37# include <ctype.h>
38# include <stdarg.h>
39# include <time.h>
40# include <io.h>
41# include <sys/types.h>
42# include <sys/stat.h>
43# include <fcntl.h>
44# include <signal.h>
45# include <assert.h>
46# include <utime.h>
47# include <direct.h>
48# undef strcasecmp
49# define strcasecmp stricmp
50# undef strncasecmp
51# define strncasecmp strnicmp
52# define sleep WinSleep
53# ifndef S_ISREG
54# define S_ISREG(m) (((m) & _S_IFMT) == _S_IFREG)
55# define S_ISDIR(m) (((m) & _S_IFMT) == _S_IFDIR)
56# endif
57# ifndef open
58# define open _open
59# define write _write
60# define read _read
61# define close _close
62# define lseek _lseek
63# define stat _stat
64# define lstat _stat
65# define fstat _fstat
66# define dup _dup
67# define utime _utime
68# define utimbuf _utimbuf
69# define chdir _chdir
70# define rmdir _rmdir
71# define getpid _getpid
72# define popen _popen
73# define pclose _pclose
74# endif
75# ifndef unlink
76# define unlink remove
77# endif
78# define uid_t int
79# define NO_SIGNALS 1
80# define USE_SIO 1
81# ifndef FOPEN_READ_TEXT
82# define FOPEN_READ_TEXT "rt"
83# define FOPEN_WRITE_TEXT "wt"
84# define FOPEN_APPEND_TEXT "at"
85# endif
86
87#ifndef STDIN_FILENO
88# define STDIN_FILENO 0
89# define STDOUT_FILENO 1
90# define STDERR_FILENO 2
91#endif
92
93#define NDEBUG 1 /* For assertions. */
94
95#if defined(HAVE_LONG_LONG) && defined(HAVE_OPEN64)
96# define Open open64
97#else
98# define Open open
99#endif
100
101#if defined(HAVE_LONG_LONG) && defined(HAVE_STAT64) && defined(HAVE_STRUCT_STAT64)
102# define Stat stat64
103# ifdef HAVE_FSTAT64
104# define Fstat fstat64
105# else
106# define Fstat fstat
107# endif
108# ifdef HAVE_LSTAT64
109# define Lstat lstat64
110# else
111# define Lstat lstat
112# endif
113#else
114# define Stat stat
115# define Fstat fstat
116# define Lstat lstat
117#endif
118
119#if defined(HAVE_LONG_LONG) && defined(HAVE_LSEEK64)
120# define Lseek(a,b,c) lseek64(a, (longest_int) b, c)
121#elif defined(HAVE_LONG_LONG) && defined(HAVE_LLSEEK)
122# if 1
123# if defined(LINUX) && (LINUX <= 23000)
124# define Lseek(a,b,c) lseek(a, (off_t) b, c)
125# else
126# define Lseek(a,b,c) llseek(a, (longest_int) b, c)
127# endif
128# else
129# define Lseek(a,b,c) lseek(a, (off_t) b, c)
130# endif
131#else
132# define Lseek(a,b,c) lseek(a, (off_t) b, c)
133#endif
134
135
136#include "Strn/Strn.h" /* Library header. */
137#include "libncftp/ncftp.h" /* Library header. */