In general ioctl is to be avoided when there is any other inteface to use instead. The TIOC[GS]WINSZ ioctls are neither part of termio nor termios, but a BSD/Sun extension that has existed independent and unchanged in all extant systems regardless of the other details of their tty drivers.