svn commit: trunk/uClibc/libc/termios

Peter Kjellerstedt peter.kjellerstedt at axis.com
Wed Feb 22 13:52:38 UTC 2006


> -----Original Message-----
> From: Peter S. Mazinger [mailto:ps.m at gmx.net] 
> Sent: Wednesday, February 22, 2006 14:35
> To: Peter Kjellerstedt
> Cc: uclibc at uclibc.org
> Subject: RE: svn commit: trunk/uClibc/libc/termios
> 
> On Wed, 22 Feb 2006, Peter Kjellerstedt wrote:
> 
> > > -----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.
> 
> Well, in .28 it was limited to 115200, when I updated 
> cfsetspeed.c I have removed that limit and added it back 
> later, no idea, why it was limited and who did it, it 
> shrinks the code somewhat (__MAX_BAUD is the mandatory 
> one now, not hardcoded as in .28)
> 
> > > 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.
> 
> if the object stays small for non-cris, ok.

Well, it does of course depend on the defines in termios.h.
If the baud rates are defined there, they will be included
in the table. On the other hand since they are defined in
termios.h I assume they are valid and should be supported.
The architectures that are affected are alpha, cris, mips,
powerpc and sparc as those are the ones with their own 
version of termios.h.

> Peter 

//Peter



More information about the uClibc mailing list