]> xenbits.xensource.com Git - unikraft/libs/newlib.git/commitdiff
Import termios.h from musl
authorCostin Lupu <costin.lupu@cs.pub.ro>
Mon, 5 Aug 2019 15:17:47 +0000 (18:17 +0300)
committerFelipe Huici <felipe.huici@neclab.eu>
Wed, 14 Aug 2019 11:40:04 +0000 (13:40 +0200)
Copied as is from the official musl git mirror
git://git.musl-libc.org/musl, commit 6fcb440d.

Original file locations:
* include/termios.h

Signed-off-by: Costin Lupu <costin.lupu@cs.pub.ro>
Reviewed-by: Felipe Huici <felipe.huici@neclab.eu>
musl-imported/include/termios.h [new file with mode: 0644]

diff --git a/musl-imported/include/termios.h b/musl-imported/include/termios.h
new file mode 100644 (file)
index 0000000..d73c780
--- /dev/null
@@ -0,0 +1,46 @@
+#ifndef        _TERMIOS_H
+#define        _TERMIOS_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <features.h>
+
+#define __NEED_pid_t
+
+#include <bits/alltypes.h>
+
+typedef unsigned char cc_t;
+typedef unsigned int speed_t;
+typedef unsigned int tcflag_t;
+
+#define NCCS 32
+
+#include <bits/termios.h>
+
+speed_t cfgetospeed (const struct termios *);
+speed_t cfgetispeed (const struct termios *);
+int cfsetospeed (struct termios *, speed_t);
+int cfsetispeed (struct termios *, speed_t);
+
+int tcgetattr (int, struct termios *);
+int tcsetattr (int, int, const struct termios *);
+
+int tcsendbreak (int, int);
+int tcdrain (int);
+int tcflush (int, int);
+int tcflow (int, int);
+
+pid_t tcgetsid (int);
+
+#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
+void cfmakeraw(struct termios *);
+int cfsetspeed(struct termios *, speed_t);
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif