tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: FYI: POSIX update - SIGWINCH and 'struct winsize' (etc) to be added

    Date:        Sat, 21 Oct 2017 02:49:33 +0000 (UTC)
    From: (Christos Zoulas)
    Message-ID:  <osecjt$ot$>

  | That is <sys/termios.h> already; termios.h is a symlink to that.
  | Try to move it there. I doubt it will cause any disruption. We might
  | be able to save creating another header.

After reflection, maybe not, struct winsize used to be obtained from
<sys/ioctl.h>, tty(4) still says that's where to get it from (that can
perhaps be updated, sometime after winsize becomes exposed by termios.h,
I don't thing pushing progs to include sys/ttycom.h would be rational.)

<sys/ioctl.h> includes <sys/ttycom.h> (as does <termios.h> for NETBSD_SOURCE)
and so makes struct winsize available.

But ioctl.h does not include termios.h, so if we move struct winsize to there,
we will break compat with old code.

It looks as if a new header (sad as it may seem for such a trivial purpose)
is needed after all.

If that happens, would it be reasonable to make the new header #error
if it isn't being included from either termios.h or ttycom.h ?  (ie:
no-one else is supposed to know it exists...)


Home | Main Index | Thread Index | Old Index