BUG: Mingw32: _O_TRUNC
Earnie Boyd
earnie_boyd@hotmail.com
Mon Apr 6 17:20:00 GMT 1998
Hi Mikey,
>From: jeffdbREMOVETHIS@goodnet.com (Mikey)
>To: "Earnie Boyd" <earnie_boyd@hotmail.com>
>Subject: Re: BUG: Mingw32: _O_TRUNC
>Date: Tue, 31 Mar 1998 03:10:16 GMT
>Reply-To: jeffdbREMOVETHIS@goodnet.com
>
>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----
-earnie_boyd@hotmail.com-
------ooo0O--O0ooo-------
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com
testopen_c
-------------- next part --------------
A non-text attachment was scrubbed...
Name: testopen_c
Type: text/x-c
Size: 663 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/19980406/b2430b4b/attachment.bin>
More information about the Cygwin
mailing list