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



On Oct 21,  3:42pm, kre%munnari.OZ.AU@localhost (Robert Elz) wrote:
-- Subject: Re: FYI: POSIX update - SIGWINCH and 'struct winsize' (etc) to be

|     Date:        Sat, 21 Oct 2017 02:49:33 +0000 (UTC)
|     From:        christos%astron.com@localhost (Christos Zoulas)
|     Message-ID:  <osecjt$ot$1%blaine.gmane.org@localhost>
| 
|   | 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...)

Why don't we unconditionally (not only when _NETBSD_SOURCE) include
<sys/ttycom.h> from <sys/termios.h> and only make visible struct winsize
when _NETBSD_SOURCE is not defined?

christos


Home | Main Index | Thread Index | Old Index