sighnd.inc 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. {
  2. $Id$
  3. This file is part of the Free Pascal run time library.
  4. (c) 2000-2003 by Marco van de Voort
  5. member of the Free Pascal development team.
  6. See the file COPYING.FPC, included in this distribution,
  7. for details about the copyright.
  8. Signalhandler for FreeBSD/i386
  9. This program is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY;without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  12. }
  13. CONST FPU_ALL=$7F;
  14. function getfpustate(const Sigcontext:sigcontextRec):longint; {inline;}
  15. begin
  16. getfpustate:=0;
  17. end;
  18. procedure SignalToRunerror(signo: cint); cdecl;
  19. var
  20. res : word;
  21. begin
  22. res:=0;
  23. if signo = SIGFPE then
  24. begin
  25. res := 200;
  26. end
  27. else
  28. if (signo = SIGILL) or (signo = SIGBUS) or (signo = SIGSEGV) then
  29. begin
  30. res := 216;
  31. end;
  32. { give runtime error at the position where the signal was raised }
  33. if res<>0 then
  34. begin
  35. HandleError(res);
  36. end;
  37. end;
  38. {
  39. $Log$
  40. Revision 1.1 2004-01-04 16:41:35 marco
  41. * powerpc version
  42. Revision 1.1 2004/01/04 15:30:19 marco
  43. * working version
  44. Revision 1.1 2004/01/03 12:29:36 marco
  45. * now separately.
  46. }