pty: add packet mode for sun/illumos
The attached illumos-packet-mode.patch provides pty packet mode support for System V/sun/illumos.
illumos does not support the bsd-style/linux TIOCPKT pty ioctl, but it does support packet mode via STREAMS.
The current illumos patches simply #ifdef's out the TIOCPKT code and runs the pty with packet mode disabled. This patch provides a suitable packet mode implementation for illumos.
The patch maintains the convention used on the pty slave to condition STREAMS code on #if defined(__sun) && defined(HAVE_STROPTS_H)
. However, the existing slave code and this new packet code on the master should work on any System V derivative, such as SCO, AIX, not just sun. So it should also be possible to dispense with the defined(__sun)
condition throughout.