diff options
author | jonas <jonas@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2015-01-21 23:28:34 +0000 |
---|---|---|
committer | jonas <jonas@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2015-01-21 23:28:34 +0000 |
commit | 1903b037de2fb3e75826406b46f055acb70963fa (patch) | |
tree | 604cd8b790fe14e5fbe441d4cd647c80d2a36a9a /rtl/inc/system.inc | |
parent | ad1141d52f8353457053b925cd674fe1d5c4eafc (diff) | |
parent | 953d907e4d6c3a5c2f8aaee6e5e4f73c55ce5985 (diff) | |
download | fpc-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/inc/system.inc')
-rw-r--r-- | rtl/inc/system.inc | 27 |
1 files changed, 22 insertions, 5 deletions
diff --git a/rtl/inc/system.inc b/rtl/inc/system.inc index 8f64474bc3..ea7a80d7c0 100644 --- a/rtl/inc/system.inc +++ b/rtl/inc/system.inc @@ -352,22 +352,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} @@ -1519,6 +1519,7 @@ begin end; +{$ifdef FPC_HAS_FEATURE_ANSISTRINGS} procedure DoDirSeparators(var ps:RawByteString); var i : longint; @@ -1538,7 +1539,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; @@ -1558,6 +1562,7 @@ begin p[i-1]:=DirectorySeparator; end; end; +{$endif FPC_HAS_FEATURE_UNICODESTRINGS} {$endif FPC_HAS_FEATURE_FILEIO} @@ -1642,8 +1647,20 @@ end; {$endif FPC_HAS_FEATURE_FILEIO} +{ 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 } {$i text.inc} +{$endif FPC_HAS_FEATURE_TEXTIO} {$ifdef FPC_HAS_FEATURE_FILEIO} { Untyped file } |