-----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 to add a leading underscore; in the cygwin sources, it would be ioctl(), not _ioctl(). newlib/libc/sys/sysvi386 is NOT part of cygwin. It would be under src/winsup/cygwin instead. > > My point in mentioning that com1 works is that it could be confusing that > "com1" works > with open(), but the handle obtained doesn't work with tcgetattr(), whereas > "/dev/ttyS0" > works with both. How many times do we have to say it? com1 works with open because it is a valid file name, but cygwin treats it like a disk file, and you can't do ioctl on a disk file. /dev/ttyS0 on the other hand is the cygwin-sanctioned name of the serial port (as it is in Linux, by the way), and cygwin opens it as a serial device instead of a disk file, and hence will support ioctl. Use the correct device name, not the windows back door, and your program will do what you want. We are not about to slow down open() to special case whether the string passed to it was the relative name com1, because there are too many other relative-looking windows magic filenames; instead open looks for the absolute path /dev/ and treats devices specially with a minimal impact to the rest of file-opening code. - -- Life is short - so eat dessert first! Eric Blake [EMAIL PROTECTED] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.1 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFG7oF84KuGfSFAYARAomcAKCg77UWgcZQA8t43Bn5HfdGzKGa1QCfTKBt EGAqDs8p5pUw+lfBTqcGKQM= =OQXA -----END PGP SIGNATURE----- -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/