Review Request 123811: Use tcgetattr & tcsetattr if available

Oswald Buddenhagen ossi at kde.org
Sat May 16 13:13:16 UTC 2015


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/123811/#review80462
-----------------------------------------------------------



src/kpty.cpp (line 115)
<https://git.reviewboard.kde.org/r/123811/#comment55181>

    there is no point in leaving that path in, and it makes the code less readable.


- Oswald Buddenhagen


On May 16, 2015, 9:56 a.m., Pino Toscano wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/123811/
> -----------------------------------------------------------
> 
> (Updated May 16, 2015, 9:56 a.m.)
> 
> 
> Review request for KDE Frameworks and Oswald Buddenhagen.
> 
> 
> Repository: kpty
> 
> 
> Description
> -------
> 
> Look for `tcgetattr` & `tcsetattr`, and use them if found before trying the own OS checks. They are specified by POSIX.1-2008, so they should be available on platforms implementing modern POSIX interfaces.
> 
> The rest of the fallback code is left as is (including manually selecting `tcgetattr` & `tcsetattr` on some OSes), to potentially avoid other platforms.
> 
> 
> Diffs
> -----
> 
>   src/ConfigureChecks.cmake 35d7402567016c89c1fd947f44e29351aca4fe4a 
>   src/config-pty.h.cmake e8dc262df0d1e6342e869fe17509b10a64baf300 
>   src/kpty.cpp 145514cdee53dc81cf7453bd8d1514f173cb972e 
> 
> Diff: https://git.reviewboard.kde.org/r/123811/diff/
> 
> 
> Testing
> -------
> 
> On Linux:
> 
> 1. builds fine, and tests pass
> 2. manually set `HAVE_TCGETATTR` & `HAVE_TCSETATTR` to `FALSE`, the `ioctl` code is used as before, build is fine and so tests too 
> 
> Not tested on other OSes, but the second test above should make sure there's no build behaviour change if a platform does not have those functions.
> 
> 
> Thanks,
> 
> Pino Toscano
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20150516/1f18def2/attachment.html>


More information about the Kde-frameworks-devel mailing list