aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2000-05-22 21:19:36 +0000
committerChristopher Faylor <me@cgf.cx>2000-05-22 21:19:36 +0000
commit9e1ab0ca55abe4eba9de5342732b8ababafc6df1 (patch)
treef56e5d3a9cc959690ffd4654005bef22393ed61f
parent689221682269bf5c40567d15d28bfb73369253e7 (diff)
downloadnewlib-9e1ab0ca55abe4eba9de5342732b8ababafc6df1.zip
newlib-9e1ab0ca55abe4eba9de5342732b8ababafc6df1.tar.gz
newlib-9e1ab0ca55abe4eba9de5342732b8ababafc6df1.tar.bz2
* environ.cc (regopt): Scan HKLM if HKCU scan fails.
-rw-r--r--winsup/cygwin/ChangeLog4
-rw-r--r--winsup/cygwin/environ.cc6
2 files changed, 10 insertions, 0 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 01384d0..7a03dc2 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,7 @@
+Mon May 22 17:11:25 2000 Christopher Faylor <cgf@cygnus.com>
+
+ * environ.cc (regopt): Scan HKLM if HKCU scan fails.
+
Mon May 16 23:39:00 2000 Corinna Vinschen <corinna@vinschen.de>
* dir.cc (rmdir): Care for misleading error messages
diff --git a/winsup/cygwin/environ.cc b/winsup/cygwin/environ.cc
index 7b9c33a..bb493b0 100644
--- a/winsup/cygwin/environ.cc
+++ b/winsup/cygwin/environ.cc
@@ -433,6 +433,12 @@ regopt (const char *name)
MALLOC_CHECK;
if (r.get_string (lname, buf, sizeof (buf) - 1, "") == ERROR_SUCCESS)
parse_options (buf);
+ else
+ {
+ reg_key r1 (HKEY_LOCAL_MACHINE, KEY_READ, CYGWIN_INFO_PROGRAM_OPTIONS_NAME, NULL);
+ if (r1.get_string (lname, buf, sizeof (buf) - 1, "") == ERROR_SUCCESS)
+ parse_options (buf);
+ }
MALLOC_CHECK;
}