mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-16 08:00:52 +02:00
* patch from peter
This commit is contained in:
parent
2d6847e5cd
commit
05458e5c39
@ -215,7 +215,6 @@ Implementation
|
||||
{$ifdef usenetdb}
|
||||
uses netdb;
|
||||
{$else}
|
||||
uses initc;
|
||||
{$i resolve.inc}
|
||||
{$endif}
|
||||
|
||||
@ -951,7 +950,10 @@ Finalization
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.5 2003-12-10 15:50:50 marco
|
||||
Revision 1.6 2003-12-11 09:23:50 marco
|
||||
* patch from peter
|
||||
|
||||
Revision 1.5 2003/12/10 15:50:50 marco
|
||||
* fpgetcerrno introduction
|
||||
|
||||
Revision 1.4 2003/05/17 21:52:37 michael
|
||||
|
@ -1,3 +1,6 @@
|
||||
uses
|
||||
initc;
|
||||
|
||||
const
|
||||
{ Net type }
|
||||
socklib = 'c';
|
||||
|
@ -5,6 +5,8 @@ unit initc;
|
||||
|
||||
interface
|
||||
|
||||
type libcint = longint;
|
||||
plibcint = ^libcint;
|
||||
|
||||
{$LINKLIB cygwin}
|
||||
{$linklib kernel32}
|
||||
@ -12,6 +14,12 @@ interface
|
||||
{ this unit is just ment to run
|
||||
startup code to get C code to work correctly PM }
|
||||
|
||||
function fpgetCerrno:libcint;
|
||||
procedure fpsetCerrno(err:libcint);
|
||||
|
||||
{$ifndef ver1_0}
|
||||
property cerrno:libcint read fpgetCerrno write fpsetcerrno;
|
||||
{$endif}
|
||||
|
||||
implementation
|
||||
|
||||
@ -20,6 +28,19 @@ uses
|
||||
|
||||
{$i textrec.inc}
|
||||
|
||||
const clib = 'crtdll';
|
||||
|
||||
function geterrnolocation: Plibcint; cdecl;external clib name '__error';
|
||||
|
||||
function fpgetCerrno:libcint;
|
||||
begin
|
||||
fpgetCerrno:=geterrnolocation^;
|
||||
end;
|
||||
|
||||
procedure fpsetCerrno(err:libcint);
|
||||
begin
|
||||
geterrnolocation^:=err;
|
||||
end;
|
||||
|
||||
procedure cygwin_crt0(p : pointer);cdecl;external;
|
||||
|
||||
@ -105,7 +126,10 @@ if setjmp(exitjmpbuf)=0 then
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.9 2003-11-03 09:42:28 marco
|
||||
Revision 1.10 2003-12-11 09:21:52 marco
|
||||
* patch from peter
|
||||
|
||||
Revision 1.9 2003/11/03 09:42:28 marco
|
||||
* Peter's Cardinal<->Longint fixes patch
|
||||
|
||||
Revision 1.8 2003/09/08 18:25:45 peter
|
||||
|
Loading…
Reference in New Issue
Block a user