This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: TAB*, NL*, BS* etc in <sys/ioctls.h> in GNU/Hurd and GNU/BSD


> Roland McGrath, le Fri 07 Sep 2007 13:44:38 -0700, a écrit :
> > > There is a problem with TAB*, NL*, BS*, etc.: POSIX says that
> > > these should get defined when #including <termios.h>, but that's
> > > not currently the case.  What would be the preferred way?  Making
> > > glibc/termios/termios.h #include <sys/ioctls.h>, or moving these
> > > particular definitions into sysdeps/mach/hurd/bits/termios.h?  Do we
> > > really need to keep those definitions in <sys/ioctls.h>?
> > 
> > They are there for compatibility with pre-POSIX applications using old
> > BSD-style ioctls.
> 
> Hum, and unfortunately c_oflag's OLCUC flag (1<<9) has the same value as
> NL2 (0x200)...

The pre-termios style (struct sgttyb) does not have the three separate
flags words, just one.  NL2 is part of that protocol (not really
supported), not the struct termios protocol.  So it just doesn't matter.

Also, OLCUC and IUCLC are GNU extensions to termios that noone actually uses.
So it wouldn't be a problem in practice to change those bit assignments.

The termios bit assignments were chosen to match BSD bits.  If anything
changes, we should change things to match today's BSDs' bits.  Or if doing
a drastic change, we could change everything to match Linux bits.  But I
presume that current BSD bits are closer to what we are using now.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]