[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [Gcl-devel] GCL on Cygwin
From: |
Mike Thomas |
Subject: |
RE: [Gcl-devel] GCL on Cygwin |
Date: |
Thu, 10 Jun 2004 10:01:00 +1000 |
Hi Camm.
| > Next issue is unixport/rsym_nt.c: conflicting types for main(). Protoize
| > says it should have a char **envp. Well, thanfully calling
| conventions are
| > nice and resilient, so adding it but not referencing shouldn't
| do any harm.
| > diff -u -r1.7 rsym_nt.c
| > --- unixport/rsym_nt.c 13 Jan 2003 07:26:03 -0000 1.7
| > +++ unixport/rsym_nt.c 8 Jun 2004 15:24:48 -0000
| > @@ -10,7 +10,7 @@
| >
| > struct lsymbol_table tab;
| >
| > -int main(int argc,char *argv[])
| > +#ifdef __CYGWIN__
| > +int main(int argc,char *argv[], char **envp)
| > +#else
| > +int main(int argc,char *argv[])
| > +#endif
| > {
| > char buf[1000];
| > char *in = argv[1];
| >
|
| Great! Mike, if you agree, lets just add the third arg in all cases
| in CVS head. Please advise if you wish me to do so.
Sounds sensible to me; please do as I'm stuck in other stuff.
| > Unfortunately, it won't finish without the unexec-related and memory
| > management stuff working. It does with:
| > /usr/src/gcl-cvs/gcl/unixport/raw_pre_gcl.exe \
| > /usr/src/gcl-cvs/gcl/unixport/ -libdir /usr/src/gcl-cvs/gcl/ < foo
| > Unrecoverable error: Address passed to add_page_to_freelist beyone \
| > MAXPAGES.
| >
|
| OK, here you may need a tiny bit of work. There are three main memory
| areas of whose ranges GCL needs to be aware: 1) the heap (where
| malloc starts, 2) the C stack and 3) the 'static area', where
| addresses of global C variables live. One also needs to know whether
| these areas grow up or down. A simple little C program can easily
| determine these, by just printing out the values of subsequent
| mallocs, local C variable addresses and global C variable addresses.
|
| Once this is in hand, you need to double check the NULL_OR_ON_C_STACK
| macro, and the DBEGIN macro, for both of which configure produces
| defaults.
|
| DBEGIN is likely wrong, my guess. Specifically, the page macro in
| page.h, which calculates how many pages the page containing a given
| address lies above DBEGIN, is returning a negative number, which when
| cast to unsigned is too large.
I'm fairly sure that the MinGW and Cygwin setups for stack growth etc should
be compatible - in the end both are Windows PE-COFF executables. The only
difference I'm aware of is the Unix runtime emulation layer in the Cygwin
DLL with attendant environmental and performance implications.
Cheers
Mike Thomas.
- RE: [Gcl-devel] GCL on Cygwin, (continued)
Re: [Gcl-devel] GCL on Cygwin, Jim Babcock, 2004/06/09