* Makefile.in (DLL_IMPORTS): Drop advapi32.dll.
* autoload.cc: Enable autoloading advapi32 functions. * environ.cc (regopt): Use wide char arguments in reg_key functions. * fhandler_console.cc (beep): Ditto. Use WCHAR throughout. * registry.cc (reg_key): Rewrite reg_key class to use native NT registry functions. Use WCHAR string parameters throughout. Use PCWSTR rather than const WCHAR. Drop multibyte char functionality. Drop unused methods. (get_registry_hive_path): Use RtlQueryRegistryValues to fetch path from registry. (load_registry_hive): Drop useless check for user hive being available. Load hive using NtLoadKey. * registry.h: Accommodate above changes. * sched.cc (sched_rr_get_interval): Use wide char arguments in reg_key functions. * shared.cc (init_installation_root): Ditto. (shared_info::init_obcaseinsensitive): Use RtlQueryRegistryValues to fetch obcaseinsensitive value. (shared_info::heap_slop_size): Use wide char arguments in reg_key functions. (shared_info::heap_chunk_size): Ditto. * syscalls.cc (gethostid): Ditto. * winsup.h (__WIDE): Define. (_WIDE): Define. * libc/minires-os-if.c (get_registry_dns_items): Don't fetch values from registry. Just extract them from given UNICODE_STRING parameter. (get_registry_dns): Fetch all registry values at once using RtlQueryRegistryValues.
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
process's environment.
|
||||
|
||||
Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
|
||||
2006, 2007, 2008, 2009 Red Hat, Inc.
|
||||
2006, 2007, 2008, 2009, 2010, 2011 Red Hat, Inc.
|
||||
|
||||
This software is a copyrighted work licensed under the terms of the
|
||||
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
|
||||
@@ -710,7 +710,7 @@ regopt (const WCHAR *name, char *buf)
|
||||
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
reg_key r (i, KEY_READ, CYGWIN_INFO_PROGRAM_OPTIONS_NAME, NULL);
|
||||
reg_key r (i, KEY_READ, _WIDE (CYGWIN_INFO_PROGRAM_OPTIONS_NAME), NULL);
|
||||
|
||||
if (r.get_string (lname.Buffer, (PWCHAR) buf, NT_MAX_PATH, L"") == ERROR_SUCCESS)
|
||||
{
|
||||
|
Reference in New Issue
Block a user