1 //===-- Platform.h ----------------------------------------------*- C++ -*-===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
16 #include "lldb/Host/HostGetOpt.h"
17 #include "lldb/Host/windows/windows.h"
23 typedef unsigned char cc_t;
24 typedef unsigned int speed_t;
25 typedef unsigned int tcflag_t;
27 // fcntl.h // This is not used by MI
31 #define TIOCGWINSZ 0x5413
33 // tcsetattr arguments
38 tcflag_t c_iflag; // input mode flags
39 tcflag_t c_oflag; // output mode flags
40 tcflag_t c_cflag; // control mode flags
41 tcflag_t c_lflag; // local mode flags
42 cc_t c_line; // line discipline
43 cc_t c_cc[NCCS]; // control characters
44 speed_t c_ispeed; // input speed
45 speed_t c_ospeed; // output speed
50 #define STDIN_FILENO 0
51 #define PATH_MAX 32768
52 #define snprintf _snprintf
54 extern int ioctl(int d, int request, ...);
55 extern int kill(pid_t pid, int sig);
56 extern int tcsetattr(int fd, int optional_actions,
57 const struct termios *termios_p);
58 extern int tcgetattr(int fildes, struct termios *termios_p);
60 // signal handler function pointer type
61 typedef void (*sighandler_t)(int);
63 // CODETAG_IOR_SIGNALS
65 #define SIGQUIT 3 // Terminal quit signal
66 #define SIGKILL 9 // Kill (cannot be caught or ignored)
67 #define SIGPIPE 13 // Write on a pipe with no one to read it
68 #define SIGCONT 18 // Continue executing, if stopped.
69 #define SIGTSTP 20 // Terminal stop signal
70 #define SIGSTOP 23 // Stop executing (cannot be caught or ignored)
71 #define SIGWINCH 28 // (== SIGVTALRM)
80 #include <sys/ioctl.h>