1 //===-- Platform.h ----------------------------------------------*- 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 //===----------------------------------------------------------------------===//
11 #if defined( _MSC_VER )
13 // this will stop signal.h being included
19 #include <lldb/Host/windows/Windows.h>
20 #include <lldb/Host/HostGetOpt.h>
22 // This is not used by MI
34 typedef unsigned char cc_t;
35 typedef unsigned int speed_t;
36 typedef unsigned int tcflag_t;
38 // fcntl.h // This is not used by MI
42 #define TIOCGWINSZ 0x5413
44 // tcsetattr arguments
50 tcflag_t c_iflag; // input mode flags
51 tcflag_t c_oflag; // output mode flags
52 tcflag_t c_cflag; // control mode flags
53 tcflag_t c_lflag; // local mode flags
54 cc_t c_line; // line discipline
55 cc_t c_cc[NCCS]; // control characters
56 speed_t c_ispeed; // input speed
57 speed_t c_ospeed; // output speed
62 #define STDIN_FILENO 0
63 #define PATH_MAX MAX_PATH
64 #define snprintf _snprintf
66 extern int ioctl( int d, int request, ... );
67 extern int kill ( pid_t pid, int sig );
68 extern int tcsetattr( int fd, int optional_actions, const struct termios *termios_p );
69 extern int tcgetattr( int fildes, struct termios *termios_p );
71 // signal handler function pointer type
72 typedef void (*sighandler_t)(int);
74 // CODETAG_IOR_SIGNALS
76 #define SIGINT 2 // Terminal interrupt signal
77 #define SIGQUIT 3 // Terminal quit signal
78 #define SIGKILL 9 // Kill (cannot be caught or ignored)
79 #define SIGPIPE 13 // Write on a pipe with no one to read it
80 #define SIGCONT 18 // Continue executing, if stopped.
81 #define SIGTSTP 20 // Terminal stop signal
82 #define SIGSTOP 23 // Stop executing (cannot be caught or ignored)
83 #define SIGWINCH 28 // (== SIGVTALRM)
84 #define SIG_DFL ( (sighandler_t) -1 ) // Default handler
85 #define SIG_IGN ( (sighandler_t) -2 ) // Ignored
87 extern sighandler_t signal( int sig, sighandler_t );
95 #include <sys/ioctl.h>
101 #include <sys/time.h>
103 #if defined(__FreeBSD__)
104 #include <readline/readline.h>
106 #include <editline/readline.h>