#pragma once
#if defined(_WIN32)
#include <inttypes.h>
#include <io.h>
#include <signal.h>
#include "lldb/Host/HostGetOpt.h"
#include "lldb/Host/windows/PosixApi.h"
#include "lldb/Host/windows/windows.h"
struct winsize {
long ws_col;
};
typedef unsigned char cc_t;
typedef unsigned int speed_t;
typedef unsigned int tcflag_t;
#ifndef O_NOCTTY
#define O_NOCTTY 0400
#endif
#define TIOCGWINSZ 0x5413
#define TCSANOW 0
#define NCCS 32
struct termios {
tcflag_t c_iflag;
tcflag_t c_oflag;
tcflag_t c_cflag;
tcflag_t c_lflag;
cc_t c_line;
cc_t c_cc[NCCS];
speed_t c_ispeed;
speed_t c_ospeed;
};
#define STDIN_FILENO 0
#ifndef PATH_MAX
#define PATH_MAX 32768
#endif
#define snprintf _snprintf
extern int ioctl(int d, int request, ...);
extern int kill(pid_t pid, int sig);
extern int tcsetattr(int fd, int optional_actions,
const struct termios *termios_p);
extern int tcgetattr(int fildes, struct termios *termios_p);
typedef void (*sighandler_t)(int);
#define SIGQUIT 3
#define SIGKILL 9
#define SIGPIPE 13
#define SIGCONT 18
#define SIGTSTP 20
#ifndef SIGSTOP
#define SIGSTOP 23
#endif
#define SIGWINCH 28
#else
#include <inttypes.h>
#include <limits.h>
#include <getopt.h>
#include <libgen.h>
#include <sys/ioctl.h>
#include <termios.h>
#include <unistd.h>
#include <pthread.h>
#include <sys/time.h>
#endif