* fix Mantis #21665 for net/free/openbsd

git-svn-id: trunk@21232 -
This commit is contained in:
marco 2012-05-05 15:03:12 +00:00
parent 6f0861e666
commit 2213b67134
3 changed files with 47 additions and 5 deletions

View File

@ -109,9 +109,23 @@ begin
end;
end;
Function TCFlush(fd,qsel:cint):cint; {$ifdef VER2_0}inline;{$endif}
const FREAD = 1; // marked "BSD visible"
FWRITE = 2;
Function TCFlush(fd,qsel:cint):cint; {$ifdef VER2_0}inline;{$endif}
var comval : cint;
begin
TCFlush:=fpIOCtl(fd,TIOCFLUSH,pointer(qsel));
case qsel of
TCIFlush : comval:=FREAD;
TCOFlush : comval:=FWRITE;
TCIOFlush : comval:=FREAD or FWRITE;
else
begin
errno:=ESysEINVAL;
exit(-1);
end;
end;
TCFlush:=fpIOCtl(fd,TIOCFLUSH,pointer(@comval));
end;
Function IsATTY (Handle:cint):cint;

View File

@ -105,9 +105,23 @@ begin
end;
end;
Function TCFlush(fd,qsel:cint):cint;
const FREAD = 1; // marked "BSD visible"
FWRITE = 2;
Function TCFlush(fd,qsel:cint):cint; {$ifdef VER2_0}inline;{$endif}
var comval : cint;
begin
TCFlush:=fpIOCtl(fd,TIOCFLUSH,pointer(qsel));
case qsel of
TCIFlush : comval:=FREAD;
TCOFlush : comval:=FWRITE;
TCIOFlush : comval:=FREAD or FWRITE;
else
begin
errno:=ESysEINVAL;
exit(-1);
end;
end;
TCFlush:=fpIOCtl(fd,TIOCFLUSH,pointer(@comval));
end;
Function IsATTY (Handle:cint):cint;

View File

@ -105,9 +105,23 @@ begin
end;
end;
const FREAD = 1; // marked "BSD visible"
FWRITE = 2;
Function TCFlush(fd,qsel:cint):cint; {$ifdef VER2_0}inline;{$endif}
var comval : cint;
begin
TCFlush:=fpIOCtl(fd,TIOCFLUSH,pointer(qsel));
case qsel of
TCIFlush : comval:=FREAD;
TCOFlush : comval:=FWRITE;
TCIOFlush : comval:=FREAD or FWRITE;
else
begin
errno:=ESysEINVAL;
exit(-1);
end;
end;
TCFlush:=fpIOCtl(fd,TIOCFLUSH,pointer(@comval));
end;
Function IsATTY (Handle:cint):cint;