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>2009-09-21 06:19:31 +0400
committerChristopher Faylor <me@cgf.cx>2009-09-21 06:19:31 +0400
commitadfbdcdb07a25c408ecbab3e03349ebfcb386dfb (patch)
treeb2122ebfb8e0d8d45b5256fbb9a63d0bd695c508 /winsup/cygwin/lib/_cygwin_crt0_common.cc
parent50a8741474c249fbc2928b33df2cf47dbe1367b8 (diff)
* external.cc (cygwin_internal): Add hack to always reset cxx_malloc to proper
value. * lib/_cygwin_crt0_common.cc (_cygwin_crt0_common): Relocate wayward comment.
Diffstat (limited to 'winsup/cygwin/lib/_cygwin_crt0_common.cc')
-rw-r--r--winsup/cygwin/lib/_cygwin_crt0_common.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/winsup/cygwin/lib/_cygwin_crt0_common.cc b/winsup/cygwin/lib/_cygwin_crt0_common.cc
index 648d54aac..173f85268 100644
--- a/winsup/cygwin/lib/_cygwin_crt0_common.cc
+++ b/winsup/cygwin/lib/_cygwin_crt0_common.cc
@@ -68,8 +68,6 @@ struct per_process_cxx_malloc __cygwin_cxx_malloc =
int __stdcall
_cygwin_crt0_common (MainFunc f, per_process *u)
{
- /* This is used to record what the initial sp was. The value is needed
- when copying the parent's stack to the child during a fork. */
per_process *newu = (per_process *) cygwin_internal (CW_USER_DATA);
bool uwasnull;
@@ -110,6 +108,9 @@ _cygwin_crt0_common (MainFunc f, per_process *u)
u->premain[2] = cygwin_premain2;
u->premain[3] = cygwin_premain3;
u->fmode_ptr = &_fmode;
+
+ /* This is used to record what the initial sp was. The value is needed
+ when copying the parent's stack to the child during a fork. */
u->initial_sp = (char *) __builtin_frame_address (1);
/* Remember whatever the user linked his application with - or