Define macros for LPC limits:
[reactos.git] / reactos / include / windows.h
1 /*
2 windows.h
3
4 Include this file if you wish to use the Windows32 API Library
5
6 Copyright (C) 1996 Free Software Foundation
7
8 Author: Scott Christley <scottc@net-community.com>
9 Date: 1996
10
11 This file is part of the Windows32 API Library.
12
13 This library is free software; you can redistribute it and/or
14 modify it under the terms of the GNU Library General Public
15 License as published by the Free Software Foundation; either
16 version 2 of the License, or (at your option) any later version.
17
18 This library is distributed in the hope that it will be useful,
19 but WITHOUT ANY WARRANTY; without even the implied warranty of
20 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21 Library General Public License for more details.
22
23 If you are interested in a warranty or support for this source code,
24 contact Scott Christley <scottc@net-community.com> for more information.
25
26 You should have received a copy of the GNU Library General Public
27 License along with this library; see the file COPYING.LIB.
28 If not, write to the Free Software Foundation,
29 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
30 */
31
32 #ifndef _GNU_H_WINDOWS_H
33 #define _GNU_H_WINDOWS_H
34
35 #ifdef __USE_W32API
36
37 #include_next <windows.h>
38
39 #else /* __USE_W32API */
40
41 #ifndef max
42 #define max(a,b) (((a) > (b)) ? (a) : (b))
43 #endif
44 #ifndef min
45 #define min(a,b) (((a) < (b)) ? (a) : (b))
46 #endif
47
48 #ifndef MAX
49 #define MAX max
50 #endif
51 #ifndef MIN
52 #define MIN min
53 #endif
54
55 #ifndef RC_INVOKED
56 #include <limits.h>
57 #include <stdarg.h>
58 #endif
59
60 /* Base definitions */
61 #include <base.h>
62
63 /* WIN32 messages */
64 #ifndef WIN32_LEAN_AND_MEAN
65 #include <messages.h>
66 #endif
67
68 /* WIN32 definitions */
69 #include <defines.h>
70
71 #ifndef RC_INVOKED
72
73 /* WIN32 structures */
74 #include <structs.h>
75
76 /* WIN32 functions */
77 #ifndef WIN32_LEAN_AND_MEAN
78 #include <funcs.h>
79 #endif
80
81 /* WIN32 PE file format */
82 #include <pe.h>
83
84 #endif /* ! defined (RC_INVOKED) */
85
86 /* WIN32 error codes */
87 #ifndef WIN32_LEAN_AND_MEAN
88 #include <errors.h>
89 #endif
90
91 #ifndef RC_INVOKED
92
93 /* Windows sockets specification version 1.1 */
94 #ifdef Win32_Winsock
95 #ifndef WIN32_LEAN_AND_MEAN
96 #include <sockets.h>
97 #endif
98 #endif
99
100 /* There is a conflict with BOOL between Objective-C and Win32,
101 so the Windows32 API Library defines and uses WINBOOL.
102 However, if we are not using Objective-C then define the normal
103 windows BOOL so Win32 programs compile normally. If you are
104 using Objective-C then you must use WINBOOL for Win32 operations.
105 */
106 #ifndef __OBJC__
107 /* typedef WINBOOL BOOL; */
108 #endif /* !__OBJC__ */
109
110 /* How do we get the VM page size on NT? */
111 #ifndef vm_page_size
112 #define vm_page_size 4096
113 #endif
114
115 #endif /* ! defined (RC_INVOKED) */
116
117 #ifdef __GNUC__
118 #ifndef NONAMELESSUNION
119 #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)
120 #define _ANONYMOUS_UNION __extension__
121 #define _ANONYMOUS_STRUCT __extension__
122 #else
123 #if defined(__cplusplus)
124 #define _ANONYMOUS_UNION __extension__
125 #endif
126 #endif /* __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95) */
127 #endif /* NONAMELESSUNION */
128 #else
129 #define _ANONYMOUS_UNION
130 #define _ANONYMOUS_STRUCT
131 #endif /* __GNUC__ */
132
133 #ifndef _ANONYMOUS_UNION
134 #define _ANONYMOUS_UNION
135 #define _UNION_NAME(x) x
136 #define DUMMYUNIONNAME u
137 #define DUMMYUNIONNAME2 u2
138 #define DUMMYUNIONNAME3 u3
139 #define DUMMYUNIONNAME4 u4
140 #define DUMMYUNIONNAME5 u5
141 #define DUMMYUNIONNAME6 u6
142 #define DUMMYUNIONNAME7 u7
143 #define DUMMYUNIONNAME8 u8
144 #else
145 #define _UNION_NAME(x)
146 #define DUMMYUNIONNAME
147 #define DUMMYUNIONNAME2
148 #define DUMMYUNIONNAME3
149 #define DUMMYUNIONNAME4
150 #define DUMMYUNIONNAME5
151 #define DUMMYUNIONNAME6
152 #define DUMMYUNIONNAME7
153 #define DUMMYUNIONNAME8
154 #endif
155 #ifndef _ANONYMOUS_STRUCT
156 #define _ANONYMOUS_STRUCT
157 #define _STRUCT_NAME(x) x
158 #define DUMMYSTRUCTNAME s
159 #define DUMMYSTRUCTNAME2 s2
160 #define DUMMYSTRUCTNAME3 s3
161 #else
162 #define _STRUCT_NAME(x)
163 #define DUMMYSTRUCTNAME
164 #define DUMMYSTRUCTNAME2
165 #define DUMMYSTRUCTNAME3
166 #endif
167
168 #ifndef DECLARE_STDCALL_P
169 #define DECLARE_STDCALL_P( type ) __stdcall type
170 #endif
171
172 #ifndef NO_STRICT
173 #ifndef STRICT
174 #define STRICT 1
175 #endif
176 #endif
177
178 #endif /* !__USE_W32API */
179
180 #endif /* _GNU_H_WINDOWS_H */