version 1.15, 2002/10/25 15:57:03
|
version 1.16, 2002/10/26 12:48:25
|
Line 114 static void fpe_handler(int sig, siginfo
|
Line 114 static void fpe_handler(int sig, siginfo
|
int code; |
int code; |
|
|
switch(info->si_code) { |
switch(info->si_code) { |
|
#ifdef FPE_INTDIV |
case FPE_INTDIV: code=-10; break; /* integer divide by zero */ |
case FPE_INTDIV: code=-10; break; /* integer divide by zero */ |
|
#endif |
|
#ifdef FPE_INTOVF |
case FPE_INTOVF: code=-11; break; /* integer overflow */ |
case FPE_INTOVF: code=-11; break; /* integer overflow */ |
|
#endif |
case FPE_FLTDIV: code=-42; break; /* floating point divide by zero */ |
case FPE_FLTDIV: code=-42; break; /* floating point divide by zero */ |
case FPE_FLTOVF: code=-43; break; /* floating point overflow */ |
case FPE_FLTOVF: code=-43; break; /* floating point overflow */ |
case FPE_FLTUND: code=-54; break; /* floating point underflow */ |
case FPE_FLTUND: code=-54; break; /* floating point underflow */ |
case FPE_FLTRES: code=-41; break; /* floating point inexact result */ |
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_FLTINV: /* invalid floating point operation */ |
case FPE_FLTSUB: /* subscript out of range */ |
case FPE_FLTSUB: /* subscript out of range */ |
|
#endif |
default: code=-55; break; |
default: code=-55; break; |
} |
} |
longjmp(throw_jmp_buf,code); |
longjmp(throw_jmp_buf,code); |