2
0

initc.pp 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. {
  2. This file is part of the Free Pascal run time library.
  3. Copyright (c) 2004 the Free Pascal development team
  4. This file handles the clib errno abstraction for netware.
  5. See the file COPYING.FPC, included in this distribution,
  6. for details about the copyright.
  7. This program is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  10. **********************************************************************}
  11. {$IFNDEF FPC_DOTTEDUNITS}
  12. unit initc;
  13. {$ENDIF FPC_DOTTEDUNITS}
  14. interface
  15. {$IFDEF FPC_DOTTEDUNITS}
  16. uses
  17. System.CTypes;
  18. {$ELSE FPC_DOTTEDUNITS}
  19. uses
  20. ctypes;
  21. {$ENDIF FPC_DOTTEDUNITS}
  22. {$i nwsys.inc}
  23. function fpgetCerrno:cint;
  24. procedure fpsetCerrno(err:cint);
  25. property cerrno:cint read fpgetCerrno write fpsetcerrno;
  26. implementation
  27. function fpgetCerrno:cint;
  28. begin
  29. fpgetCerrno:=__get_errno_ptr^;
  30. end;
  31. procedure fpsetCerrno(err:cint);
  32. begin
  33. __get_errno_ptr^:=err;
  34. end;
  35. end.