summaryrefslogtreecommitdiff
path: root/ULibc.pas
diff options
context:
space:
mode:
authorTomas Bzatek <tbzatek@redhat.com>2009-10-04 21:22:09 +0200
committerTomas Bzatek <tbzatek@redhat.com>2009-10-04 21:22:09 +0200
commitf02993636a68e2a611acf6c4519cf6f139ab4737 (patch)
tree0ded518f2aa00163772322264c64f1ec1269a0ce /ULibc.pas
parent47208d263f3940ec65e7f94b9cc8f4c588234ac5 (diff)
downloadtuxcmd-f02993636a68e2a611acf6c4519cf6f139ab4737.tar.xz
Force use glibc malloc() and free() for plugin-related allocations on PPC
FreePascal sucks ass on PowerPC!!
Diffstat (limited to 'ULibc.pas')
-rw-r--r--ULibc.pas3
1 files changed, 3 insertions, 0 deletions
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';