initc.pp 461 B

12345678910111213141516171819202122232425262728293031
  1. {
  2. }
  3. unit initc;
  4. interface
  5. type
  6. libcint = longint;
  7. plibcint = ^libcint;
  8. function fpgetCerrno:libcint;
  9. procedure fpsetCerrno(err:libcint);
  10. property cerrno:libcint read fpgetCerrno write fpsetcerrno;
  11. implementation
  12. function geterrnolocation: Plibcint; cdecl;external 'cygwin1.dll' name '__errno';
  13. function fpgetCerrno:libcint;
  14. begin
  15. fpgetCerrno:=geterrnolocation^;
  16. end;
  17. procedure fpsetCerrno(err:libcint);
  18. begin
  19. geterrnolocation^:=err;
  20. end;
  21. end.