mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-01-19 04:49:25 +08:00
* cygerrno.h (seterrno): Define as (always) inline function.
* errno.cc (seterrno): Remove.
This commit is contained in:
parent
1b580c732a
commit
fc15ff2f0d
@ -1,3 +1,8 @@
|
||||
2014-08-15 Corinna Vinschen <corinna@vinschen.de>
|
||||
|
||||
* cygerrno.h (seterrno): Define as (always) inline function.
|
||||
* errno.cc (seterrno): Remove.
|
||||
|
||||
2014-08-14 Corinna Vinschen <corinna@vinschen.de>
|
||||
|
||||
* dll_init.sgml: Remove.
|
||||
|
@ -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)
|
||||
|
@ -1,7 +1,7 @@
|
||||
/* errno.cc: errno-related functions
|
||||
|
||||
Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
|
||||
2008, 2009, 2010, 2011, 2012, 2013 Red Hat, Inc.
|
||||
2008, 2009, 2010, 2011, 2012, 2013, 2014 Red Hat, Inc.
|
||||
|
||||
This file is part of Cygwin.
|
||||
|
||||
@ -363,13 +363,6 @@ seterrno_from_nt_status (const char *file, int line, NTSTATUS status)
|
||||
errno = _impure_ptr->_errno = geterrno_from_win_error (code, EACCES);
|
||||
}
|
||||
|
||||
/* seterrno: Set `errno' based on GetLastError (). */
|
||||
void __reg2
|
||||
seterrno (const char *file, int line)
|
||||
{
|
||||
seterrno_from_win_error (file, line, GetLastError ());
|
||||
}
|
||||
|
||||
static char *
|
||||
strerror_worker (int errnum)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user