svn commit: trunk/uClibc/libc/termios

Peter Kjellerstedt peter.kjellerstedt at axis.com
Wed Feb 22 13:04:20 UTC 2006


> -----Original Message-----
> From: uclibc-bounces at uclibc.org 
> [mailto:uclibc-bounces at uclibc.org] On Behalf Of Peter S. Mazinger
> Sent: Wednesday, February 22, 2006 10:05
> To: uclibc at uclibc.org
> Cc: pkj at uclibc.org
> Subject: Re: svn commit: trunk/uClibc/libc/termios
> 
> On Wed, 22 Feb 2006 pkj at uclibc.org wrote:
> 
> > Author: pkj
> > Date: 2006-02-22 00:27:23 -0800 (Wed, 22 Feb 2006)
> > New Revision: 14193
> > 
> > Log:
> > * Allow baud rates above 115200 again.
> > * Added a couple of esoteric CRIS specific baud rates.
> > 
> > 
> > Modified:
> >    trunk/uClibc/libc/termios/cfsetspeed.c
> > 
> > 
> > Changeset:
> > Modified: trunk/uClibc/libc/termios/cfsetspeed.c
> > ===================================================================
> > --- trunk/uClibc/libc/termios/cfsetspeed.c	2006-02-22 
> 08:24:09 UTC (rev 14192)
> > +++ trunk/uClibc/libc/termios/cfsetspeed.c	2006-02-22 
> 08:27:23 UTC (rev 14193)
> > @@ -91,7 +91,6 @@
> >  #ifdef B115200
> >      { 115200, B115200 },
> >  #endif
> > -#if 0 /* limited on uClibc, keep in sync w/ bits/termios.h */
> 
> haven't read the comment, have you?

Yes I have, and I disagree with it. Controlling which baud 
rates are available is architecture specific and done by 
termios.h. This table should just be the set of all possible 
baud rates on all architectures.

> vapier proposed to make this setting a config option, could 
> you please do it, so not all are affected. 

You cannot (easily) do that, as different baud rate defines 
have different values on different architectures. That is 
why you leave it to (the architecture specific) termios.h.

> I think the CRIS 
> specific bits should be guarded.

Since every baud rate in the table is guarded by its
corresponding define I see no point in adding more guards.

There is no problem to have any number of baud rates in 
this table as only the ones specified in termios.h will
actually make it into the object file.

> Thanks, Peter
> 
> >  #ifdef B153600
> >      { 153600, B153600 },
> >  #endif
> > @@ -122,6 +121,9 @@
> >  #ifdef B1500000
> >      { 1500000, B1500000 },
> >  #endif
> > +#ifdef B1843200
> > +    { 1843200, B1843200 },
> > +#endif
> >  #ifdef B2000000
> >      { 2000000, B2000000 },
> >  #endif
> > @@ -137,7 +139,12 @@
> >  #ifdef B4000000
> >      { 4000000, B4000000 },
> >  #endif
> > +#ifdef B6250000
> > +    { 6250000, B6250000 },
> >  #endif
> > +#ifdef B12500000
> > +    { 12500000, B12500000 },
> > +#endif
> >    };

//Peter



More information about the uClibc mailing list