/* $Header$ */
/* channel.c - basic channel handling routines */
#include <errno.h>
+#ifndef __BSD4_2
#include <signal.h>
+#endif
#define __CHANNEL__
#ifdef __USG
#include <termio.h>
}
}
\f
+#ifndef __BSD4_2
static int timeout();
+#endif
int chan_any(c) register chan *c;
{
}
}
+#ifndef __BSD4_2
/* The ch=getc(fp) in the above function calls read(2) to do its task, but if
* there's no input on the file (pipe or terminal) then the read will block.
* To stop this read from blocking, we use the fact that if the read is
signal(SIGALRM, timeout);
alarm(1);
}
+#endif
static void disaster()
{