From f02993636a68e2a611acf6c4519cf6f139ab4737 Mon Sep 17 00:00:00 2001 From: Tomas Bzatek Date: Sun, 4 Oct 2009 21:22:09 +0200 Subject: Force use glibc malloc() and free() for plugin-related allocations on PPC FreePascal sucks ass on PowerPC!! --- ULibc.pas | 3 +++ 1 file changed, 3 insertions(+) (limited to 'ULibc.pas') diff --git a/ULibc.pas b/ULibc.pas index 5ff010f..0cdac2b 100644 --- a/ULibc.pas +++ b/ULibc.pas @@ -680,6 +680,7 @@ function dlclose(handle: Pointer): Longint; cdecl; external DL_LIB name 'dlclose function dlsym(handle: Pointer; const symbol: PChar): Pointer; cdecl; external DL_LIB name 'dlsym'; function dlerror: PChar; cdecl; external GLIBC_LIB name 'dlerror'; +function real_libc_malloc(size: size_t): Pointer; cdecl; external GLIBC_LIB name 'malloc'; {$IFNDEF CPUPOWERPC} function malloc(size: size_t): Pointer; cdecl; external GLIBC_LIB name 'malloc'; {$ELSE} @@ -687,6 +688,8 @@ function malloc(size: size_t): Pointer; {$ENDIF} function calloc(nmemb: size_t; size: size_t): Pointer; cdecl; external GLIBC_LIB name 'calloc'; function realloc(ptr: Pointer; size: size_t): Pointer; cdecl; external GLIBC_LIB name 'realloc'; + +procedure real_libc_free(ptr: Pointer); cdecl; external GLIBC_LIB name 'free'; {$IFNDEF CPUPOWERPC} procedure free(ptr: Pointer); cdecl; external GLIBC_LIB name 'free'; procedure libc_free(ptr: Pointer); cdecl; external GLIBC_LIB name 'free'; -- cgit v1.2.3