+2017-06-20 Keith Marshall <keithmarshall@users.sourceforge.net>
+
+ Make <winnt.h> header effectively self-contained.
+
+ * include/winnt.h (_WINNT_H): Defer definition unless included via...
+ (windef.h): ...this; include it, to enforce inclusion order, then...
+ [_WINNT_H]: ...re-evaluate it, to avoid recursive inclusion loop.
+
2017-06-12 Keith Marshall <keithmarshall@users.sourceforge.net>
Consolidate <winuser.h> version specific conditionals.
*/
#ifndef _WINNT_H
#pragma GCC system_header
+
+/* For effective self-containment, <winnt.h> requires <windef.h> to have
+ * been included, BEFORE defining the _WINNT_H repeat inclusion guard...
+ */
+#include <windef.h>
+/* ...but this has the unfortunate side effect that <windef.h> may then
+ * recursively include <winnt.h>; retest the inclusion guard, to break
+ * out of any ensuing recursive inclusion loop.
+ */
+#ifndef _WINNT_H
#define _WINNT_H
#include <winerror.h>
_END_C_DECLS
#endif /* ! RC_INVOKED */
+#endif /* !_WINNT_H: internal recursion break */
#endif /* !_WINNT_H: $RCSfile$: end of file */