POSIX compliant termios.h?
Alexey Shuvaev
shuvaev at physik.uni-wuerzburg.de
Wed Aug 13 00:32:39 UTC 2008
On Tue, Aug 12, 2008 at 05:10:38PM +0200, Ed Schouten wrote:
> Wait wait wait... Deja vu. brlcad is broken? I submitted a patch for it
> in December 2007, which got committed in February.
>
> http://bugs.freebsd.org/119096
>
> I even contacted the maintainer of brlcad to make sure a portable
> version of it got integrated. Gah!
>
Yes, I think it is committed upstream. But it was about src/vas4/vas_io.c.
Now it is time to look at src/libtermio/termio.c. Namely, the following
used to work:
31
32 #if HAVE_SYS_IOCTL_COMPAT_H
33 # include <sys/ioctl_compat.h>
34 # define TAB3 (TAB1|TAB2)
35 # if !defined(OCRNL)
36 # define OCRNL 0000010
37 # endif
38 #endif
39
I think, this peace of code is obsolete on CURRENT now.
Compiler says that neither TAB1 or TAB2 are declared.
As it is CURRENT we can wait a while for the things to settle down.
FYI, the brlcad code is picking up the HAVE_TERMIOS_H case:
40
41 /*
42 * This file will work IFF one of these three flags is set:
43 * HAVE_TERMIOS_H use POXIX termios and tcsetattr() call with XOPE
N flags
44 * SYSV use SysV Rel3 termio and TCSETA ioctl
45 * BSD use Version 7 / BSD sgttyb and TIOCSETP ioctl
46 */
47
[skip]
286 #ifdef HAVE_TERMIOS_H
287 curr_tio[fd].c_oflag |= TAB3; /* Tab expansion ON.
*/
288 (void)tcsetattr( fd, TCSANOW, &curr_tio[fd] );
289 #endif
[skip]
310 #ifdef HAVE_TERMIOS_H
311 curr_tio[fd].c_oflag &= ~TAB3; /* Tab expans. OFF.
*/
312 (void)tcsetattr( fd, TCSANOW, &curr_tio[fd] );
313 #endif
Alexey.
More information about the freebsd-current
mailing list