From e13ea3343d64bf653de3c17e02bee9b3d877af75 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Sun, 29 Jul 2001 02:33:30 +0000 Subject: [PATCH] * 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. --- winsup/cygwin/ChangeLog | 9 +++++++++ winsup/cygwin/Makefile.in | 11 ++++++++--- winsup/cygwin/dcrt0.cc | 4 +++- 3 files changed, 20 insertions(+), 4 deletions(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 112c7836b..36af78a0f 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,12 @@ +Sat Jul 28 22:30:55 2001 Christopher Faylor + + * dcrt0.cc (alloc_stack_hard_way): Make half-hearted attempt to deal + with growing stack under Windows 95. + +Fri Jul 27 12:36:07 2001 Christopher Faylor + + * Makefile.in: Add install-lib and install-headers. + Fri Jul 27 12:28:12 2001 Christopher Faylor * cygwin.din: Export sys_errlist, sys_nerr. diff --git a/winsup/cygwin/Makefile.in b/winsup/cygwin/Makefile.in index 3a85f3448..317616bdc 100644 --- a/winsup/cygwin/Makefile.in +++ b/winsup/cygwin/Makefile.in @@ -132,7 +132,8 @@ DLL_OFILES:=assert.o autoload.o cygheap.o dcrt0.o debug.o delqueue.o dir.o \ GMON_OFILES:= gmon.o mcount.o profil.o -.PHONY: all force dll_ofiles install all_target install_target all_host install_host +.PHONY: all force dll_ofiles install all_target install_target all_host install_host \ + install install_target install-libs install-headers .SUFFIXES: .SUFFIXES: .c .cc .def .a .o .d @@ -148,11 +149,15 @@ all_host: new-$(LIB_NAME) cygrun.exe force: -install: all $(install_host) $(install_target) +install: install-libs install-headers $(install_host) $(install_target) + +install-libs: $(LIB_NAME) $(INSTALL_DATA) new-$(DLL_NAME) $(bindir)/$(DLL_NAME); \ for i in $(LIB_NAME) $(GMON_START) $(LIBGMON_A) automode.o binmode.o textmode.o ; do \ $(INSTALL_DATA) $$i $(tooldir)/lib/$$i ; \ - done ; \ + done + +install-headers: cd $(srcdir); \ for sub in `find include -name '[a-z]*' -type d -print | sort`; do \ for i in $$sub/*.h ; do \ 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); }