summaryrefslogtreecommitdiff
path: root/rtl/java/jsystem.inc
diff options
context:
space:
mode:
authorjonas <jonas@3ad0048d-3df7-0310-abae-a5850022a9f2>2015-01-21 23:28:34 +0000
committerjonas <jonas@3ad0048d-3df7-0310-abae-a5850022a9f2>2015-01-21 23:28:34 +0000
commit1903b037de2fb3e75826406b46f055acb70963fa (patch)
tree604cd8b790fe14e5fbe441d4cd647c80d2a36a9a /rtl/java/jsystem.inc
parentad1141d52f8353457053b925cd674fe1d5c4eafc (diff)
parent953d907e4d6c3a5c2f8aaee6e5e4f73c55ce5985 (diff)
downloadfpc-blocks.tar.gz
* synchronised with trunk till r29513blocks
git-svn-id: http://svn.freepascal.org/svn/fpc/branches/blocks@29516 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'rtl/java/jsystem.inc')
-rw-r--r--rtl/java/jsystem.inc48
1 files changed, 26 insertions, 22 deletions
diff --git a/rtl/java/jsystem.inc b/rtl/java/jsystem.inc
index f4b4fd57c7..ec7df434fa 100644
--- a/rtl/java/jsystem.inc
+++ b/rtl/java/jsystem.inc
@@ -67,20 +67,6 @@ Const
Local types
****************************************************************************}
-{
- TextRec and FileRec are put in a separate file to make it available to other
- units without putting it explicitly in systemh.
- This way we keep TP compatibility, and the TextRec definition is available
- for everyone who needs it.
-}
-{$ifdef FPC_HAS_FEATURE_FILEIO}
-{$i filerec.inc}
-{$endif FPC_HAS_FEATURE_FILEIO}
-
-{$ifndef CPUJVM}
-{$i textrec.inc}
-{$endif CPUJVM}
-
{$ifdef FPC_HAS_FEATURE_EXITCODE}
{$ifdef FPC_OBJFPC_EXTENDED_IF}
{$if High(errorcode)<>maxExitCode}
@@ -108,7 +94,7 @@ const
(*
{ For Error Handling.}
- ErrorBase : Pointer = nil; public name 'FPC_ERRORBASE';
+ ErrorBase : Pointer = nil;public name 'FPC_ERRORBASE';
*)
{$ifndef cpujvm}
@@ -382,22 +368,22 @@ End;
Function Swap (X : Longint) : Longint;{$ifdef SYSTEMINLINE}inline;{$endif}
Begin
- Swap:=(X and $ffff) shl 16 + (X shr 16)
+ Swap:=(X shl 16) + (X shr 16);
End;
//Function Swap (X : Cardinal) : Cardinal;{$ifdef SYSTEMINLINE}inline;{$endif}
//Begin
-// Swap:=(X and $ffff) shl 16 + (X shr 16)
+// Swap:=(X shl 16) + (X shr 16);
//End;
//Function Swap (X : QWord) : QWord;{$ifdef SYSTEMINLINE}inline;{$endif}
//Begin
-// Swap:=(X and $ffffffff) shl 32 + (X shr 32);
+// Swap:=(X shl 32) + (X shr 32);
//End;
-Function swap (X : Int64) : Int64;{$ifdef SYSTEMINLINE}inline;{$endif}
+Function Swap (X : Int64) : Int64;{$ifdef SYSTEMINLINE}inline;{$endif}
Begin
- Swap:=(X and $ffffffff) shl 32 + (X shr 32);
+ Swap:=(X shl 32) + (X shr 32);
End;
{$ifdef SUPPORT_DOUBLE}
@@ -1576,6 +1562,7 @@ begin
end;
+{$ifdef FPC_HAS_FEATURE_ANSISTRINGS}
procedure DoDirSeparators(var ps:RawByteString);
var
i : longint;
@@ -1595,7 +1582,10 @@ begin
p[i-1]:=DirectorySeparator;
end;
end;
+{$endif FPC_HAS_FEATURE_ANSISTRINGS}
+
+{$ifdef FPC_HAS_FEATURE_UNICODESTRINGS}
procedure DoDirSeparators(var ps:UnicodeString);
var
i : longint;
@@ -1615,6 +1605,7 @@ begin
p[i-1]:=DirectorySeparator;
end;
end;
+{$endif FPC_HAS_FEATURE_UNICODESTRINGS}
{$endif FPC_HAS_FEATURE_FILEIO}
@@ -1699,10 +1690,23 @@ end;
{$endif FPC_HAS_FEATURE_FILEIO}
+(* already declared earlier in system.pp for java
+
+{ helper for targets supporting no ansistrings, it is used
+ by non-ansistring code }
+function min(v1,v2 : SizeInt) : SizeInt;
+ begin
+ if v1<v2 then
+ result:=v1
+ else
+ result:=v2;
+ end;
+*)
+
+{$ifdef FPC_HAS_FEATURE_TEXTIO}
{ Text file }
-{$ifndef CPUJVM}
{$i text.inc}
-{$endif CPUJVM}
+{$endif FPC_HAS_FEATURE_TEXTIO}
{$ifdef FPC_HAS_FEATURE_FILEIO}
{ Untyped file }