delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-developers/2000/05/16/16:33:06

Mailing-List: contact cygwin-developers-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-developers-subscribe AT sourceware DOT cygnus DOT com>
List-Archive: <http://sourceware.cygnus.com/ml/cygwin-developers/>
List-Post: <mailto:cygwin-developers AT sourceware DOT cygnus DOT com>
List-Help: <mailto:cygwin-developers-help AT sourceware DOT cygnus DOT com>, <http://sourceware.cygnus.com/ml/#faqs>
Sender: cygwin-developers-owner AT sourceware DOT cygnus DOT com
Delivered-To: mailing list cygwin-developers AT sourceware DOT cygnus DOT com
From: Chris Faylor <cgf AT cygnus DOT com>
Date: Tue, 16 May 2000 16:32:40 -0400
To: cygdev <cygwin-developers AT sourceware DOT cygnus DOT com>
Subject: Re: [RFD]: fcntl call substituting `setmode'
Message-ID: <20000516163240.C14778@cygnus.com>
Reply-To: cygwin-developers AT sourceware DOT cygnus DOT com
Mail-Followup-To: cgf AT cygnus DOT com,
cygdev <cygwin-developers AT sourceware DOT cygnus DOT com>
References: <3921AC64 DOT C20AB40B AT vinschen DOT de>
Mime-Version: 1.0
User-Agent: Mutt/1.1.12i
In-Reply-To: <3921AC64.C20AB40B@vinschen.de>; from corinna@vinschen.de on Tue, May 16, 2000 at 10:15:32PM +0200

On Tue, May 16, 2000 at 10:15:32PM +0200, Corinna Vinschen wrote:
>Hi all,
>
>I'm just using the `setmode' function and I wonder
>if it wouldn't be a nice thing to have some sort of
>fcntl call for that, eg.
>
>	fcntl(fd, F_SETMODE, O_TEXT);
>
>and a corresponding:
>
>	int mode;
>	fcntl(fd, F_GETMODE, &mode);
>
>and -- because it's that nice -- a substitute for
>`get_osfhandle()':
>
>	HANDLE hdl;
>	fcntl(fd, F_GETOSFHDL, &hdl);
>
>I would like that more than the Windowish calls
>and we could get rid of the io.h file for cygwin.
>Not instantly of course.

Except that get_osfhandle and setmode are both standard methods
for doing things in Windows.  They weren't invented for cygwin.

setmode, in particular, is actually implemented on some other systems, I
believe.  It's probably a no-op but...

It's possible that your fcntl method actually is implemented that way
in Microsoft-land.  Have you checked msdn?  If so, we should definitely
implement it.

Actually, I have no problems with implementing this in general but I
just want to make sure that we use an existing interface if one exists.

cgf

- Raw text -


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