delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1999/09/05/21:40:11

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT sourceware DOT cygnus DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT sourceware DOT cygnus DOT com>
List-Archive: <http://sourceware.cygnus.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sourceware DOT cygnus DOT com>
List-Help: <mailto:cygwin-help AT sourceware DOT cygnus DOT com>,
<http://sourceware.cygnus.com/ml/#faqs>
Sender: cygwin-owner AT sourceware DOT cygnus DOT com
Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com
Message-ID: <01d001bef808$79161630$0a0ac8c8@VECWS1>
From: "Victor Szel" <info AT szelvesz DOT hu>
To: <cygwin AT sourceware DOT cygnus DOT com>
References: <002a01bef73b$13244db0$0a0ac8c8 AT VECWS1> <19990905021026 DOT A8934 AT cygnus DOT com> <005e01bef777$eff7b5b0$0a0ac8c8 AT VECWS1> <19990905130618 DOT A754 AT cygnus DOT com>
Subject: Re: BUG: open() O_ flags one bit too high
Date: Mon, 6 Sep 1999 03:38:07 +0200
Organization: Szelvesz Bt.
MIME-Version: 1.0
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.00.2918.2701
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2918.2701

Chris,


> On Sun, Sep 05, 1999 at 10:23:29AM +0200, Victor Szel wrote:
> >> >#ifdef __CYGWIN__
> >> >/* TODO: Get Cygwin fixed so that this bug fix won't be needed */
> >> >static inline int FixCygwinIOflags( int flags )
> >> >{
> >> >   /* Starting with O_CREAT, the Cygwin I/O flags are 1 bit too high */
> >> >   return ( ( flags & 0x1FF00 ) >> 1 ) | ( flags & 0xFF );
> >> >}
> >> >#endif
> >> 
> >> System O_CREAT (octal) O_CREAT (hex)
> >> ----------------------------------------------------
> >> Cygwin 01000 0x200
> >> Digital UNIX 01000 0x200
> >> FreeBSD 01000 0x200
> >> Irix 00400 0x100
> >> Linux 00100 0x040
> >> SCO UNIX 3.2 00400 0x100
> >> Solaris 00400 0x100
> >> Ultrix 01000 0x200
> >> 
> >> What was the bug again?
> 
> If you are using the open in cygwin then it open() will correctly use
> O_CREAT.  It would be inconceivable that this could be wrong.  If it
> was, then hundreds of applications would not work.
> 
> If you're using cygwin headers in a non-cygwin (aka mingw) application,
> then, um, that's wrong.  You should be using another set of headers.
> I'm sure that someone will coment on this and let you know which they
> should be.

Yeah really strange.

One more idea: we are linking MOLDNAME lib, couldn't that be a problem. 
BTW we are including <mingw32/share.h> and <fcntl.h>, so the flags should 
be OK, but it seems that the open() function is executed from the MFC DLL 
which uses different flag values.

Victor Szel



--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com

- Raw text -


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