Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2001-01-28 09:23:42 +0300
committerChristopher Faylor <me@cgf.cx>2001-01-28 09:23:42 +0300
commit9a089f21ea4862705c6c996502c089b8d18fc833 (patch)
tree92c2264c2077b6d7b9a8b8b13dace41879b41471 /winsup/cygwin/cygheap.cc
parent2a6fc028badee6ab9a4df2b1b395dbb701d965fb (diff)
* cygheap.cc (init_cheap): Move username initialization.
(cygheap_init): Here. * shared_info.h (mount_info): Add a sys_mount_table_counter field. (shared_info): Ditto. * path.cc (mount_info::conv_to_win32_path): Check that our mount table is in sync with the system mount table and reinitialize it if not. (mount_info::add_reg_mount): Bump sys_mount_table counters if the system mount table changes. (mount_info::del_reg_mount): Ditto. (mount_info::write_cygdrive_info_to_registry): Ditto. (mount_info::remove_cygdrive_info_from_registry): Ditto.
Diffstat (limited to 'winsup/cygwin/cygheap.cc')
-rw-r--r--winsup/cygwin/cygheap.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/winsup/cygwin/cygheap.cc b/winsup/cygwin/cygheap.cc
index c9081aa5d..10c16d1a2 100644
--- a/winsup/cygwin/cygheap.cc
+++ b/winsup/cygwin/cygheap.cc
@@ -32,14 +32,6 @@ init_cheap ()
if (!cygheap)
api_fatal ("Couldn't reserve space for cygwin's heap, %E");
cygheap_max = cygheap + 1;
-
- char username[MAX_USER_NAME];
- DWORD username_len = MAX_USER_NAME;
-
- if (!GetUserName (username, &username_len))
- cygheap->user.set_name ("unknown");
- else
- cygheap->user.set_name (username);
}
#define pagetrunc(x) ((void *) (((DWORD) (x)) & ~(4096 - 1)))
@@ -75,6 +67,14 @@ cygheap_init ()
{
cygheap_protect = new_muto (FALSE, "cygheap_protect");
_csbrk (0);
+
+ char username[MAX_USER_NAME];
+ DWORD username_len = MAX_USER_NAME;
+
+ if (!GetUserName (username, &username_len))
+ cygheap->user.set_name ("unknown");
+ else
+ cygheap->user.set_name (username);
}
/* Copyright (C) 1997, 2000 DJ Delorie */