syscall.pp 602 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. {$IFNDEF FPC_DOTTEDUNITS}
  2. unit syscall;
  3. {$ENDIF FPC_DOTTEDUNITS}
  4. {$ifdef LINUX}
  5. {$ifdef FPC_USE_LIBC}
  6. {$mode objfpc}
  7. {$endif}
  8. {$endif}
  9. interface
  10. {$define FPC_USE_SYSCALL}
  11. {$i sysnr.inc}
  12. {$i syscallh.inc}
  13. implementation
  14. {$ifdef FPC_USE_LIBC}
  15. uses
  16. unixtype;
  17. {$endif}
  18. {$ifdef FPC_HAS_SETSYSNR_INC}
  19. {$define FPC_COMPILING_SYSCALL_UNIT}
  20. {$I setsysnr.inc}
  21. {$endif FPC_HAS_SETSYSNR_INC}
  22. {$ifdef FPC_USE_LIBC}
  23. procedure seterrno(err:cint); external name 'FPC_SYS_SETERRNO';
  24. {$I syscall.inc}
  25. {$endif}
  26. {$ifdef FPC_HAS_SETSYSNR_INC}
  27. begin
  28. SetSyscallNumbers;
  29. {$endif FPC_HAS_SETSYSNR_INC}
  30. end.