initc.pp 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. {
  2. $Id$
  3. }
  4. unit initc;
  5. interface
  6. {$LINKLIB cygwin}
  7. {$linklib kernel32}
  8. type
  9. libcint = longint;
  10. plibcint = ^libcint;
  11. function fpgetCerrno:libcint;
  12. procedure fpsetCerrno(err:libcint);
  13. {$ifndef ver1_0}
  14. property cerrno:libcint read fpgetCerrno write fpsetcerrno;
  15. {$endif}
  16. implementation
  17. function geterrnolocation: Plibcint; cdecl;external name '___errno';
  18. function fpgetCerrno:libcint;
  19. begin
  20. fpgetCerrno:=geterrnolocation^;
  21. end;
  22. procedure fpsetCerrno(err:libcint);
  23. begin
  24. geterrnolocation^:=err;
  25. end;
  26. end.
  27. {
  28. $Log$
  29. Revision 1.14 2004-11-04 17:15:01 peter
  30. * wcygprt is now used for cygwin (libc) linking, initc contains only cerrno
  31. Revision 1.13 2004/11/04 09:32:31 peter
  32. ErrOutput added
  33. Revision 1.12 2004/09/14 20:08:58 hajny
  34. * use errno from cygwin (like in fixes branch)
  35. Revision 1.11 2004/09/12 17:41:40 hajny
  36. * hopefully fixed the problem with missing __error symbol
  37. Revision 1.10 2003/12/11 09:21:52 marco
  38. * patch from peter
  39. Revision 1.9 2003/11/03 09:42:28 marco
  40. * Peter's Cardinal<->Longint fixes patch
  41. Revision 1.8 2003/09/08 18:25:45 peter
  42. * popstack to cdecl
  43. Revision 1.7 2002/09/07 16:01:28 peter
  44. * old logs removed and tabs fixed
  45. }