* cygheap.h (shared_prefix): De-const.
(shared_prefix_buf): Add static buffer for shared prefix to avoid additional allocation. * cygheap.cc (cygheap_init): Set cygheap->shared_prefix to cygheap->shared_prefix_buf and strcpy.
This commit is contained in:
parent
52a6e6d8c7
commit
c5b1a133c0
@ -1,3 +1,11 @@
|
|||||||
|
2007-07-18 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
|
* cygheap.h (shared_prefix): De-const.
|
||||||
|
(shared_prefix_buf): Add static buffer for shared prefix to avoid
|
||||||
|
additional allocation.
|
||||||
|
* cygheap.cc (cygheap_init): Set cygheap->shared_prefix to
|
||||||
|
cygheap->shared_prefix_buf and strcpy.
|
||||||
|
|
||||||
2007-07-17 Corinna Vinschen <corinna@vinschen.de>
|
2007-07-17 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
* fhandler.cc (fhandler_base::fhaccess): Add check for R/O file system.
|
* fhandler.cc (fhandler_base::fhaccess): Add check for R/O file system.
|
||||||
|
@ -163,8 +163,10 @@ cygheap_init ()
|
|||||||
if (!cygheap->sigs)
|
if (!cygheap->sigs)
|
||||||
sigalloc ();
|
sigalloc ();
|
||||||
|
|
||||||
|
/* Should this ever change, keep in mind that shared_prefix_buf is exactly
|
||||||
|
8 bytes long, just enough to match the size of the "Global\\" string. */
|
||||||
if (!cygheap->shared_prefix)
|
if (!cygheap->shared_prefix)
|
||||||
cygheap->shared_prefix = cstrdup (
|
strcpy (cygheap->shared_prefix = cygheap->shared_prefix_buf,
|
||||||
wincap.has_terminal_services () ? "Global\\" : "");
|
wincap.has_terminal_services () ? "Global\\" : "");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -279,7 +279,8 @@ struct init_cygheap
|
|||||||
cwdstuff cwd;
|
cwdstuff cwd;
|
||||||
dtable fdtab;
|
dtable fdtab;
|
||||||
LUID luid[SE_NUM_PRIVS];
|
LUID luid[SE_NUM_PRIVS];
|
||||||
const char *shared_prefix;
|
char *shared_prefix;
|
||||||
|
char shared_prefix_buf[8];
|
||||||
#ifdef DEBUGGING
|
#ifdef DEBUGGING
|
||||||
cygheap_debug debug;
|
cygheap_debug debug;
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user