From 0d445e4ef186d6daee3a1545609a1528fe31fa10 Mon Sep 17 00:00:00 2001 From: tobigun Date: Tue, 5 Feb 2008 14:15:34 +0000 Subject: Removed the FPC_V220 define. Now the build-in FPC_VERSION, FPC_RELEASE and FPC_PATCH macros are used. So no need to define the version in a config-file anymore (especially in windows). git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@816 b956fd51-792f-4845-bead-9b4dfca2ff2c --- Game/Code/Classes/UPlatformLinux.pas | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) (limited to 'Game') diff --git a/Game/Code/Classes/UPlatformLinux.pas b/Game/Code/Classes/UPlatformLinux.pas index 882376a2..b962d8a5 100644 --- a/Game/Code/Classes/UPlatformLinux.pas +++ b/Game/Code/Classes/UPlatformLinux.pas @@ -28,18 +28,25 @@ type implementation +// check for version of FPC >= 2.2.0 +{$IFDEF FPC} + {$IF (FPC_VERSION > 2) or ((FPC_VERSION = 2) and (FPC_RELEASE >= 2))} + {$DEFINE FPC_VERSION_2_2_0_PLUS} + {$IFEND} +{$ENDIF} + uses libc, uCommandLine, -{$IFNDEF FPC_V220} - oldlinux, -{$ELSE} +{$IFDEF FPC_VERSION_2_2_0_PLUS} BaseUnix, +{$ELSE} + oldlinux, {$ENDIF} SysUtils; -{$IFDEF FPC_V220} -Function TPlatformLinux.DirectoryFindFiles(Dir, Filter : WideString; ReturnAllSubDirs : Boolean) : TDirectoryEntryArray; +{$IFDEF FPC_VERSION_2_2_0_PLUS} +Function TPlatformLinux.DirectoryFindFiles(Dir, Filter : WideString; ReturnAllSubDirs : Boolean) : TDirectoryEntryArray; var i : Integer; TheDir : pDir; @@ -159,8 +166,7 @@ begin end; // FIXME: just a dirty-fix to make the linux build work again. -// This i the same as the corresponding function for windows -// and MacOSX. +// This i the same as the corresponding function for MacOSX. // Maybe this should be TPlatformBase.Halt() procedure TPlatformLinux.Halt; begin -- cgit v1.2.3