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: Cygwin files and devices philosophy


On Sat, Nov 27, 2004 at 01:32:00PM -0500, Igor Pechtchanski wrote:
>>In my case, I provide an option for a terminal program what device
>>should be used to open the file.  I don't want to restrict what devices
>>are or are not allowed, except by using function calls to the Posix API
>>to determine if the required functionality can be met.
>
>"\\.\COM37" is not POSIX.  Cygwin is POSIX.  You're trying to use POSIX
>functions (isatty) on a non-POSIX device -- the result is unspecified
>(which means that the above behavior is perfectly valid, as is any
>other).  If you want to write portable code, why not use the equivalent
>POSIX devices?  "/dev/ttyS36" should work, and so should "/dev/com37"
>(according to the documentation).

And, in reality, isatty should (and does, AFAICT) return 0 for anything
opened with \\.\COMn.

cgf

--
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/


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