This is an archive of the discontinued LLVM Phabricator instance.

[libc] Add termios.h and the implementation of functions declared in it.
ClosedPublic

Authored by sivachandra on Oct 18 2022, 1:45 AM.

Diff Detail

Event Timeline

sivachandra created this revision.Oct 18 2022, 1:45 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptOct 18 2022, 1:45 AM
sivachandra requested review of this revision.Oct 18 2022, 1:45 AM

Suppress a compiler warning.

lntue accepted this revision.Oct 18 2022, 8:12 AM
lntue added inline comments.
libc/src/termios/linux/CMakeLists.txt
4

nit: we *use* different

This revision is now accepted and ready to land.Oct 18 2022, 8:12 AM
michaelrj added inline comments.Oct 18 2022, 10:20 AM
libc/src/termios/linux/cfsetispeed.cpp
21

nit: if it is

libc/src/termios/linux/cfsetospeed.cpp
21

same as above

libc/test/src/termios/termios_test.cpp
49

this will fail on the buildbot, you need to put the rest of the test inside an if(fd > 0) clause, similar to how isatty_test.cpp does it.

sivachandra marked 2 inline comments as done.

Fix typos.

sivachandra marked an inline comment as done.Oct 18 2022, 11:44 AM
sivachandra added inline comments.
libc/test/src/termios/termios_test.cpp
49

Can we try once more on the bot? If it fails, I will add a conditional here.

michaelrj accepted this revision.Oct 18 2022, 12:54 PM
michaelrj added inline comments.
libc/test/src/termios/termios_test.cpp
49

SGTM