diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2005-03-01 11:51:29 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2005-03-01 11:51:29 +0000 |
commit | 4717214c201b6d54b7c58d1fedf6e88c5336f55c (patch) | |
tree | a744789ae843e8d73f7a0c2f78ba8862bca80104 /winsup/cygwin/syscalls.cc | |
parent | 93c60b6d6a34653d966a90f2bdb4fd6e28ed0a76 (diff) | |
download | cygnal-4717214c201b6d54b7c58d1fedf6e88c5336f55c.tar.gz cygnal-4717214c201b6d54b7c58d1fedf6e88c5336f55c.tar.bz2 cygnal-4717214c201b6d54b7c58d1fedf6e88c5336f55c.zip |
* fhandler_clipboard.cc (fhandler_dev_clipboard::write): Never set
errno to 0.
(fhandler_dev_clipboard::read): Ditto.
* fhandler_windows.cc (fhandler_windows::read): Ditto.
* scandir.cc (scandir): Ditto.
* syscalls.cc (_fstat64_r): Ditto.
(_fstat_r): Ditto.
(_stat64_r): Ditto.
(_stat_r): Ditto.
* mmap.cc (mmap64): Fix /dev/zero mapping.
Diffstat (limited to 'winsup/cygwin/syscalls.cc')
-rw-r--r-- | winsup/cygwin/syscalls.cc | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc index 8cd7368ec..4eda42bee 100644 --- a/winsup/cygwin/syscalls.cc +++ b/winsup/cygwin/syscalls.cc @@ -879,8 +879,7 @@ _fstat64_r (struct _reent *ptr, int fd, struct __stat64 *buf) { int ret; - set_errno (0); - if ((ret = fstat64 (fd, buf)) == -1 && get_errno () != 0) + if ((ret = fstat64 (fd, buf)) == -1) ptr->_errno = get_errno (); return ret; } @@ -900,8 +899,7 @@ _fstat_r (struct _reent *ptr, int fd, struct __stat32 *buf) { int ret; - set_errno (0); - if ((ret = fstat (fd, buf)) == -1 && get_errno () != 0) + if ((ret = fstat (fd, buf)) == -1) ptr->_errno = get_errno (); return ret; } @@ -1039,8 +1037,7 @@ _stat64_r (struct _reent *ptr, const char *name, struct __stat64 *buf) { int ret; - set_errno (0); - if ((ret = stat64 (name, buf)) == -1 && get_errno () != 0) + if ((ret = stat64 (name, buf)) == -1) ptr->_errno = get_errno (); return ret; } @@ -1060,8 +1057,7 @@ _stat_r (struct _reent *ptr, const char *name, struct __stat32 *buf) { int ret; - set_errno (0); - if ((ret = stat (name, buf)) == -1 && get_errno () != 0) + if ((ret = stat (name, buf)) == -1) ptr->_errno = get_errno (); return ret; } |