diff --git a/rtl/darwin/termiosproc.inc b/rtl/darwin/termiosproc.inc index fec945b33e..bd4a376392 100644 --- a/rtl/darwin/termiosproc.inc +++ b/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; diff --git a/rtl/freebsd/termiosproc.inc b/rtl/freebsd/termiosproc.inc index 36bd3b60b1..bf1ed43c89 100644 --- a/rtl/freebsd/termiosproc.inc +++ b/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; diff --git a/rtl/netbsd/termiosproc.inc b/rtl/netbsd/termiosproc.inc index ace80f1d81..413a7e8c6a 100644 --- a/rtl/netbsd/termiosproc.inc +++ b/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; diff --git a/rtl/openbsd/termiosproc.inc b/rtl/openbsd/termiosproc.inc index 740e858eb3..802daee27a 100644 --- a/rtl/openbsd/termiosproc.inc +++ b/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;