serial port and unwanted NL -> CR/LF tranlastion

Corinna Vinschen
Wed Nov 22 15:19:00 GMT 2000

Bruce Edge wrote:
> I opened /dev/com1 using:
>         open( name, O_RDWR | O_NOCTTY | O_NONBLOCK )
> and when I write to it using:
>         write( fd, buf, len );
> any 0x0a bytes are getting translated into 0x0d 0x0a pairs.
> How can I stop this?

          open( name, O_RDWR | O_NOCTTY | O_NONBLOCK | O_BINARY)

or link your application with /lib/binmode.o

> This code runs fine on Linux/QNX.

Wow, I'm surprised...


Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer              
Red Hat, Inc.

Want to unsubscribe from this list?
Send a message to

More information about the Cygwin mailing list