Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Date: Thu, 29 Apr 2004 14:07:09 +0200 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: Need to replicate TIOCGICOUNT and TIOCMIWAIT on cygwin Message-ID: <20040429120709.GE17535@cygbert.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2i On Apr 27 11:50, Brian Ford wrote: > On Tue, 27 Apr 2004, Jim Brain wrote: > > All the examples online use CreateFile, which I coded up, and cygwin > > gives me a fd of 8, but select returns immediately and I read -1 bytes > > on serial. I looked at the cygwin source, which uses NtCreateFile, but > > I can't find headers or libraries for that. I am stumped. I feel like I Weird. NtCreateFile is documented in MSDN. > > am so close... It's rather a bummer there is a not a > > cygwin_get_win32_handle(int fd), as that is what I need. #include HANDLE h = (HANDLE) get_osfhandle (fd); > AFAIK, the NtCreateFile change is a very recent one, only available in > fairly recent snapshots. It has a bug in that it doesn't support win32 > device paths and thus the internally defined path to the COM ports. > Hopefully, that will be fixed soon. Looks like a simple path handling problem. The current code doesn't recognize "\\.\" paths. A fix should be fairly easy, just replace "\\.\" by "\??\". So far it always replaces leading "\\" by "\??\UNC\" so Win32 device names are treated like network paths. Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Co-Project Leader mailto:cygwin AT cygwin DOT com Red Hat, Inc. -- 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/