* fixes cmem.malloc et al. for windows as proposed by Ludo Brands, resolves #15571

git-svn-id: trunk@18256 -
This commit is contained in:
florian 2011-08-18 08:47:44 +00:00
parent 859757003f
commit 41f25c2b21
3 changed files with 10 additions and 4 deletions

1
.gitattributes vendored
View File

@ -11515,6 +11515,7 @@ tests/webtbs/tw15467.pp svneol=native#text/pascal
tests/webtbs/tw15500.pp svneol=native#text/plain
tests/webtbs/tw15504.pp svneol=native#text/plain
tests/webtbs/tw15530.pp svneol=native#text/pascal
tests/webtbs/tw15571.pp svneol=native#text/pascal
tests/webtbs/tw15591.pp svneol=native#text/pascal
tests/webtbs/tw15592.pp svneol=native#text/plain
tests/webtbs/tw15599.pp svneol=native#text/plain

View File

@ -48,10 +48,10 @@ 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';
Function Malloc (Size : ptruint) : Pointer; cdecl; external LibName name 'malloc';
Procedure Free (P : pointer); cdecl; external LibName name 'free';
function ReAlloc (P : Pointer; Size : ptruint) : pointer; cdecl; external LibName name 'realloc';
Function CAlloc (unitSize,UnitCount : ptruint) : pointer; cdecl; external LibName name 'calloc';
{$endif not USE_STATIC_LIBC}
implementation

5
tests/webtbs/tw15571.pp Normal file
View File

@ -0,0 +1,5 @@
uses cmem, sysutils;
begin
inttostr(1234);
malloc(1000); //crashes here
end.