summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/cygerrno.h
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2017-03-10 20:21:09 +0100
committerCorinna Vinschen <corinna@vinschen.de>2017-03-10 20:21:09 +0100
commit44b1746a41921533d27aca414a9188314cb725b6 (patch)
tree5f325463ec1c233b9308834b1e3f03f1f788cb5b /winsup/cygwin/cygerrno.h
parentf2e6553c2528c2afe048366821725eb3ca26e044 (diff)
downloadcygnal-44b1746a41921533d27aca414a9188314cb725b6.tar.gz
cygnal-44b1746a41921533d27aca414a9188314cb725b6.tar.bz2
cygnal-44b1746a41921533d27aca414a9188314cb725b6.zip
errno: Stop using _impure_ptr->_errno completely
We use errno AKA _REENT->_errno since the last century and only set _impure_ptr->_errno for backward compat. Stop that. Also, remove the last check for _impure_ptr->_errno in Cygwin code. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Diffstat (limited to 'winsup/cygwin/cygerrno.h')
-rw-r--r--winsup/cygwin/cygerrno.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/winsup/cygwin/cygerrno.h b/winsup/cygwin/cygerrno.h
index ce33d971a..05de6ab0d 100644
--- a/winsup/cygwin/cygerrno.h
+++ b/winsup/cygwin/cygerrno.h
@@ -30,7 +30,7 @@ extern inline int
__set_errno (const char *fn, int ln, int val)
{
debug_printf ("%s:%d setting errno %d", fn, ln, val);
- return errno = _impure_ptr->_errno = val;
+ return errno = val;
}
#define set_errno(val) __set_errno (__PRETTY_FUNCTION__, __LINE__, (val))
@@ -45,7 +45,7 @@ class save_errno
save_errno (int what) {saved = get_errno (); set_errno (what); }
void set (int what) {set_errno (what); saved = what;}
void reset () {saved = get_errno ();}
- ~save_errno () {errno = _impure_ptr->_errno = saved;}
+ ~save_errno () {errno = saved;}
};
extern const char *__sp_fn;