From f5e48e94a2f4d4bbd6e5628c7f2afafc6dbcc459 Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Thu, 7 Mar 2024 17:28:52 -0500 Subject: build: Build mlibc + add distclean target Signed-off-by: Ian Moffett --- lib/mlibc/sysdeps/ironclad/generic/pty.cpp | 41 ------------------------------ 1 file changed, 41 deletions(-) delete mode 100644 lib/mlibc/sysdeps/ironclad/generic/pty.cpp (limited to 'lib/mlibc/sysdeps/ironclad/generic/pty.cpp') diff --git a/lib/mlibc/sysdeps/ironclad/generic/pty.cpp b/lib/mlibc/sysdeps/ironclad/generic/pty.cpp deleted file mode 100644 index 1626e4b..0000000 --- a/lib/mlibc/sysdeps/ironclad/generic/pty.cpp +++ /dev/null @@ -1,41 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -int openpty(int *mfd, int *sfd, char *name, const struct termios *ios, const struct winsize *win) { - int ret; - int fds[2]; - SYSCALL1(SYSCALL_OPENPTY, fds); - if (errno) { - return -1; - } - *mfd = fds[0]; - *sfd = fds[1]; - - if (name != NULL) { - ret = ttyname_r(*mfd, name, (size_t)-1); - if (ret) { - return -1; - } - } - if (ios != NULL) { - ret = tcsetattr(*mfd, TCSANOW, ios); - if (ret) { - return -1; - } - } - if (win != NULL) { - ret = ioctl(*mfd, TIOCGWINSZ, win); - if (ret) { - return -1; - } - } - return ret; -} -- cgit v1.2.3