2010-07-21 Ozkan Sezer <sezeroz@gmail.com>
* crt/gs_support.c: Change the included headers to get the
STATUS_STACK_BUFFER_OVERRUN macro from ntstatus.h.
(__report_gsfailure): Replace __attribute__((unused)) by
__MINGW_ATTRIB_UNUSED.
git-svn-id: svn+ssh://svn.code.sf.net/p/mingw-w64/code/trunk@2917 4407c894-4637-0410-b4f5-ada5f102cad1
diff --git a/mingw-w64-crt/ChangeLog b/mingw-w64-crt/ChangeLog
index 93a510c..3f86671 100644
--- a/mingw-w64-crt/ChangeLog
+++ b/mingw-w64-crt/ChangeLog
@@ -1,3 +1,10 @@
+2010-07-21 Ozkan Sezer <sezeroz@gmail.com>
+
+ * crt/gs_support.c: Change the included headers to get the
+ STATUS_STACK_BUFFER_OVERRUN macro from ntstatus.h.
+ (__report_gsfailure): Replace __attribute__((unused)) by
+ __MINGW_ATTRIB_UNUSED.
+
2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
* crt/gs_support.c (_ReturnAddress, _AddressOfReturnAddress): wrap
diff --git a/mingw-w64-crt/crt/gs_support.c b/mingw-w64-crt/crt/gs_support.c
index 3393591..dd07238 100644
--- a/mingw-w64-crt/crt/gs_support.c
+++ b/mingw-w64-crt/crt/gs_support.c
@@ -4,7 +4,14 @@
* No warranty is given; refer to the file DISCLAIMER.PD within this package.
*/
+#ifndef WIN32_LEAN_AND_MEAN
+#define WIN32_LEAN_AND_MEAN
+#endif
+#define WIN32_NO_STATUS
+#include <stdlib.h> /* abort () */
#include <windows.h>
+#undef WIN32_NO_STATUS
+#include <ntstatus.h> /* STATUS macros */
#ifdef _WIN64
#include <intrin.h>
#endif
@@ -22,7 +29,7 @@
PCONTEXT, PVOID *, PULONG64, PVOID);
#endif
-typedef LONG NTSTATUS;
+typedef LONG NTSTATUS; /* same as in ntdef.h / winternl.h */
#define UNW_FLAG_NHANDLER 0x00
@@ -100,7 +107,7 @@
__declspec(noreturn) void __cdecl
__report_gsfailure (ULONGLONG StackCookie)
{
- volatile UINT_PTR cookie[2] __attribute__((unused));
+ volatile UINT_PTR cookie[2] __MINGW_ATTRIB_UNUSED;
#ifdef _WIN64
ULONG64 controlPC, imgBase, establisherFrame;
PRUNTIME_FUNCTION fctEntry;