浏览代码

Suppress console messages about sign extension in ioctl system call

git-svn-id: trunk@19241 -
pierre 14 年之前
父节点
当前提交
23a8fb1754
共有 1 个文件被更改,包括 6 次插入5 次删除
  1. 6 5
      rtl/freebsd/termiosproc.inc

+ 6 - 5
rtl/freebsd/termiosproc.inc

@@ -26,15 +26,16 @@ end;
 
 Function TCSetAttr(fd:cint;OptAct:cint;const tios:TermIOS):cint;
 var
-  nr:cint;
+  nr: TIoCtlRequest;
 begin
   case OptAct of
   {the three constants TIOCSETA, TIOCSETAW and TIOCSETAF are
    unsigned values above $80000000, so that they give range check errors
-   on 32-bit systems }
-   TCSANOW   : nr:=cint(TIOCSETA);
-   TCSADRAIN : nr:=cint(TIOCSETAW);
-   TCSAFLUSH : nr:=cint(TIOCSETAF);
+   on 32-bit systems 
+   Solved by using TIoCtlRequest type for FpIOCtl second parameter }
+   TCSANOW   : nr:=TIOCSETA;
+   TCSADRAIN : nr:=TIOCSETAW;
+   TCSAFLUSH : nr:=TIOCSETAF;
   else
    begin
      fpsetErrNo(ESysEINVAL);