2
0
Эх сурвалжийг харах

* fix problem with tcsetattr overloadwith const parameter

git-svn-id: trunk@14348 -
pierre 15 жил өмнө
parent
commit
c7179f243b

+ 3 - 3
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;
 

+ 8 - 0
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);