#include <sys/select.h>
#endif
+#ifdef HAVE_STROPTS_H
+#include <stropts.h> /* isastream(), I_PUSH */
+#endif
+
+#ifdef HAVE_STRTIO_H
+#include <strtio.h> /* TIOCSIGNAL */
+#endif
+
+#ifdef HAVE_PTY_H
+#include <pty.h> /* openpty() on Tru64, Linux */
+#endif
+
+#ifdef HAVE_LIBUTIL_H
+#include <libutil.h> /* openpty() on FreeBSD */
+#endif
+
+#ifdef HAVE_UTIL_H
+#include <util.h> /* openpty() on NetBSD */
+#endif
+
#ifdef FD_SET
/* We could get this from param.h, but better not to depend on finding that.