From a0c16735c9f7c8999d3256a04e7aec66f67d6dc5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Sat, 3 May 2003 14:36:24 +0000 Subject: [PATCH] Added a temporary isatty() implementation (just checks for the fd number for now). git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3144 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kernel/libroot/posix/unistd/Jamfile | 1 + src/kernel/libroot/posix/unistd/terminal.c | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 src/kernel/libroot/posix/unistd/terminal.c diff --git a/src/kernel/libroot/posix/unistd/Jamfile b/src/kernel/libroot/posix/unistd/Jamfile index 942c5b6d67..f1736f8516 100644 --- a/src/kernel/libroot/posix/unistd/Jamfile +++ b/src/kernel/libroot/posix/unistd/Jamfile @@ -17,6 +17,7 @@ KernelMergeObject posix_unistd.o : <$(SOURCE_GRIST)>open.c <$(SOURCE_GRIST)>read.c <$(SOURCE_GRIST)>sleep.c + <$(SOURCE_GRIST)>terminal.c <$(SOURCE_GRIST)>truncate.c <$(SOURCE_GRIST)>usergroup.c <$(SOURCE_GRIST)>usleep.c diff --git a/src/kernel/libroot/posix/unistd/terminal.c b/src/kernel/libroot/posix/unistd/terminal.c new file mode 100644 index 0000000000..a8085e68b0 --- /dev/null +++ b/src/kernel/libroot/posix/unistd/terminal.c @@ -0,0 +1,17 @@ +/* +** Copyright 2003, Axel Dörfler, axeld@pinc-software.de. All rights reserved. +** Distributed under the terms of the OpenBeOS License. +*/ + + +#include +#include + + +int +isatty(int file) +{ + // ToDo: please fix me! + return file < 3; +} +