Mike Frysinger, le Mon 17 Dec 2007 19:05:14 -0500, a écrit : > On Monday 17 December 2007, Samuel Thibault wrote: > > Mike Frysinger, le Sun 04 Nov 2007 15:24:59 -0400, a écrit : > > > On Sunday 04 November 2007, Samuel Thibault wrote: > > > > void termio_init(tp, speed, op) > > > > > > > > - tp->c_cflag = CS8 | HUPCL | CREAD | speed; > > > > + tp->c_cflag = CS8 | HUPCL | CREAD; > > > > + cfsetispeed(tp, speed); > > > > + cfsetospeed(tp, speed); > > > > if (op->flags & F_LOCAL) { > > > > tp->c_cflag |= CLOCAL; > > > > } > > > > > > > > - tp->c_iflag = tp->c_lflag = tp->c_oflag = tp->c_line = 0; > > > > + tp->c_iflag = tp->c_lflag = tp->c_oflag = 0; > > > > +#ifndef __GNU__ > > > > + tp->c_line = 0; > > > > +#endif > > > > tp->c_cc[VMIN] = 1; > > > > tp->c_cc[VTIME] = 0; > > > > > > since we fully initialize the termios struct, it may be cleaner to just > > > do this at the start of the function: > > > memset(&tp, 0, sizeof(tp)); > > > > > > then we wont need #ifdef's to figure out what struct members exist > > > > Here is an updated patch: > > > > Migrate to standard POSIX termios structures and functions. > > i thought you pointed out that POSIX does not allow for my memset() > suggestion ? Oh, right, I'll toss it back. Samuel - To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html