aboutsummaryrefslogtreecommitdiff
path: root/winsup/cygwin/environ.cc
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 /winsup/cygwin/environ.cc
parent689221682269bf5c40567d15d28bfb73369253e7 (diff)
downloadnewlib-9e1ab0ca55abe4eba9de5342732b8ababafc6df1.zip
newlib-9e1ab0ca55abe4eba9de5342732b8ababafc6df1.tar.gz
newlib-9e1ab0ca55abe4eba9de5342732b8ababafc6df1.tar.bz2
* environ.cc (regopt): Scan HKLM if HKCU scan fails.
Diffstat (limited to 'winsup/cygwin/environ.cc')
-rw-r--r--winsup/cygwin/environ.cc6
1 files changed, 6 insertions, 0 deletions
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;
}