aboutsummaryrefslogtreecommitdiffstats
path: root/src/base/UCommon.pas
diff options
context:
space:
mode:
authortobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c>2008-09-10 06:24:16 +0000
committertobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c>2008-09-10 06:24:16 +0000
commit8dc13b99b51555be6fa16d271ddb02d995b46d96 (patch)
tree83fb595c0ed16c5ffebcfa865eb3112322e66cdd /src/base/UCommon.pas
parentd6554ccc1ec223c52f33ff034491e64ac1fa92aa (diff)
downloadusdx-8dc13b99b51555be6fa16d271ddb02d995b46d96.tar.gz
usdx-8dc13b99b51555be6fa16d271ddb02d995b46d96.tar.xz
usdx-8dc13b99b51555be6fa16d271ddb02d995b46d96.zip
FreeBSD compatibility fixes:
- {$IF Defined(Linux)} -> {$IF Defined(Linux) or Defined(BSD)} or {$IF Defined(UNIX)} - config-freebsd.inc added git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1357 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'src/base/UCommon.pas')
-rw-r--r--src/base/UCommon.pas17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/base/UCommon.pas b/src/base/UCommon.pas
index 41e3c1f1..54c54760 100644
--- a/src/base/UCommon.pas
+++ b/src/base/UCommon.pas
@@ -81,7 +81,7 @@ uses
// data used by the ...Locale() functions
-{$IFDEF LINUX}
+{$IF Defined(LINUX) or Defined(BSD)}
var
PrevNumLocale: string;
@@ -91,7 +91,7 @@ const
function setlocale(category: integer; locale: pchar): pchar; cdecl; external 'c' name 'setlocale';
-{$ENDIF}
+{$IFEND}
// In Linux and maybe MacOSX some units (like cwstring) call setlocale(LC_ALL, '')
// to set the language/country specific locale (e.g. charset) for this application.
@@ -111,17 +111,17 @@ function setlocale(category: integer; locale: pchar): pchar; cdecl; external 'c'
// for each call to projectM instead of changing it globally.
procedure SetDefaultNumericLocale();
begin
- {$ifdef LINUX}
+ {$IF Defined(LINUX) or Defined(BSD)}
PrevNumLocale := setlocale(LC_NUMERIC, nil);
setlocale(LC_NUMERIC, 'C');
- {$endif}
+ {$IFEND}
end;
procedure RestoreNumericLocale();
begin
- {$ifdef LINUX}
+ {$IF Defined(LINUX) or Defined(BSD)}
setlocale(LC_NUMERIC, PChar(PrevNumLocale));
- {$endif}
+ {$IFEND}
end;
(*
@@ -275,7 +275,7 @@ var
FilePath, LocalFileName: string;
SearchInfo: TSearchRec;
begin
-{$IFDEF LINUX} // eddie: Changed FPC to LINUX: Windows and Mac OS X dont have case sensitive file systems
+{$IF Defined(LINUX) or Defined(BSD)}
// speed up standard case
if FileExists(FileName) then
begin
@@ -300,8 +300,9 @@ begin
end;
FindClose(SearchInfo);
{$ELSE}
+ // Windows and Mac OS X do not have case sensitive file systems
Result := FileExists(FileName);
-{$ENDIF}
+{$IFEND}
end;