aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2008-12-15 12:51:46 +0000
committerCorinna Vinschen <corinna@vinschen.de>2008-12-15 12:51:46 +0000
commit645298660173d29ccaffe69c64430a4bc212d663 (patch)
treee6486af3a8ef88070872ab74be50f9053651f817
parentf8a41da921a0c42e3fb2740b175c74261323f9ec (diff)
downloadnewlib-645298660173d29ccaffe69c64430a4bc212d663.zip
newlib-645298660173d29ccaffe69c64430a4bc212d663.tar.gz
newlib-645298660173d29ccaffe69c64430a4bc212d663.tar.bz2
* fhandler_registry.cc (fhandler_registry::exists): Handle EACCES.
(fhandler_registry::open): Ditto.
-rw-r--r--winsup/cygwin/ChangeLog5
-rw-r--r--winsup/cygwin/fhandler_registry.cc5
2 files changed, 8 insertions, 2 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 15afc02..2b2e8eb 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,5 +1,10 @@
2008-12-15 Corinna Vinschen <corinna@vinschen.de>
+ * fhandler_registry.cc (fhandler_registry::exists): Handle EACCES.
+ (fhandler_registry::open): Ditto.
+
+2008-12-15 Corinna Vinschen <corinna@vinschen.de>
+
* cygwin.din: Export fgetwc, fgetws, fputwc, fputws, fwide, getwc,
getwchar, putwc, putwchar, ungetwc.
* posix.sgml: Move above functions (add missing) into "implemented
diff --git a/winsup/cygwin/fhandler_registry.cc b/winsup/cygwin/fhandler_registry.cc
index c45dc1c..cfe4c07 100644
--- a/winsup/cygwin/fhandler_registry.cc
+++ b/winsup/cygwin/fhandler_registry.cc
@@ -256,7 +256,7 @@ fhandler_registry::exists ()
if (!val_only)
hKey = open_key (path, KEY_READ, wow64, false);
- if (hKey != (HKEY) INVALID_HANDLE_VALUE)
+ if (hKey != (HKEY) INVALID_HANDLE_VALUE || get_errno () == EACCES)
file_type = 1;
else
{
@@ -683,7 +683,8 @@ fhandler_registry::open (int flags, mode_t mode)
handle = open_key (path, KEY_READ, wow64, false);
if (handle == (HKEY) INVALID_HANDLE_VALUE)
{
- handle = open_key (path, KEY_READ, wow64, true);
+ if (get_errno () != EACCES)
+ handle = open_key (path, KEY_READ, wow64, true);
if (handle == (HKEY) INVALID_HANDLE_VALUE)
{
res = 0;