This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Bug in the /dev/ttySx handling code?

On Tue, May 10, 2005 at 01:16:56PM +0200, Martin Koegler wrote:
>On Mon, May 09, 2005 at 10:35:26PM +0200, Martin Koegler wrote:
>>At least, I understand, why stty -F /dev/ttyS0 under cygwin return 0
>>baud: tcgetattr returns 0 baud, if DTR is not set, which is different
>>to the behaviour of Linux.
>>I would like to track the problem down, but as the use of stty (and cat
>>for doing IO) does not work, I have no idea, how to do it.
>After some testing, I found the problem: Cygwin stores the baud rate in
>c_ospeed of the termios struct, whereas Linux stores them in c_cflag.
>Therefore all code storing the baud rate in c_cflag is not working on
>cygwin.  Posix suggest using cfsetispeed() and cfsetospeed() to set the
>baud rate in the termios structure, as the location for the baud rate
>is not specified.

Hmm, linux does have c_ispeed and c_ospeed elements in the termios


Unsubscribe info:
Problem reports:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]