summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libc/cfiospeed.c
diff options
context:
space:
mode:
Diffstat (limited to 'c/src/lib/libc/cfiospeed.c')
-rw-r--r--c/src/lib/libc/cfiospeed.c54
1 files changed, 0 insertions, 54 deletions
diff --git a/c/src/lib/libc/cfiospeed.c b/c/src/lib/libc/cfiospeed.c
deleted file mode 100644
index c2f40d3892..0000000000
--- a/c/src/lib/libc/cfiospeed.c
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * This file contains the RTEMS implementation of the POSIX API
- * routines cfgetispeed, cfgetospeed, cfsetispeed and cfsetospeed.
- *
- * $Id$
- *
- */
-
-#include <rtems.h>
-#if defined(RTEMS_NEWLIB)
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <errno.h>
-#include <termios.h>
-
-#include "internal.h"
-#include "libio.h"
-
-speed_t
-cfgetospeed(const struct termios *tp)
-{
- return tp->c_cflag & CBAUD;
-}
-
-int
-cfsetospeed(struct termios *tp, speed_t speed)
-{
- if (speed & ~CBAUD) {
- errno = EINVAL;
- return -1;
- }
- tp->c_cflag = (tp->c_cflag & ~CBAUD) | speed;
- return 0;
-}
-
-speed_t
-cfgetispeed(const struct termios *tp)
-{
- return (tp->c_cflag / (CIBAUD / CBAUD)) & CBAUD;
-}
-
-int
-cfsetispeed(struct termios *tp, speed_t speed)
-{
- if (speed & ~CBAUD) {
- errno = EINVAL;
- return -1;
- }
- tp->c_cflag = (tp->c_cflag & ~CIBAUD) | (speed * (CIBAUD / CBAUD));
- return 0;
-}
-
-#endif