From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from euclid.skiles.gatech.edu (list@euclid.skiles.gatech.edu [130.207.146.50]) by melb.werple.net.au (8.7.5/8.7.3/2) with ESMTP id EAA07670 for ; Tue, 25 Jun 1996 04:45:21 +1000 (EST) Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id OAA08006; Mon, 24 Jun 1996 14:15:44 -0400 (EDT) Resent-Date: Mon, 24 Jun 1996 14:15:44 -0400 (EDT) Date: Mon, 24 Jun 1996 20:15:06 +0200 (MET DST) From: Janos Farkas To: Zoltan Hidvegi cc: zsh-workers@math.gatech.edu Subject: Re: $BAUD is strange on Linux for 115200 In-Reply-To: <199606241754.TAA05385@bolyai.cs.elte.hu> Message-ID: X-Mood: in love MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Resent-Message-ID: <"kVq182.0.0z1.Fjjpn"@euclid> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/1436 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu On Mon, 24 Jun 1996, Zoltan Hidvegi wrote: [about the following patch] > > # if defined(HAVE_TCGETATTR) && defined(HAVE_TERMIOS_H) > > tempbaud = cfgetospeed(&shttyinfo->tio); > > +#if defined CBAUDEX && CBAUDEX > 100 > > + /* If we have CBAUDEX, then it's a mask of the extended > > + speeds, and the baud rates are still encoded. At least > > + this is so on Linux, and I hope this logic is true on > > + most systems. */ > > +#else > > if (tempbaud >= 100) > > return tempbaud; > > else > > +#endif > Is'n it better to move the tempbaud >= 100 check to the default case in > switch (speedcode) (modifying the type of speedcode from int to long)? > I'm sure that if cfgetospeed() returns the value of a B... macro than its > the logical meaning should always be used. For me, it's ok; but I thought it were there for purpose. Maybe POSIX doesn't define that speed_t can only contain Bxxxx constants, or some (maybe non-POSIX) systems are broken in this aspect, or maybe some can get away with B9600=9600 and so they don't really need constants... This way, we hopefully won't break on anyone's system... Or, that's what beta-testing is for? :) Janos