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 //===----------------------------------------------------------------------===//
10 #ifndef lldb_Platform_h_
11 #define lldb_Platform_h_
13 #include "lldb/Host/HostGetOpt.h"
17 // this will stop signal.h being included
20 #if defined( _MSC_VER )
24 #include "lldb/Host/windows/windows.h"
31 typedef unsigned char cc_t;
32 typedef unsigned int speed_t;
33 typedef unsigned int tcflag_t;
39 #define TIOCGWINSZ 0x5413
42 // signal handler function pointer type
43 typedef void(*sighandler_t)(int);
48 #define SIG_DFL ( (sighandler_t) -1 )
50 #define SIG_IGN ( (sighandler_t) -2 )
58 // tcsetattr arguments
64 tcflag_t c_iflag; // input mode flags
65 tcflag_t c_oflag; // output mode flags
66 tcflag_t c_cflag; // control mode flags
67 tcflag_t c_lflag; // local mode flags
68 cc_t c_line; // line discipline
69 cc_t c_cc[NCCS]; // control characters
70 speed_t c_ispeed; // input speed
71 speed_t c_ospeed; // output speed
83 #define snprintf _snprintf
84 extern sighandler_t signal( int sig, sighandler_t );
85 #define PATH_MAX MAX_PATH
88 #define STDIN_FILENO 0
90 extern int ioctl( int d, int request, ... );
91 extern int kill ( pid_t pid, int sig );
92 extern int tcsetattr( int fd, int optional_actions, const struct termios *termios_p );
93 extern int tcgetattr( int fildes, struct termios *termios_p );
100 #include <sys/ioctl.h>
104 #include <histedit.h>
106 #include <sys/time.h>
110 #endif // lldb_Platform_h_