<termios.h>: add two new POSIX functions.
musl already added tcgetwinsize() and tcsetwinsize(), but I didn't
notice.
Trivial single-line inlines added to a header that's already written
that way.
Test: treehugger
Change-Id: Iac95ea6a89f3872025c512f7e61987b81d0aafa7
diff --git a/tests/headers/posix/termios_h.c b/tests/headers/posix/termios_h.c
index 1255c16..0a67eaa 100644
--- a/tests/headers/posix/termios_h.c
+++ b/tests/headers/posix/termios_h.c
@@ -42,6 +42,12 @@
STRUCT_MEMBER(struct termios, tcflag_t, c_lflag);
STRUCT_MEMBER_ARRAY(struct termios, cc_t/*[]*/, c_cc);
+#if !defined(__GLIBC__) // Our glibc is too old.
+ TYPE(struct winsize);
+ STRUCT_MEMBER(struct winsize, unsigned short, ws_row);
+ STRUCT_MEMBER(struct winsize, unsigned short, ws_col);
+#endif
+
MACRO(NCCS);
MACRO(VEOF);
@@ -162,6 +168,12 @@
FUNCTION(tcflush, int (*f)(int, int));
FUNCTION(tcgetattr, int (*f)(int, struct termios*));
FUNCTION(tcgetsid, pid_t (*f)(int));
+#if !defined(__GLIBC__) // Our glibc is too old.
+ FUNCTION(tcgetwinsize, int (*f)(int, struct winsize*));
+#endif
FUNCTION(tcsendbreak, int (*f)(int, int));
FUNCTION(tcsetattr, int (*f)(int, int, const struct termios*));
+#if !defined(__GLIBC__) // Our glibc is too old.
+ FUNCTION(tcsetwinsize, int (*f)(int, const struct winsize*));
+#endif
}