+static void change_winsize(struct tty *tp, int x, int y);
+
+
+/* OS specific stuff */
+
+#if defined(NetBSD)
+#define VIRTUAL_TTY(x) pc_tty[x] ? (pc_tty[x]) : (pc_tty[x] = ttymalloc())
+#define CONSOLE_TTY pc_tty[NCONS] ? (pc_tty[NCONS]) : (pc_tty[NCONS] = ttymalloc())
+#define frametype struct trapframe
+#define eflags tf_eflags
+extern u_short *Crtat;
+struct tty *pc_tty[NCONS+1];
+int ttrstrt();
+#endif
+
+#if defined(__FreeBSD__)
+#define frametype struct trapframe
+#define eflags tf_eflags
+#define timeout_t timeout_func_t
+#define MONO_BUF (KERNBASE+0xB0000)
+#define CGA_BUF (KERNBASE+0xB8000)
+#endif
+
+#if defined(__386BSD__) && !defined(__FreeBSD__)
+#define frametype struct syscframe
+#define eflags sf_eflags
+#define timeout_t caddr_t
+#define MONO_BUF (0xFE0B0000)
+#define CGA_BUF (0xFE0B8000)
+#endif
+
+#if defined(__386BSD__) || defined(__FreeBSD__)
+#define VIRTUAL_TTY(x) &pccons[x]
+#define CONSOLE_TTY &pccons[NCONS]
+u_short *Crtat = (u_short *)MONO_BUF;
+struct tty pccons[NCONS+1];
+void consinit(void) {scinit();}
+#include "ddb.h"
+#if NDDB > 0
+#define DDB 1
+#endif
+#endif
+