diff options
| author | Tomas Bzatek <tbzatek@redhat.com> | 2009-10-03 14:28:09 +0200 |
|---|---|---|
| committer | Tomas Bzatek <tbzatek@redhat.com> | 2009-10-03 14:28:09 +0200 |
| commit | 95dbf1260264603b86892530d6b581a35bdb4385 (patch) | |
| tree | 14fce5dd729ee5e0fa46ec719b51d3b6e997b50f | |
| parent | 15efde21a039f2dfa11c715c9c40b6d12813baf3 (diff) | |
| download | tuxcmd-95dbf1260264603b86892530d6b581a35bdb4385.tar.xz | |
PowerPC cleanup
Cleanup debugging outputs on PPC port. We still need those malloc() and free()
workarounds but at least it's stable now.
Tested on iBook G4 and proved working with glibc-2.10.90-24.ppc (Fedora 12).
Plugins work fine except of the zip plugin, most likely bug in ZipArchive.
The only requirement is sufficiently new FPC, fpc-2.5.1 snapshot works
out of the box, for stable fpc-2.2.4 release you need powerpc.diff patch
(fpcsrc/compiler/powerpc/cpupara.pas) from Debian fpc_2.2.4-3
see http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=513891
| -rw-r--r-- | UEngines.pas | 6 | ||||
| -rw-r--r-- | ULibc.pas | 7 | ||||
| -rw-r--r-- | tuxcmd.dpr | 3 |
3 files changed, 0 insertions, 16 deletions
diff --git a/UEngines.pas b/UEngines.pas index c08b077..264740c 100644 --- a/UEngines.pas +++ b/UEngines.pas @@ -1121,14 +1121,8 @@ begin if FName <> nil then libc_free(FName); if FDisplayName <> nil then libc_free(FDisplayName); if LnkPointTo <> nil then libc_free(LnkPointTo); -{$IFDEF CPUPOWERPC} - Writeln('FreeDataItem: before free ColumnData'); -{$ENDIF} for i := 0 to Length(ColumnData) - 1 do if ColumnData[i] <> nil then libc_free(ColumnData[i]); -{$IFDEF CPUPOWERPC} - Writeln('FreeDataItem: after free ColumnData'); -{$ENDIF} end; libc_free(DataItem); end; @@ -1017,21 +1017,14 @@ end; {$IFDEF CPUPOWERPC} -function xmalloc(size: size_t): Pointer; cdecl; external GLIBC_LIB name 'malloc'; -procedure xfree(ptr: Pointer); cdecl; external GLIBC_LIB name 'free'; - function malloc(size: size_t): Pointer; begin Result := GetMem(size); -// Result := xmalloc(size); - WriteLn('malloc(', size, '): 0x', IntToHex(DWORD(Result), 4)); end; procedure libc_free(ptr: Pointer); begin - WriteLn('free(0x', IntToHex(DWORD(ptr), 4), ')'); FreeMem(ptr); -// xfree(ptr); end; procedure free(ptr: Pointer); @@ -22,9 +22,6 @@ program tuxcmd; uses {$IFDEF FPC} -{$IFDEF CPUPOWERPC} -// cmem, -{$ENDIF} cthreads, cwstring, {$ENDIF} |
