Review Request 123811: Use tcgetattr & tcsetattr if available

Pino Toscano pino at kde.org
Sat May 16 09:56:00 UTC 2015


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

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/23358a06/attachment.html>


More information about the Kde-frameworks-devel mailing list