OSDN Git Service

* dcrt0.cc (alloc_stack_hard_way): Make half-hearted attempt to deal with
authorcgf <cgf>
Sun, 29 Jul 2001 02:33:30 +0000 (02:33 +0000)
committercgf <cgf>
Sun, 29 Jul 2001 02:33:30 +0000 (02:33 +0000)
growing stack under Windows 95.
* Makefile.in: Add install-lib and install-headers.

winsup/cygwin/ChangeLog
winsup/cygwin/Makefile.in
winsup/cygwin/dcrt0.cc

index 112c783..36af78a 100644 (file)
@@ -1,3 +1,12 @@
+Sat Jul 28 22:30:55 2001  Christopher Faylor <cgf@cygnus.com>
+
+       * 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 <cgf@cygnus.com>
+
+       * Makefile.in: Add install-lib and install-headers.
+
 Fri Jul 27 12:28:12 2001  Christopher Faylor <cgf@cygnus.com>
 
        * cygwin.din: Export sys_errlist, sys_nerr.
index 3a85f34..317616b 100644 (file)
@@ -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 \
index 5c4a1a2..2f2e385 100644 (file)
@@ -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);
     }