瀏覽代碼

* fixed return value of IsATTY()

git-svn-id: trunk@1308 -
Jonas Maebe 20 年之前
父節點
當前提交
b766a42e23
共有 4 個文件被更改,包括 4 次插入4 次删除
  1. 1 1
      rtl/darwin/termiosproc.inc
  2. 1 1
      rtl/freebsd/termiosproc.inc
  3. 1 1
      rtl/netbsd/termiosproc.inc
  4. 1 1
      rtl/openbsd/termiosproc.inc

+ 1 - 1
rtl/darwin/termiosproc.inc

@@ -121,7 +121,7 @@ Function IsATTY (Handle:cint):cint;
 var
   t : Termios;
 begin
- IsAtty:=TCGetAttr(Handle,t);
+ IsAtty:=ord(TCGetAttr(Handle,t) <> -1);
 end;
 
 

+ 1 - 1
rtl/freebsd/termiosproc.inc

@@ -117,7 +117,7 @@ Function IsATTY (Handle:cint):cint;
 var
   t : Termios;
 begin
- IsAtty:=TCGetAttr(Handle,t);
+ IsAtty:=ord(TCGetAttr(Handle,t) <> -1);
 end;
 
 

+ 1 - 1
rtl/netbsd/termiosproc.inc

@@ -117,7 +117,7 @@ Function IsATTY (Handle:cint):cint;
 var
   t : Termios;
 begin
- IsAtty:=TCGetAttr(Handle,t);
+ IsAtty:=ord(TCGetAttr(Handle,t) <> -1);
 end;
 
 

+ 1 - 1
rtl/openbsd/termiosproc.inc

@@ -117,7 +117,7 @@ Function IsATTY (Handle:cint):cint;
 var
   t : Termios;
 begin
- IsAtty:=TCGetAttr(Handle,t);
+ IsAtty:=ord(TCGetAttr(Handle,t) <> -1);
 end;