* fix for 11263, changed fileread and fd_zero to out using $modeswitch.

git-svn-id: trunk@14965 -
This commit is contained in:
marco 2010-03-01 22:35:14 +00:00
parent ccce77f28b
commit be98b13554
18 changed files with 32 additions and 17 deletions

View File

@ -21,6 +21,7 @@ unit sysutils;
interface
{$MODE objfpc}
{$MODESWITCH OUT}
{ force ansistrings }
{$H+}
@ -156,7 +157,7 @@ begin
end;
function FileRead(Handle: LongInt; var Buffer; Count: LongInt): LongInt;
function FileRead(Handle: LongInt; Out Buffer; Count: LongInt): LongInt;
begin
FileRead:=-1;
if (Count<=0) or (Handle<=0) then exit;

View File

@ -18,6 +18,7 @@ unit sysutils;
interface
{$MODE objfpc}
{$MODESWITCH OUT}
{ force ansistrings }
{$H+}
@ -435,7 +436,7 @@ begin
end;
function FileRead (Handle: longint; var Buffer; Count: longint): longint;
function FileRead (Handle: longint; Out Buffer; Count: longint): longint;
assembler;
asm
push ebx

View File

@ -25,6 +25,7 @@ unit sysutils;
interface
{$MODE objfpc}
{$MODESWITCH OUT}
{ force ansistrings }
{$H+}
@ -74,7 +75,7 @@ begin
end;
function FileRead(Handle: LongInt; var Buffer; Count: LongInt): LongInt;
function FileRead(Handle: LongInt; Out Buffer; Count: LongInt): LongInt;
begin
result := -1;
end;

View File

@ -20,6 +20,7 @@ unit sysutils;
interface
{$MODE objfpc}
{$MODESWITCH out}
{ force ansistrings }
{$H+}
@ -135,7 +136,7 @@ begin
end;
Function FileRead (Handle : Longint; Var Buffer; Count : longint) : Longint;
Function FileRead (Handle : Longint; Out Buffer; Count : longint) : Longint;
var
regs : registers;
size,

View File

@ -21,6 +21,7 @@ unit sysutils;
interface
{$MODE objfpc}
{$modeswitch out}
{ force ansistrings }
{$H+}
@ -109,7 +110,7 @@ BEGIN
end;
Function FileRead (Handle : Longint; Var Buffer; Count : longint) : Longint;
Function FileRead (Handle : Longint; out Buffer; Count : longint) : Longint;
begin
(* TODO fix

View File

@ -21,6 +21,7 @@ unit sysutils;
interface
{$MODE objfpc}
{$MODESWITCH OUT}
{ force ansistrings }
{$H+}
@ -157,7 +158,7 @@ begin
end;
function FileRead(Handle: LongInt; var Buffer; Count: LongInt): LongInt;
function FileRead(Handle: LongInt; out Buffer; Count: LongInt): LongInt;
begin
FileRead:=-1;
if (Count<=0) or (Handle<=0) then exit;

View File

@ -25,6 +25,7 @@ unit sysutils;
interface
{$MODE objfpc}
{$MODESWITCH OUT}
{ force ansistrings }
{$H+}
@ -74,7 +75,7 @@ begin
end;
function FileRead(Handle: LongInt; var Buffer; Count: LongInt): LongInt;
function FileRead(Handle: LongInt; Out Buffer; Count: LongInt): LongInt;
begin
result := -1;
end;

View File

@ -18,6 +18,7 @@ unit sysutils;
interface
{$MODE objfpc}
{$MODESWITCH OUT}
{ force ansistrings }
{$H+}
@ -112,7 +113,7 @@ begin
end;
Function FileRead (Handle : THandle; Var Buffer; Count : longint) : longint;
Function FileRead (Handle : THandle; Out Buffer; Count : longint) : longint;
begin
FileRead:=_read (Handle,@Buffer,Count);

View File

@ -17,6 +17,7 @@ unit sysutils;
interface
{$MODE objfpc}
{$MODESWITCH OUT}
{ force ansistrings }
{$H+}
@ -114,7 +115,7 @@ begin
end;
Function FileRead (Handle : THandle; Var Buffer; Count : longint) : Longint;
Function FileRead (Handle : THandle; Out Buffer; Count : longint) : Longint;
begin
FileRead:=libc.fpread (Handle,@Buffer,Count);
end;

View File

@ -74,7 +74,7 @@ Const
Function FileOpen (Const FileName : string; Mode : Integer) : THandle;
Function FileCreate (Const FileName : String) : THandle;
Function FileCreate (Const FileName : String; Mode : Integer) : THandle;
Function FileRead (Handle : THandle; Var Buffer; Count : longint) : Longint;
Function FileRead (Handle : THandle; out Buffer; Count : longint) : Longint;
Function FileWrite (Handle : THandle; const Buffer; Count : Longint) : Longint;
Function FileSeek (Handle : THandle; FOffset, Origin: Longint) : Longint;
Function FileSeek (Handle : THandle; FOffset: Int64; Origin: Longint) : Int64;

View File

@ -18,6 +18,7 @@ unit sysutils;
interface
{$MODE objfpc}
{$MODESWITCH OUT}
{ force ansistrings }
{$H+}
@ -515,7 +516,7 @@ begin
end;
function FileRead (Handle: THandle; var Buffer; Count: longint): longint;
function FileRead (Handle: THandle; Out Buffer; Count: longint): longint;
Var
T: cardinal;
begin

View File

@ -15,6 +15,7 @@
Unit BaseUnix;
Interface
{$modeswitch out}
{$inline on}
Uses UnixType;

View File

@ -71,7 +71,7 @@ Function FpGetEnv (name : String): pChar;
Function fpFD_SET (fdno:cint;var nset : TFDSet): cint;
Function fpFD_CLR (fdno:cint;var nset : TFDSet): cint;
Function fpFD_ZERO (var nset : TFDSet):cint;
Function fpFD_ZERO (out nset : TFDSet):cint;
Function fpFD_ISSET (fdno:cint;const nset : TFDSet): cint;
Function fpfdfillset(var nset : TFDSet):cint;

View File

@ -32,7 +32,7 @@ Begin
fpFD_CLR:=0;
End;
function fpFD_ZERO(var nset : TFDSet):cint;
function fpFD_ZERO(out nset : TFDSet):cint;
var i :longint;

View File

@ -17,6 +17,7 @@ unit sysutils;
interface
{$MODE objfpc}
{$MODESWITCH OUT}
{ force ansistrings }
{$H+}
@ -450,7 +451,7 @@ begin
end;
Function FileRead (Handle : Longint; Var Buffer; Count : longint) : Longint;
Function FileRead (Handle : Longint; out Buffer; Count : longint) : Longint;
begin
repeat

View File

@ -20,6 +20,7 @@ unit sysutils;
interface
{$MODE objfpc}
{$modeswitch out}
{ force ansistrings }
{$H+}
@ -140,7 +141,7 @@ begin
end;
Function FileRead (Handle : Longint; Var Buffer; Count : longint) : Longint;
Function FileRead (Handle : Longint; Out Buffer; Count : longint) : Longint;
var
regs : registers;
size,

View File

@ -18,6 +18,7 @@ unit sysutils;
interface
{$MODE objfpc}
{$MODESWITCH OUT}
{ force ansistrings }
{$H+}
@ -249,7 +250,7 @@ begin
end;
Function FileRead (Handle : THandle; Var Buffer; Count : longint) : Longint;
Function FileRead (Handle : THandle; out Buffer; Count : longint) : Longint;
Var
res : dword;
begin

View File

@ -18,6 +18,7 @@ unit sysutils;
interface
{$MODE objfpc}
{$MODESWITCH OUT}
{ force ansistrings }
{$H+}
@ -170,7 +171,7 @@ begin
end;
Function FileRead (Handle : THandle; Var Buffer; Count : longint) : Longint;
Function FileRead (Handle : THandle; Out Buffer; Count : longint) : Longint;
Var
res : dword;
begin