Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'newlib/libc/sys/linux/tcdrain.c')
-rw-r--r--newlib/libc/sys/linux/tcdrain.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/newlib/libc/sys/linux/tcdrain.c b/newlib/libc/sys/linux/tcdrain.c
new file mode 100644
index 000000000..364fc035f
--- /dev/null
+++ b/newlib/libc/sys/linux/tcdrain.c
@@ -0,0 +1,13 @@
+/* tcdrain - wait for transmission of output */
+
+#include <termios.h>
+#include <sys/ioctl.h>
+#include <machine/weakalias.h>
+
+int
+__libc_tcdrain (int fd)
+{
+ return ioctl (fd, TCSBRK, 1);
+}
+weak_alias (__libc_tcdrain, tcdrain)
+