Subject: Re: BUG: Mingw32: _O_TRUNC
From: [email-masked] (Earnie Boyd)

7 Apr 1998 09:01:17 -0700
Message-ID: <[email-masked]>
Content-Type: multipart/mixed; 
    boundary="====================987654321_0==_"
To: [email-masked]

--====================987654321_0==_
Content-Type: text/plain; charset="us-ascii"

Hi Mikey,

>From: [email-masked] (Mikey)
>To: "Earnie Boyd" <[email-masked]>
>Subject: Re: BUG: Mingw32: _O_TRUNC
>Date: Tue, 31 Mar 1998 03:10:16 GMT
>Reply-To: [email-masked]
>
>See attached.

I guess I need to be a MSDN member to do that.

>
>_O_TRUNC Opens file and truncates it to zero length; file must have 
write permission. 
>You cannot specify this flag with _O_RDONLY. _O_TRUNC used with 
_O_CREAT 
>opens an existing file or creates a new file.
>
>Did you do your test under bash or command.com?

Results were the same under both.  I'm on NT 3.51, I forget what build.  
The bits to the open mode are O_BINARY, O_WRONLY, O_CREAT, O_EXCL, and 
O_TRUNC.  As I understand it, all of these should be able to be used 
together.

I using JanJaap's 2.8.1 Mingw32 version to build.

>
>O_TRUNC open using msvcrt.dll causes write error 
>under bash (the file is set read only).

I would expect that to be the case.

>
>0x200 is correct per MS, and does truncate the file.

I'm glad to here it.

>
>Try testing under command.com
>

I did.  Could you test the attached source using msvcrt and then crtdll?

-        \\||//
---o0O0--Earnie--0O0o----
[email-masked]
------ooo0O--O0ooo-------

______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com
--====================987654321_0==_
Content-Type: 
    application/x-unknown-content-type-FMA000_VIM-ViImprovedEditor; 
    name="testopen_c"
Content-Transfer-Encoding: x-uuencode
Content-Disposition: attachment; filename="testopen_c"

--====================987654321_0==_
Content-Type: text/plain; charset="us-ascii"

--====================987654321_0==_--
-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".