initc.pp 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. {
  2. $Id$
  3. }
  4. unit initc;
  5. interface
  6. type
  7. libcint = longint;
  8. plibcint = ^libcint;
  9. function fpgetCerrno:libcint;
  10. procedure fpsetCerrno(err:libcint);
  11. {$ifndef ver1_0}
  12. property cerrno:libcint read fpgetCerrno write fpsetcerrno;
  13. {$endif}
  14. implementation
  15. function geterrnolocation: Plibcint; cdecl;external 'cygwin1.dll' name '__errno';
  16. function fpgetCerrno:libcint;
  17. begin
  18. fpgetCerrno:=geterrnolocation^;
  19. end;
  20. procedure fpsetCerrno(err:libcint);
  21. begin
  22. geterrnolocation^:=err;
  23. end;
  24. end.
  25. {
  26. $Log$
  27. Revision 1.15 2004-12-06 12:27:48 michael
  28. * fix __errno loading from cygwin1.dll (from Peter)
  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. }