1 //===-- Platform.cpp --------------------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // this file is only relevant for Visual C++
18 #include "llvm/Support/ErrorHandling.h"
20 int ioctl(int d, int request, ...) {
22 // request the console windows size
25 va_start(vl, request);
26 // locate the window size structure on stack
27 winsize *ws = va_arg(vl, winsize *);
28 // get screen buffer information
29 CONSOLE_SCREEN_BUFFER_INFO info;
30 if (GetConsoleScreenBufferInfo(GetStdHandle(STD_OUTPUT_HANDLE), &info) ==
32 // fill in the columns
33 ws->ws_col = info.dwMaximumWindowSize.X;
38 llvm_unreachable("Not implemented!");
42 int kill(pid_t pid, int sig) {
43 // is the app trying to kill itself
47 llvm_unreachable("Not implemented!");
50 int tcsetattr(int fd, int optional_actions, const struct termios *termios_p) {
51 llvm_unreachable("Not implemented!");
54 int tcgetattr(int fildes, struct termios *termios_p) {
55 // assert( !"Not implemented!" );
56 // error return value (0=success)