mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-12 09:30:08 +02:00
+ Allow compilation for go32v2 target
git-svn-id: trunk@16411 -
This commit is contained in:
parent
709d36a1d0
commit
cb017ad074
@ -19,6 +19,10 @@ interface
|
||||
|
||||
Const
|
||||
|
||||
{$if defined(go32v2)}
|
||||
{$define USE_STATIC_LIBC}
|
||||
{$endif}
|
||||
|
||||
{$if defined(win32)}
|
||||
LibName = 'msvcrt';
|
||||
{$elseif defined(win64)}
|
||||
@ -37,10 +41,18 @@ Const
|
||||
LibName = 'c';
|
||||
{$endif}
|
||||
|
||||
{$ifdef USE_STATIC_LIBC}
|
||||
{$linklib c}
|
||||
Function malloc (Size : ptruint) : Pointer;cdecl; external;
|
||||
Procedure free (P : pointer); cdecl; external;
|
||||
function realloc (P : Pointer; Size : ptruint) : pointer;cdecl; external;
|
||||
Function calloc (unitSize,UnitCount : ptruint) : pointer;cdecl; external;
|
||||
{$else not USE_STATIC_LIBC}
|
||||
Function Malloc (Size : ptruint) : Pointer; {$ifdef win32}stdcall{$else}cdecl{$endif}; external LibName name 'malloc';
|
||||
Procedure Free (P : pointer); {$ifdef win32}stdcall{$else}cdecl{$endif}; external LibName name 'free';
|
||||
function ReAlloc (P : Pointer; Size : ptruint) : pointer; {$ifdef win32}stdcall{$else}cdecl{$endif}; external LibName name 'realloc';
|
||||
Function CAlloc (unitSize,UnitCount : ptruint) : pointer; {$ifdef win32}stdcall{$else}cdecl{$endif}; external LibName name 'calloc';
|
||||
{$endif not USE_STATIC_LIBC}
|
||||
|
||||
implementation
|
||||
|
||||
@ -154,7 +166,7 @@ Const
|
||||
DoneThread : nil;
|
||||
RelocateHeap : nil;
|
||||
GetHeapStatus : @CGetHeapStatus;
|
||||
GetFPCHeapStatus: @CGetFPCHeapStatus;
|
||||
GetFPCHeapStatus: @CGetFPCHeapStatus;
|
||||
);
|
||||
|
||||
Var
|
||||
|
Loading…
Reference in New Issue
Block a user