Re: tcgetattr problem

2006-09-28 Thread ahnkle
On 22:38 Wed 27 Sep , Christopher Faylor wrote: On Wed, Sep 27, 2006 at 10:13:36PM -0400, Christopher Faylor wrote: The name of the function is ioctl, not ioctl. _ioctl. I said _ioctl because in cygwin source, at

Re: tcgetattr problem

2006-09-28 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to ahnkle on 9/28/2006 2:29 AM: I said _ioctl because in cygwin source, at src/newlib/libc/sys/sysvi386/tcgetattr.c the call is to that function. Searching didn't locate any [_]ioctl() function, hence my asking. The linker tends

Re: tcgetattr problem

2006-09-28 Thread Christopher Faylor
On Thu, Sep 28, 2006 at 09:29:15AM +0100, ahnkle wrote: On 22:38 Wed 27 Sep , Christopher Faylor wrote: On Wed, Sep 27, 2006 at 10:13:36PM -0400, Christopher Faylor wrote: The name of the function is ioctl, not ioctl. I said _ioctl because in cygwin source, at

RE: tcgetattr problem

2006-09-28 Thread Dave Korn
On 28 September 2006 03:14, Christopher Faylor wrote: [ ... just to add a few more of the implementation details ... ] On Thu, Sep 28, 2006 at 12:10:18AM +0100, ahnkle wrote: On 18:36 Wed 27 Sep , Igor Peshansky wrote: #define PORT com1 ... fd = open(PORT, O_RDWR | O_NOCTTY );

tcgetattr problem

2006-09-27 Thread ahnkle
hi I wrote a small program to test some serial stuff. I was puzzled because I recall that I was able to set baud rate on a serial port before, but now I cannot. I call tcgetattr() after I open the serial port, but it fails (the tcsetattr() also fails which first got my attention). I enclose a

Re: tcgetattr problem

2006-09-27 Thread Igor Peshansky
On Wed, 27 Sep 2006, ahnkle wrote: hi I wrote a small program to test some serial stuff. I was puzzled because I recall that I was able to set baud rate on a serial port before, but now I cannot. I call tcgetattr() after I open the serial port, but it fails (the tcsetattr() also fails

Re: tcgetattr problem

2006-09-27 Thread ahnkle
On 18:36 Wed 27 Sep , Igor Peshansky wrote: #define PORT com1 ... fd = open(PORT, O_RDWR | O_NOCTTY ); There's your problem. When you open a port as com1, it looks like a file to Cygwin, since it doesn't recognize it as a valid device name. Thus any attempt to manipulate that fd

Re: tcgetattr problem

2006-09-27 Thread Larry Hall (Cygwin)
On 09/27/2006, ahnkle wrote: On 18:36 Wed 27 Sep , Igor Peshansky wrote: #define PORT com1 ... fd = open(PORT, O_RDWR | O_NOCTTY ); There's your problem. When you open a port as com1, it looks like a file to Cygwin, since it doesn't recognize it as a valid device name.

Re: tcgetattr problem

2006-09-27 Thread Christopher Faylor
On Thu, Sep 28, 2006 at 12:10:18AM +0100, ahnkle wrote: On 18:36 Wed 27 Sep , Igor Peshansky wrote: #define PORT com1 ... fd = open(PORT, O_RDWR | O_NOCTTY ); There's your problem. When you open a port as com1, it looks like a file to Cygwin, since it doesn't recognize it as a

Re: tcgetattr problem

2006-09-27 Thread Christopher Faylor
On Wed, Sep 27, 2006 at 10:13:36PM -0400, Christopher Faylor wrote: The name of the function is ioctl, not ioctl. _ioctl. cgf -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html