4 Include this file if you wish to use the Windows32 API Library
6 Copyright (C) 1996 Free Software Foundation
8 Author: Scott Christley <scottc@net-community.com>
11 This file is part of the Windows32 API Library.
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.
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.
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.
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.
32 #ifndef _GNU_H_WINDOWS_H
33 #define _GNU_H_WINDOWS_H
37 #include_next <windows.h>
39 #else /* __USE_W32API */
42 #define max(a,b) (((a) > (b)) ? (a) : (b))
45 #define min(a,b) (((a) < (b)) ? (a) : (b))
60 /* Base definitions */
63 /* WIN32 definitions */
68 /* WIN32 structures */
72 #ifndef WIN32_LEAN_AND_MEAN
76 /* WIN32 PE file format */
79 #endif /* ! defined (RC_INVOKED) */
81 /* WIN32 error codes */
82 //#ifndef WIN32_LEAN_AND_MEAN
88 /* There is a conflict with BOOL between Objective-C and Win32,
89 so the Windows32 API Library defines and uses WINBOOL.
90 However, if we are not using Objective-C then define the normal
91 windows BOOL so Win32 programs compile normally. If you are
92 using Objective-C then you must use WINBOOL for Win32 operations.
95 /* typedef WINBOOL BOOL; */
96 #endif /* !__OBJC__ */
98 /* How do we get the VM page size on NT? */
100 #define vm_page_size 4096
103 #endif /* ! defined (RC_INVOKED) */
106 #ifndef NONAMELESSUNION
107 #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)
108 #define _ANONYMOUS_UNION __extension__
109 #define _ANONYMOUS_STRUCT __extension__
111 #if defined(__cplusplus)
112 #define _ANONYMOUS_UNION __extension__
114 #endif /* __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95) */
115 #endif /* NONAMELESSUNION */
117 #define _ANONYMOUS_UNION
118 #define _ANONYMOUS_STRUCT
119 #endif /* __GNUC__ */
121 #ifndef _ANONYMOUS_UNION
122 #define _ANONYMOUS_UNION
123 #define _UNION_NAME(x) x
124 #define DUMMYUNIONNAME u
125 #define DUMMYUNIONNAME2 u2
126 #define DUMMYUNIONNAME3 u3
127 #define DUMMYUNIONNAME4 u4
128 #define DUMMYUNIONNAME5 u5
129 #define DUMMYUNIONNAME6 u6
130 #define DUMMYUNIONNAME7 u7
131 #define DUMMYUNIONNAME8 u8
133 #define _UNION_NAME(x)
134 #define DUMMYUNIONNAME
135 #define DUMMYUNIONNAME2
136 #define DUMMYUNIONNAME3
137 #define DUMMYUNIONNAME4
138 #define DUMMYUNIONNAME5
139 #define DUMMYUNIONNAME6
140 #define DUMMYUNIONNAME7
141 #define DUMMYUNIONNAME8
143 #ifndef _ANONYMOUS_STRUCT
144 #define _ANONYMOUS_STRUCT
145 #define _STRUCT_NAME(x) x
146 #define DUMMYSTRUCTNAME s
147 #define DUMMYSTRUCTNAME2 s2
148 #define DUMMYSTRUCTNAME3 s3
150 #define _STRUCT_NAME(x)
151 #define DUMMYSTRUCTNAME
152 #define DUMMYSTRUCTNAME2
153 #define DUMMYSTRUCTNAME3
156 #ifndef DECLARE_STDCALL_P
157 #define DECLARE_STDCALL_P( type ) __stdcall type
166 #endif /* !__USE_W32API */
168 #endif /* _GNU_H_WINDOWS_H */