From c7179f243b53c4b7aef4561701d5d5cdaddccb9c Mon Sep 17 00:00:00 2001 From: pierre Date: Mon, 7 Dec 2009 11:07:55 +0000 Subject: [PATCH] * fix problem with tcsetattr overloadwith const parameter git-svn-id: trunk@14348 - --- rtl/solaris/termios.inc | 6 +++--- rtl/solaris/termiosproc.inc | 8 ++++++++ 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/rtl/solaris/termios.inc b/rtl/solaris/termios.inc index bd98b1739e..b7a7daeba1 100644 --- a/rtl/solaris/termios.inc +++ b/rtl/solaris/termios.inc @@ -67,13 +67,13 @@ function tcgetattr(_para1:cint; var _para2:termios):cint;cdecl;external; -(* Const before type ignored *) - function tcsetattr(_para1:cint; _para2:cint; const _para3:termios):cint;cdecl;external; - function tcgetattr(_para1:cint; _para2:Ptermios):cint;cdecl;external; (* Const before type ignored *) function tcsetattr(_para1:cint; _para2:cint; _para3:Ptermios):cint;cdecl;external; +(* Const before type ignored *) + function tcsetattr(_para1:cint; _para2:cint; const _para3:termios):cint;cdecl; + // function tcsendbreak(_para1:cint; _para2:cint):cint;cdecl; diff --git a/rtl/solaris/termiosproc.inc b/rtl/solaris/termiosproc.inc index 6ff26ca2fe..885339b1fc 100644 --- a/rtl/solaris/termiosproc.inc +++ b/rtl/solaris/termiosproc.inc @@ -18,6 +18,14 @@ IOCtl and Termios calls ******************************************************************************} +{ Old version directly called the C code but + this is wrong if the constant is pusehd directly on stack, + without passing the address as is done for i386 code generator PM } + +function tcsetattr(_para1:cint; _para2:cint; const _para3:termios):cint;cdecl; + begin + tcsetattr:=tcsetattr(_para1,_para2,@_para3); + end; Procedure CFMakeRaw(var tios:TermIOS);