* cygheap.cc (cygheap_init): Set cygheap->shared_prefix.

* cygheap.h (struct init_cygheap): Add shared_prefix.
	* shared.cc (shared_name): Use cygheap->shared_prefix.
This commit is contained in:
Corinna Vinschen
2003-12-01 15:03:43 +00:00
parent 4febe95f89
commit 6c2b784612
4 changed files with 14 additions and 5 deletions

View File

@@ -206,6 +206,12 @@ cygheap_init ()
cygheap->fdtab.init ();
if (!cygheap->sigs)
sigalloc ();
if (!cygheap->shared_prefix)
cygheap->shared_prefix = cstrdup (
wincap.has_terminal_services ()
&& (set_process_privilege (SE_CREATE_GLOBAL_NAME, true) >= 0
|| GetLastError () == ERROR_NO_SUCH_PRIVILEGE)
? "Global\\" : "");
}
/* Copyright (C) 1997, 2000 DJ Delorie */