Well, one down.... On cygwin, I now get the same errors (repeated below) ;(
signals.c: In function `bsd_signal': signals.c:77: `SA_ONSTACK' undeclared (first use in this function) signals.c:77: (Each undeclared identifier is reported only once signals.c:77: for each function it appears in.) signals.c: In function `install_signal_handlers': signals.c:365: `stack_t' undeclared (first use in this function) signals.c:365: parse error before `sigstack' signals.c:368: `sigstack' undeclared (first use in this function) signals.c:368: `SIGSTKSZ' undeclared (first use in this function) signals.c:371: warning: implicit declaration of function `sigaltstack' signals.c:371: parse error before `)' make[1]: *** [signals.o] Error 1 DaR > -----Original Message----- > From: Dennis Ruffer [mailto:druffer@;apple.com] > Sent: Friday, October 25, 2002 2:40 PM > To: [EMAIL PROTECTED] > Subject: RE: [gforth] --enable-indirect-threaded on PPC? > > > That did it! I took out the -D_POSIX_SOURCE and I don't even > need the: > > #define _XOPEN_SOURCE 500 > #define _XOPEN_SOURCE_EXTENDED > #define _POSIX_C_SOURCE 199506L > > lines anymore! > > DaR > > > -----Original Message----- > > From: Anton Ertl [mailto:anton@;a0.complang.tuwien.ac.at] > > Sent: Friday, October 25, 2002 12:03 PM > > To: [EMAIL PROTECTED] > > Subject: Re: [gforth] --enable-indirect-threaded on PPC? > > > > > > David N. Williams wrote: > > > In signals.c, gforth has > > > > > > ----------------- > > > #ifdef SA_SIGINFO > > > static void fpe_handler(int sig, siginfo_t *info, void *_) > > > /* handler for SIGFPE */ > > > { > > > int code; > > > > > > switch(info->si_code) { > > > case FPE_INTDIV: code=-10; break; /* integer divide by zero */ > > > case FPE_INTOVF: code=-11; break; /* integer overflow */ > > > case FPE_FLTDIV: code=-42; break; /* floating point divide by > > > zero */ > > > case FPE_FLTOVF: code=-43; break; /* floating point > overflow */ > > > case FPE_FLTUND: code=-54; break; /* floating point > underflow */ > > > case FPE_FLTRES: code=-41; break; /* floating point inexact > > > result */ > > > case FPE_FLTINV: /* invalid floating point operation */ > > > case FPE_FLTSUB: /* subscript out of range */ > > > default: code=-55; break; > > > } > > > longjmp(throw_jmp_buf,code); > > > } > > ... > > > At any rate, maybe it comes down to what's the best way to get > > > around the missing signals, FPE_INTDIV, FPE_INTOVF, and > FPE_FLTSUB. > > > > Replace the switch statement above with > > > > switch(info->si_code) { > > #ifdef FPE_INTDIV > > case FPE_INTDIV: code=-10; break; /* integer divide by zero */ > > #endif > > #ifdef FPE_INTOVF > > case FPE_INTOVF: code=-11; break; /* integer overflow */ > > #endif > > case FPE_FLTDIV: code=-42; break; /* floating point divide > > by zero */ > > case FPE_FLTOVF: code=-43; break; /* floating point overflow */ > > case FPE_FLTUND: code=-54; break; /* floating point underflow */ > > case FPE_FLTRES: code=-41; break; /* floating point inexact > > result */ > > #if 0 /* defined by Unix95, but unnecessary */ > > case FPE_FLTINV: /* invalid floating point operation */ > > case FPE_FLTSUB: /* subscript out of range */ > > #endif > > default: code=-55; break; > > } > > > > That should work, and then Dennis should get rid of the > _POSIX_SOURCE. > > > > - anton > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
