Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--winsup/cygwin/ChangeLog7
-rw-r--r--winsup/cygwin/exceptions.cc2
-rw-r--r--winsup/cygwin/ntdll.h63
3 files changed, 12 insertions, 60 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 971e37edb..eaa6b8c75 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,5 +1,12 @@
2012-06-27 Corinna Vinschen <corinna@vinschen.de>
+ * exceptions.cc (exception::handle): Cast exception code to NTSTATUS
+ for comparison.
+ * ntdll.h: Drop defining NT status codes in favor of including
+ ntstatus.h.
+
+2012-06-27 Corinna Vinschen <corinna@vinschen.de>
+
* miscfuncs.cc (WritePipeOverlapped): Define second parameter LPCVOID,
rather than PCVOID.
* miscfuncs.h (WritePipeOverlapped): Ditto.
diff --git a/winsup/cygwin/exceptions.cc b/winsup/cygwin/exceptions.cc
index be3840fff..4c477e05d 100644
--- a/winsup/cygwin/exceptions.cc
+++ b/winsup/cygwin/exceptions.cc
@@ -664,7 +664,7 @@ exception::handle (EXCEPTION_RECORD *e, exception_list *frame, CONTEXT *in, void
stackdump ((DWORD) ebp, in, e);
}
- if (e->ExceptionCode == STATUS_ACCESS_VIOLATION)
+ if ((NTSTATUS) e->ExceptionCode == STATUS_ACCESS_VIOLATION)
{
int error_code = 0;
if (si.si_code == SEGV_ACCERR) /* Address present */
diff --git a/winsup/cygwin/ntdll.h b/winsup/cygwin/ntdll.h
index 920bdcf48..2f63f41da 100644
--- a/winsup/cygwin/ntdll.h
+++ b/winsup/cygwin/ntdll.h
@@ -12,66 +12,11 @@
#ifndef _NTDLL_H
#define _NTDLL_H 1
-/* NTSTATUS values. */
-#define STATUS_NOT_ALL_ASSIGNED ((NTSTATUS) 0x00000106)
-#define STATUS_OBJECT_NAME_EXISTS ((NTSTATUS) 0x40000000)
-#define STATUS_BUFFER_OVERFLOW ((NTSTATUS) 0x80000005)
-#define STATUS_NO_MORE_FILES ((NTSTATUS) 0x80000006)
-#ifdef STATUS_INVALID_INFO_CLASS /* Defined as unsigned value in subauth.h */
-#undef STATUS_INVALID_INFO_CLASS
-#endif
-#define STATUS_INVALID_INFO_CLASS ((NTSTATUS) 0xc0000003)
-#define STATUS_NOT_IMPLEMENTED ((NTSTATUS) 0xc0000002)
-#define STATUS_INFO_LENGTH_MISMATCH ((NTSTATUS) 0xc0000004)
-#ifdef STATUS_INVALID_HANDLE /* Defined as unsigned value in winbase.h */
-#undef STATUS_INVALID_HANDLE
-#endif
-#define STATUS_INVALID_HANDLE ((NTSTATUS) 0xc0000008)
-#ifndef STATUS_INVALID_PARAMETER
-#define STATUS_INVALID_PARAMETER ((NTSTATUS) 0xc000000d)
-#endif
-#define STATUS_NO_SUCH_FILE ((NTSTATUS) 0xc000000f)
-#define STATUS_INVALID_DEVICE_REQUEST ((NTSTATUS) 0xc0000010)
-#define STATUS_END_OF_FILE ((NTSTATUS) 0xc0000011)
-#define STATUS_NO_MEDIA_IN_DEVICE ((NTSTATUS) 0xc0000013)
-#define STATUS_ACCESS_DENIED ((NTSTATUS) 0xc0000022)
-#define STATUS_BUFFER_TOO_SMALL ((NTSTATUS) 0xc0000023)
-#define STATUS_OBJECT_TYPE_MISMATCH ((NTSTATUS) 0xc0000024)
-#define STATUS_OBJECT_NAME_INVALID ((NTSTATUS) 0xc0000033)
-#define STATUS_OBJECT_NAME_NOT_FOUND ((NTSTATUS) 0xc0000034)
-#define STATUS_OBJECT_NAME_COLLISION ((NTSTATUS) 0xc0000035)
-#define STATUS_OBJECT_PATH_NOT_FOUND ((NTSTATUS) 0xc000003A)
-#define STATUS_SHARING_VIOLATION ((NTSTATUS) 0xc0000043)
-#define STATUS_EAS_NOT_SUPPORTED ((NTSTATUS) 0xc000004f)
-#define STATUS_EA_TOO_LARGE ((NTSTATUS) 0xc0000050)
-#define STATUS_NONEXISTENT_EA_ENTRY ((NTSTATUS) 0xc0000051)
-#define STATUS_NO_EAS_ON_FILE ((NTSTATUS) 0xc0000052)
-#define STATUS_LOCK_NOT_GRANTED ((NTSTATUS) 0xc0000055)
-#define STATUS_DELETE_PENDING ((NTSTATUS) 0xc0000056)
-#define STATUS_PROCEDURE_NOT_FOUND ((NTSTATUS) 0xc000007a)
-#define STATUS_DISK_FULL ((NTSTATUS) 0xc000007f)
-#define STATUS_WORKING_SET_QUOTA ((NTSTATUS) 0xc00000a1)
-#define STATUS_INSTANCE_NOT_AVAILABLE ((NTSTATUS) 0xc00000ab)
-#define STATUS_PIPE_NOT_AVAILABLE ((NTSTATUS) 0xc00000ac)
-#define STATUS_INVALID_PIPE_STATE ((NTSTATUS) 0xc00000ad)
-#define STATUS_PIPE_BUSY ((NTSTATUS) 0xc00000ae)
-#define STATUS_NOT_SUPPORTED ((NTSTATUS) 0xc00000bb)
-#define STATUS_BAD_NETWORK_PATH ((NTSTATUS) 0xc00000be)
-#define STATUS_INVALID_NETWORK_RESPONSE ((NTSTATUS) 0xc00000c3)
-#define STATUS_BAD_NETWORK_NAME ((NTSTATUS) 0xc00000cc)
-#define STATUS_DIRECTORY_NOT_EMPTY ((NTSTATUS) 0xc0000101)
-#define STATUS_PROCESS_IS_TERMINATING ((NTSTATUS) 0xc000010a)
-#define STATUS_CANNOT_DELETE ((NTSTATUS) 0xc0000121)
-#define STATUS_INVALID_LEVEL ((NTSTATUS) 0xc0000148)
-#ifndef STATUS_DLL_NOT_FOUND
-#define STATUS_DLL_NOT_FOUND ((NTSTATUS) 0xc0000135)
-#endif
-#ifndef STATUS_ENTRYPOINT_NOT_FOUND
-#define STATUS_ENTRYPOINT_NOT_FOUND ((NTSTATUS) 0xc0000139)
+#ifndef __MINGW64_VERSION_MAJOR
+# include <ddk/ntstatus.h>
+#else
+# include <ntstatus.h>
#endif
-#define STATUS_NOT_FOUND ((NTSTATUS) 0xc0000225)
-#define STATUS_BAD_DLL_ENTRYPOINT ((NTSTATUS) 0xc0000251)
-#define STATUS_ILLEGAL_DLL_RELOCATION ((NTSTATUS) 0xc0000269)
/* custom status code: */
#define STATUS_ILLEGAL_DLL_PSEUDO_RELOCATION ((NTSTATUS) 0xe0000269)