delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/03/12/09:52:30

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-3.3 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,SPF_PASS
X-Spam-Check-By: sourceware.org
To: cygwin AT cygwin DOT com
From: Bert <dsboiz AT gmail DOT com>
Subject: Re: IOCTL using <ddk/ntddser.h>
Date: Thu, 12 Mar 2009 14:52:03 +0000 (UTC)
Lines: 34
Message-ID: <loom.20090312T144108-992@post.gmane.org>
References: <loom DOT 20090311T224103-693 AT post DOT gmane DOT org> <20090312083353 DOT GB14431 AT calimero DOT vinschen DOT de>
Mime-Version: 1.0
User-Agent: Loom/3.14 (http://gmane.org/)
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

Corinna Vinschen <corinna-cygwin <at> cygwin.com> writes:

> 
> On Mar 11 22:57, Bert wrote:
> > When compiled on Cygwin's gcc the code below (which asks the baud rate of a
> > serial port) shows the error "Funtion Not Implemented".
> > 
> > I tried several serial port ioctl functions in <ddk/ntddser.h> - all gave the
> > same error.  
> > 
> > 
> > I hope I'm doing something really dumb, any tips?
> 
> Yes.  You're mixing POSIX calls with Windows defines.  That's a no-no.
> When you're in Rome, talk like the Romans do.
> 
> Corinna
> 

Many thanks Corinna. If I understand you correctly, "talk like the Romans" means
"just make everything pure POSIX calls", right?  

Secondly, if that's the case, what would the purpose of the Windows defines be?
(Apart from confusing simple folks like me :)  Put another way, if I want to use
those defines (i.e. flee Rome and settle in Babylon), what version of ioctl
should I call and what libs should I link in?  

Thirdly, and I'm probably pushing it now, if you have some favorite references
to read on the above dichotomy? I'd appreciate the pointer. Or is it *pointer?

Bert





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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019