From b18cb86be7509b4125732f2b25ff3a6e5f423fa2 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Tue, 19 Apr 2011 10:02:06 +0000 Subject: * 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. --- winsup/cygwin/winsup.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'winsup/cygwin/winsup.h') diff --git a/winsup/cygwin/winsup.h b/winsup/cygwin/winsup.h index 848967866..087da61f4 100644 --- a/winsup/cygwin/winsup.h +++ b/winsup/cygwin/winsup.h @@ -70,6 +70,12 @@ int fcntl64 (int fd, int cmd, ...); application provided path strings we handle. */ #define NT_MAX_PATH 32768 +/* This definition allows to define wide char strings using macros as + parameters. See the definition of __CONCAT in newlib's sys/cdefs.h + and accompanying comment. */ +#define __WIDE(a) L ## a +#define _WIDE(a) __WIDE(a) + #ifdef __cplusplus extern const char case_folded_lower[]; -- cgit v1.2.3