* fhandler_registry.cc (RegOpenUserClassesRoot): Only define when

building against w32api headers.
	(RegOpenCurrentUser): Ditto.
	* fhandler_tty.cc (GetNamedPipeClientProcessId): Ditto.
	* ntdll.h (enum _PROCESSINFOCLASS): Add ProcessImageFileName.
	(RtlInitAnsiString): Declare.
	(RtlUnicodeStringToAnsiSize): Declare.
	* sched.cc (GetForegroundWindow): Ditto.
	* sec_helper.cc (SECURITY_NT_NON_UNIQUE): Define as
	SECURITY_NT_NON_UNIQUE_RID when building against w32api headers.
	(cygsid::get_sid): Use SECURITY_NT_NON_UNIQUE rather than
	SECURITY_NT_NON_UNIQUE_RID.
	(__sec_user): Use PISECURITY_DESCRIPTOR rather than PSECURITY_DESCRIPTOR
	to allow valid pointer arithmetic.
	(_recycler_sd): Ditto.
	(_everyone_sd): Ditto.
This commit is contained in:
Corinna Vinschen
2012-07-06 13:49:53 +00:00
parent 261c701bf3
commit 6f94526c1c
6 changed files with 48 additions and 5 deletions

View File

@@ -77,10 +77,12 @@ static const HKEY registry_keys[] =
static const int ROOT_KEY_COUNT = sizeof (registry_keys) / sizeof (HKEY);
#ifndef __MINGW64_VERSION_MAJOR
extern "C" {
LONG WINAPI RegOpenUserClassesRoot (HANDLE, DWORD, REGSAM, PHKEY);
LONG WINAPI RegOpenCurrentUser (REGSAM, PHKEY);
};
#endif
/* Make sure to access the correct per-user HKCR and HKCU hives, even if
the current user is only impersonated in another user's session. */