Bill Allombert on Sun, 15 Dec 2013 00:38:02 +0100


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

Re: small patch for src/languages/es.c


On Wed, Dec 11, 2013 at 08:25:16PM -0500, Eitan Adler wrote:
> On Tue, Dec 10, 2013 at 5:15 PM, Bill Allombert
> <Bill.Allombert@math.u-bordeaux1.fr> wrote:
> >> > On Sun, Dec 08, 2013 at 10:43:49AM -0500, Eitan Adler wrote:
> >> >> >> have TIOCGWINSZ but where #include <sys/termios.h> does not work.
> >> >>
> >> >> [10010 eitan@gravity (99%) ~ ]%cat foo.c
> >> >> #include <sys/termios.h>
> >> >> [10011 eitan@gravity (99%) ~ !1!]%cc -c foo.c
> >> >> In file included from foo.c:1:
> >> >> /usr/include/sys/termios.h:3:2: warning: "this file includes <sys/termios.h>
> >> >>       which is deprecated, use <termios.h> instead" [-W#warnings]
> >> >> #warning "this file includes <sys/termios.h> which is deprecated, use <t...
> >> >>  ^
> >> >> 1 warning generated.
> >> >>
> >> >> was my rationale.
> >> >
> >> > But on which system do you see this ?
> >>
> >> FreeBSD 11.0-CURRENT amd64
> >
> > Thanks. Do you know the documented way to define TIOCGWINSZ on FreeBSD ?
> 
> tty(4) documents this as sys/ioctl.h.
> 
> > We do not actually need termios.h for anything else.
> 
> I presumed it was used somewhere since it was included.

We also need 'struct winsize' but it should be in the same header file.

Apparently TIOCGWINSZ was defined in sys/termios.h in some SunOS system which
did not carry termios.h.

So there is even less point including termios.h than sys/termios.h.

Cheers,
Bill.