Mail Archives: cygwin/1996/10/24/16:43:01
>Ian Searle wrote:
>>
>> I was wondering if anyone has built Boehm's garbage collector with
>> the gnu-win32 gcc ?
Yes, I have. Here's the diff I sent to Hans.
This doesn't solve all the problems, just the ones
I needed to get my application working. In particular,
you need to set GC_stackbottom explicitly from main().
Also, there is a problem that SIG_FILL is missing.
===================================================================
RCS file: /home/staff/zs/imp/mercury/boehm_gc/config.h,v
retrieving revision 1.5
diff -b -u -r1.5 config.h
--- config.h 1996/03/05 11:06:21 1.5
+++ config.h 1996/05/08 07:25:08
@@ -188,6 +188,11 @@
# define DJGPP /* MSDOS running the DJGPP port of GCC */
# define mach_type_known
# endif
+# if defined(__CYGWIN32__)
+# define I386
+# define CYGWIN32
+# define mach_type_known
+# endif
# if defined(__BORLANDC__)
# define I386
# define MSWIN32
@@ -492,6 +497,13 @@
# define STACKBOTTOM ((ptr_t)0xc0000000)
# define MPROTECT_VDB
# endif
+# ifdef CYGWIN32
+# define OS_TYPE "CYGWIN32"
+ extern int _bss_start__;
+# define DATASTART ((ptr_t)&_bss_start__)
+ extern int _data_end__;
+# define DATAEND ((ptr_t)&_data_end__)
+# endif
# ifdef OS2
# define OS_TYPE "OS2"
/* STACKBOTTOM and DATASTART are handled specially in */
Index: boehm_gc/mach_dep.c
===================================================================
RCS file: /home/staff/zs/imp/mercury/boehm_gc/mach_dep.c,v
retrieving revision 1.4
diff -b -u -r1.4 mach_dep.c
--- mach_dep.c 1996/03/05 11:06:45 1.4
+++ mach_dep.c 1996/05/05 10:04:30
@@ -168,7 +168,7 @@
# endif /* __MWERKS__ */
# endif /* MACOS */
-# if defined(I386) &&!defined(OS2) &&!defined(SVR4) &&!defined(MSWIN32) && !defined(SCO) && (!defined(LINUX) || !defined(__ELF__))
+# if defined(I386) &&!defined(OS2) &&!defined(SVR4) && !defined(SCO) && (!defined(LINUX) || !defined(__ELF__))
/* I386 code, generic code does not appear to work */
/* It does appear to work under OS2, and asms dont */
asm("pushl %eax"); asm("call _GC_push_one"); asm("addl $4,%esp");
@@ -191,7 +191,7 @@
asm("pushl %ebx"); asm("call GC_push_one"); asm("addl $4,%esp");
# endif
-# if defined(I386) && defined(MSWIN32)
+# if defined(I386) && defined(MSWIN32) && 0
/* I386 code, Microsoft variant */
__asm push eax
__asm call GC_push_one
Index: boehm_gc/os_dep.c
===================================================================
RCS file: /home/staff/zs/imp/mercury/boehm_gc/os_dep.c,v
retrieving revision 1.5
diff -b -u -r1.5 os_dep.c
--- os_dep.c 1996/03/05 11:07:02 1.5
+++ os_dep.c 1996/05/05 10:41:42
@@ -227,7 +227,9 @@
void GC_disable_signals()
{
if (!mask_initialized) {
+#if 0
SIG_FILL(new_mask);
+#endif
SIG_DEL(new_mask, SIGSEGV);
SIG_DEL(new_mask, SIGILL);
Index: boehm_gc/test.c
===================================================================
RCS file: /home/staff/zs/imp/mercury/boehm_gc/test.c,v
retrieving revision 1.4
diff -b -u -r1.4 test.c
--- test.c 1996/03/05 11:07:12 1.4
+++ test.c 1996/05/08 07:02:40
@@ -851,6 +851,9 @@
int main()
#endif
{
+ char dummy;
+ extern char*GC_stackbottom;
+ GC_stackbottom = &dummy;
n_tests = 0;
# if defined(MACOS)
--
Fergus Henderson <fjh AT cs DOT mu DOT oz DOT au> | "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh> | of excellence is a lethal habit"
PGP: finger fjh AT 128 DOT 250 DOT 37 DOT 3 | -- the last words of T. S. Garp.
-
For help on using this list, send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".
- Raw text -