Signed-off-by: Marc Andre Tanner <mat@brain-dump.org>
#include <ctype.h>
#include <errno.h>
#include <fcntl.h>
-#include <pty.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <termios.h>
#include <wchar.h>
-
+#ifdef __linux__
+# include <pty.h>
+#elif defined(__FreeBSD__)
+# include <libutil.h>
+#elif defined(__OpenBSD__)
+# include <util.h>
+#endif
#include "madtty.h"
+#ifndef NCURSES_ATTR_SHIFT
+# define NCURSES_ATTR_SHIFT 8
+#endif
+
#define IS_CONTROL(ch) !((ch) & 0xffffff60UL)
static int has_default = 0;