diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2014-08-15 17:50:53 +0400 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2014-08-15 17:50:53 +0400 |
commit | fc15ff2f0dbcf759e2a5e9cdf648ba0241535e12 (patch) | |
tree | 24771bd0b13391981736e0ba6e88a69810df17f8 /winsup/cygwin/cygerrno.h | |
parent | 1b580c732ad14228f5b28897523e61d9d49537fd (diff) |
* cygerrno.h (seterrno): Define as (always) inline function.
* errno.cc (seterrno): Remove.
Diffstat (limited to 'winsup/cygwin/cygerrno.h')
-rw-r--r-- | winsup/cygwin/cygerrno.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/winsup/cygwin/cygerrno.h b/winsup/cygwin/cygerrno.h index 337dd75fc..b9ec7b61d 100644 --- a/winsup/cygwin/cygerrno.h +++ b/winsup/cygwin/cygerrno.h @@ -1,7 +1,7 @@ /* cygerrno.h: main Cygwin header file. - Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2009, 2010, 2011, 2012, 2013 - Red Hat, Inc. + Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2009, 2010, 2011, 2012, 2013, + 2014 Red Hat, Inc. This file is part of Cygwin. @@ -16,10 +16,15 @@ details. */ void __reg3 seterrno_from_win_error (const char *file, int line, DWORD code); void __reg3 seterrno_from_nt_status (const char *file, int line, NTSTATUS status); -void __reg2 seterrno (const char *, int line); int __reg2 geterrno_from_win_error (DWORD code = GetLastError (), int deferrno = 13 /*EACCESS*/); int __reg2 geterrno_from_nt_status (NTSTATUS status, int deferrno = 13 /*EACCESS*/); +inline void __attribute__ ((always_inline)) +seterrno (const char *file, int line) +{ + seterrno_from_win_error (file, line, GetLastError ()); +} + #define __seterrno() seterrno (__FILE__, __LINE__) #define __seterrno_from_win_error(val) seterrno_from_win_error (__FILE__, __LINE__, val) #define __seterrno_from_nt_status(status) seterrno_from_nt_status (__FILE__, __LINE__, status) |