Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/winsup
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2008-12-15 15:51:46 +0300
committerCorinna Vinschen <corinna@vinschen.de>2008-12-15 15:51:46 +0300
commit645298660173d29ccaffe69c64430a4bc212d663 (patch)
treee6486af3a8ef88070872ab74be50f9053651f817 /winsup
parentf8a41da921a0c42e3fb2740b175c74261323f9ec (diff)
* fhandler_registry.cc (fhandler_registry::exists): Handle EACCES.
(fhandler_registry::open): Ditto.
Diffstat (limited to 'winsup')
-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 15afc023a..2b2e8ebde 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 c45dc1c71..cfe4c0712 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;