summaryrefslogtreecommitdiff
path: root/proto.h
diff options
context:
space:
mode:
Diffstat (limited to 'proto.h')
-rw-r--r--proto.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/proto.h b/proto.h
index 7d2fe2a..3f1e05b 100644
--- a/proto.h
+++ b/proto.h
@@ -77,8 +77,10 @@ extern char *sys_errlist[];
#if SETPGRP_VOID
/* Smells like POSIX: should all be ok. */
#else
-/* BSD: fake it. */
+/* Old BSD: fake it. */
#define setpgid(pid, pgrp) setpgrp(pid, pgrp)
+#include <sys/ioctl.h>
+#define tcgetpgrp(fd) ioctl((fd), TIOCGPGRP)
#define tcsetpgrp(fd, pgrp) ioctl((fd), TIOCSPGRP, &(pgrp))
#endif
@@ -86,6 +88,7 @@ extern char *sys_errlist[];
/* Nothing doing. */
#define setpgid()
+#define tcgetpgrp()
#define tcsetpgrp()
#endif /*HAVE_SETPGRP */