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-07-29 06:33:30 +0400
committerChristopher Faylor <me@cgf.cx>2001-07-29 06:33:30 +0400
commite13ea3343d64bf653de3c17e02bee9b3d877af75 (patch)
treeeacadec02a7dccc30c67914aa8d847980cf1fa97 /winsup/cygwin/dcrt0.cc
parent8e4e3874c4e3d24b8ade7eb212f122b7c63586f2 (diff)
* dcrt0.cc (alloc_stack_hard_way): Make half-hearted attempt to deal with
growing stack under Windows 95. * Makefile.in: Add install-lib and install-headers.
Diffstat (limited to 'winsup/cygwin/dcrt0.cc')
-rw-r--r--winsup/cygwin/dcrt0.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/winsup/cygwin/dcrt0.cc b/winsup/cygwin/dcrt0.cc
index 5c4a1a25d..2f2e385e3 100644
--- a/winsup/cygwin/dcrt0.cc
+++ b/winsup/cygwin/dcrt0.cc
@@ -539,6 +539,8 @@ static NO_COPY STARTUPINFO si;
child_info_fork NO_COPY *child_proc_info = NULL;
static MEMORY_BASIC_INFORMATION sm;
+#define CYGWIN_GUARD ((os_being_run == winNT) ? PAGE_GUARD : PAGE_NOACCESS)
+
// __inline__ void
extern void
alloc_stack_hard_way (child_info_fork *ci, volatile char *b)
@@ -578,7 +580,7 @@ alloc_stack_hard_way (child_info_fork *ci, volatile char *b)
{
m.BaseAddress = (LPVOID)((DWORD)m.BaseAddress - 1);
if (!VirtualAlloc ((LPVOID) m.BaseAddress, 1, MEM_COMMIT,
- PAGE_EXECUTE_READWRITE|PAGE_GUARD))
+ PAGE_EXECUTE_READWRITE|CYGWIN_GUARD))
api_fatal ("fork: couldn't allocate new stack guard page %p, %E",
m.BaseAddress);
}