mirror of
				https://gitlab.com/freepascal.org/fpc/source.git
				synced 2025-11-04 15:59:28 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			32 lines
		
	
	
		
			461 B
		
	
	
	
		
			ObjectPascal
		
	
	
	
	
	
			
		
		
	
	
			32 lines
		
	
	
		
			461 B
		
	
	
	
		
			ObjectPascal
		
	
	
	
	
	
{
 | 
						|
}
 | 
						|
unit initc;
 | 
						|
 | 
						|
interface
 | 
						|
 | 
						|
type
 | 
						|
 libcint   = longint;
 | 
						|
 plibcint = ^libcint;
 | 
						|
 | 
						|
function fpgetCerrno:libcint;
 | 
						|
procedure fpsetCerrno(err:libcint);
 | 
						|
 | 
						|
property cerrno:libcint read fpgetCerrno write fpsetcerrno;
 | 
						|
 | 
						|
 | 
						|
implementation
 | 
						|
 | 
						|
function geterrnolocation: Plibcint; cdecl;external 'cygwin1.dll' name '__errno';
 | 
						|
 | 
						|
function fpgetCerrno:libcint;
 | 
						|
begin
 | 
						|
  fpgetCerrno:=geterrnolocation^;
 | 
						|
end;
 | 
						|
 | 
						|
procedure fpsetCerrno(err:libcint);
 | 
						|
begin
 | 
						|
  geterrnolocation^:=err;
 | 
						|
end;
 | 
						|
 | 
						|
end.
 |