summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/registry.cc
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2007-02-22 10:54:47 +0000
committerCorinna Vinschen <corinna@vinschen.de>2007-02-22 10:54:47 +0000
commit570858c30fa6add591bf74907de4a7fb93312f20 (patch)
tree888b58b3528c6ad8eb9a749badf463ad66d457f1 /winsup/cygwin/registry.cc
parent8782b2a2af66bdbc9de30bb25351628295fbb7d1 (diff)
downloadcygnal-570858c30fa6add591bf74907de4a7fb93312f20.tar.gz
cygnal-570858c30fa6add591bf74907de4a7fb93312f20.tar.bz2
cygnal-570858c30fa6add591bf74907de4a7fb93312f20.zip
* Makefile.in (DLL_IMPORTS): Add libntdll.a.
* autoload.cc: Remove all symbols from advapi32.dll, kernel32.dll and ntdll.dll available on all platforms since NT4. Throughout remove all usage of wincap.is_winnt. * dcrt0.cc (dll_crt0_0): Remove call to mmap_init. * fhandler.h (class fhandler_base): Remove has_changed flag. (fhandler_disk_file::touch_ctime): Remove declaration. (fhandler_disk_file::readdir_9x): Ditto. (fhandler_disk_file::touch_ctime): Remove. (fhandler_disk_file::readdir_9x): Remove. (fhandler_disk_file::closedir): Call NtClose instead of CloseHandle. * mmap.cc: Throughout call CreateMapping and MapView directly. (VirtualProt9x): Remove. (VirtualProtNT): Remove. (VirtualProtEx9x): Remove. (VirtualProtExNT): Remove. (VirtualProtect): Remove define. (VirtualProtectEx): Remove define. (CreateMapping9x): Remove. (CreateMappingNT): Rename to CreateMapping. (MapView9x): Remove. (MapViewNT): Rename to MapView. (struct mmap_func_t): Remove definition. (mmap_funcs_9x): Remove. (mmap_funcs_nt): Remove. (mmap_func): Remove. (mmap_init): Remove. * net.cc (getdomainname): Drop comment. Use NT4 registry key only. (get_95_ifconf): Remove. * pinfo.cc (winpids::enumNT): Rename to winpids::enum_processes. (winpids::enum9x): Remove. (winpids::set): Just call enum_processes directly. (winpids::enum_init): Ditto. * pinfo.h (class winpids): Drop enum_processes pointer. Rename enumNT to enum_processes. Drop enum9x declaration. Drop initialization of enum_processes throughout. * registry.cc (get_registry_hive_path): Just create NT key. (load_registry_hive): Only load NT specific file. * syscalls.cc (unlink_9x): Remove. (unlink): Just call unlink_nt. * wincap.cc: Remove is_winnt flag throughout. * wincap.h: Ditto. * winsup.h: Remove mmap_init declaration.
Diffstat (limited to 'winsup/cygwin/registry.cc')
-rw-r--r--winsup/cygwin/registry.cc12
1 files changed, 4 insertions, 8 deletions
diff --git a/winsup/cygwin/registry.cc b/winsup/cygwin/registry.cc
index 723a71098..1c15aa553 100644
--- a/winsup/cygwin/registry.cc
+++ b/winsup/cygwin/registry.cc
@@ -1,7 +1,7 @@
/* registry.cc: registry interface
Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
- 2005, 2006 Red Hat, Inc.
+ 2005, 2006, 2007 Red Hat, Inc.
This file is part of Cygwin.
@@ -215,9 +215,8 @@ get_registry_hive_path (const char *name, char *path)
if (!name || !path)
return NULL;
- __small_sprintf (key, "SOFTWARE\\Microsoft\\Windows%s\\CurrentVersion\\ProfileList\\",
- wincap.is_winnt ()?" NT":"");
- strcat (key, name);
+ __small_sprintf (key, "SOFTWARE\\Microsoft\\WindowsNT\\CurrentVersion\\"
+ "ProfileList\\%s", name);
if (!RegOpenKeyExA (HKEY_LOCAL_MACHINE, key, 0, KEY_READ, &hkey))
{
char buf[256];
@@ -253,10 +252,7 @@ load_registry_hive (const char * name)
}
if (get_registry_hive_path (name, path))
{
- if (wincap.is_winnt ())
- strcat (path, "\\NTUSER.DAT");
- else
- strcat (path, "\\USER.DAT");
+ strcat (path, "\\NTUSER.DAT");
if ((ret = RegLoadKeyA (HKEY_USERS, name, path)) != ERROR_SUCCESS)
debug_printf ("Loading user registry hive for %s failed: %d", name, ret);
}