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:
authorCorinna Vinschen <corinna@vinschen.de>2010-04-16 19:42:29 +0400
committerCorinna Vinschen <corinna@vinschen.de>2010-04-16 19:42:29 +0400
commit7cdcd90ca146cd1322051385d92114b9b927776b (patch)
tree14e07ae36b023f3f1140ecb02ad8a3b795ef3418 /winsup/cygwin/cygerrno.h
parent6b0f100a6dd94d995a5d66aec0a1c4822e069435 (diff)
* cygerrno.h (seterrno_from_nt_status): Declare.
(__seterrno_from_nt_status): Call seterrno_from_nt_status. * errno.cc (seterrno_from_win_error): Set errno without calling set_errno to avoid packing strace output with errno messages. (seterrno_from_nt_status): New function to print NT status as well as resulting Windows error.
Diffstat (limited to 'winsup/cygwin/cygerrno.h')
-rw-r--r--winsup/cygwin/cygerrno.h10
1 files changed, 3 insertions, 7 deletions
diff --git a/winsup/cygwin/cygerrno.h b/winsup/cygwin/cygerrno.h
index e6ec7c556..e1a1af07d 100644
--- a/winsup/cygwin/cygerrno.h
+++ b/winsup/cygwin/cygerrno.h
@@ -1,6 +1,6 @@
/* cygerrno.h: main Cygwin header file.
- Copyright 2000, 2001, 2002, 2003, 2004 Red Hat, Inc.
+ Copyright 2000, 2001, 2002, 2003, 2004, 2010 Red Hat, Inc.
This file is part of Cygwin.
@@ -13,17 +13,13 @@ details. */
#include <errno.h>
void __stdcall seterrno_from_win_error (const char *file, int line, DWORD code) __attribute__ ((regparm(3)));
+void __stdcall seterrno_from_nt_status (const char *file, int line, NTSTATUS status) __attribute__ ((regparm(3)));
void __stdcall seterrno (const char *, int line) __attribute__ ((regparm(2)));
int __stdcall geterrno_from_win_error (DWORD code = GetLastError (), int deferrno = 13 /*EACCESS*/) __attribute__ ((regparm(2)));
#define __seterrno() seterrno (__FILE__, __LINE__)
#define __seterrno_from_win_error(val) seterrno_from_win_error (__FILE__, __LINE__, val)
-#define __seterrno_from_nt_status(status) \
- ({ \
- DWORD winerr = RtlNtStatusToDosError (status); \
- SetLastError (winerr); \
- __seterrno_from_win_error (winerr); \
- })
+#define __seterrno_from_nt_status(status) seterrno_from_nt_status (__FILE__, __LINE__, status)
inline int
__set_errno (const char *fn, int ln, int val)