delorie.com/archives/browse.cgi | search |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
Date: | Mon, 11 Jul 2005 08:42:12 -0700 (PDT) |
Message-Id: | <200507111542.j6BFgCg7017159@celerio.ucdavis.edu> |
To: | cygwin AT cygwin DOT com |
Subject: | Re: How to add 4K of scratch space at the bottom of the stack using C instead of C++? |
From: | "Yu-Cheng Chou" <cycchou AT ucdavis DOT edu> |
X-Errors-To: | cycchou AT magenta DOT ucdavis DOT edu |
X-User-Agent: | Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322) |
X-IsSubscribed: | yes |
> > Hi, > > In order to dynamically load cygwin1.dll with VC, I need to add 4K of > > scratch space at the bottom of my stack. > > > > The winsup/testsuite/cygload/cygload.cpp shows how to do it using C++. > > I believe it's cygload.cc... > > > How can I add the scratch space using C rather than C++ in a simplest > > way? > > I'm afraid it won't be very simple, but how about something like > > int main(int ac, char *av[]) { > char padding[4096]; > backup_lower_stack(); > > ... > > restore_lower_stack(); > return ... > } > > with backup_lower_stack() and restore_lower_stack() adapted from the > cygwin::padding constructor and destructor, respectively (the vector can > be replaced by a malloc'ed piece of memory). > > However, you'll also need to write a C interface to cygwin::connector. > Once you have this working, I would strongly urge you to submit the code > to Cygwin. By the way, the Makefile shows that the MSVC compiler is in C:/cygwin/usr/local/tools/i686_win32/vc7/Vc7. Is it a package that is provided by cygwin? Or is it the MSVC software that is installed in that directory? Thanks -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |