Date: Mon, 14 Apr 1997 12:17:44 +0300 (IDT) From: Eli Zaretskii To: Michael Bukin cc: djgpp AT delorie DOT com Subject: Re: Desperately need help with "fopen" In-Reply-To: <5ikdkv$lad@sky.inp.nsk.su> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On 11 Apr 1997, Michael Bukin wrote: > >On 10 Apr 1997, Michael Bukin wrote: > > > >> filename = (_argc > 1) ? _argv[1] : "test.txt"; > >> if (_dos_open (filename, O_RDONLY | SH_DENYNO, &handle)) > > > >Could you please see if the same works with `_open' instead of > >`_dos_open' if you use the same sharing flags? > > It works with both open and _open. Based on what was said in this thread and on what I know about file sharing on Windows 95, it seems to me that `fopen' and `open' should first try to open the file in compatibility mode, and if that fails, try once aagain with SH_DENYNO bit set. This should work in most cases. Am I right? Could you please test this and post the necessary patches to `fopen' and `open'? Thanks.