delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1998/04/07/09:01:17

From: earnie_boyd AT hotmail DOT com (Earnie Boyd)
Subject: Re: BUG: Mingw32: _O_TRUNC
7 Apr 1998 09:01:17 -0700 :
Message-ID: <19980331132948.284.qmail.cygnus.gnu-win32@hotmail.com>
To: gnu-win32 AT cygnus DOT com

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

Hi Mikey,

>From: jeffdbREMOVETHIS AT goodnet DOT com (Mikey)
>To: "Earnie Boyd" <earnie_boyd AT hotmail DOT com>
>Subject: Re: BUG: Mingw32: _O_TRUNC
>Date: Tue, 31 Mar 1998 03:10:16 GMT
>Reply-To: jeffdbREMOVETHIS AT goodnet DOT 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 AT hotmail DOT com-
------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"

begin 644 testopen_c
M(VEN8VQU9&4@/&EO+F@^#0HC:6YC;'5D92`\<W1D:6\N:#X-"B-I;F-L=61E
M(#QE<G)N;RYH/@T*(VEN8VQU9&4@/'-Y<R]S=&%T+F@^#0HC:6YC;'5D92`\
M9F-N=&PN:#X-"@T*:6YT(&9D97-C.PT*#0II;G0@;6%I;BAV;VED*0T*>PT*
M("!F<')I;G1F*'-T9&5R<BP@(D]?0DE.05)9/25I+"!?3U]"24Y!4ED])6E<
M;B(L($]?0DE.05)9+"!?3U]"24Y!4EDI.PT*("!F<')I;G1F*'-T9&5R<BP@
M(D]?5U)/3DQ9/25I+"!?3U]74D].3%D])6E<;B(L($]?5U)/3DQ9+"!?3U]7
M4D].3%DI.PT*("!F<')I;G1F*'-T9&5R<BP@(D]?0U)%050])6DL("!?3U]#
M4D5!5#TE:5QN(BP@($]?0U)%050L(%]/7T-214%4*3L-"B`@9G!R:6YT9BAS
M=&1E<G(L(")/7T580TP])6DL("`@7T]?15A#3#TE:5QN(BP@("!/7T580TPL
M(%]/7T580TPI.PT*("!F<')I;G1F*'-T9&5R<BP@(D]?5%)53D,])6DL("!?
M3U]44E5.0STE:5QN(BP@($]?5%)53D,L(%]/7U1254Y#*3L-"B`@9F1E<V,@
M/2!O<&5N*")T97-T;W!E;BYT;7`B+"!/7T))3D%262!\($]?5U)/3DQ9('P@
M3U]#4D5!5"!\($]?15A#3"!\($]?5%)53D,L(#!X,#$P,"D[#0H@(&9P<FEN
M=&8H<W1D97)R+"`B9F1E<V,])6E<;B(L(&9D97-C*3L-"B`@9G!R:6YT9BAS
A=&1E<G(L(")E<G)N;STE:5QN(BP AT 97)R;F\I.PT*?0T*
`
end
--====================987654321_0==_
Content-Type: text/plain; charset="us-ascii"

--====================987654321_0==_--
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


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