From: benny AT crocodial DOT de (Benjamin Riefenstahl) Subject: Re: BUG: Mingw32: _O_TRUNC 7 Apr 1998 08:23:12 -0700 Message-ID: <352117C6.41BA4A6B.cygnus.gnu-win32@crocodial.de> References: <19980326182829 DOT 16068 DOT qmail AT hotmail DOT com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit To: gnu-win32 AT cygnus DOT com Hi Earnie, Earnie Boyd wrote: > The value defined in fcntl.h for _O_TRUNC is 0x0200 which equates to 512 > decimal. When used in the open routine it gives an error value 22 which > equates to "Invalid argument" from perror or defined as > ERROR_BAD_COMMAND in the Windows32/Errors.h header. Looking at the source for the VC5 RTL this would happen if you have set neither _O_WRONLY nor _O_RDWR. The source has this also in some "This-can't-happen" branches. > I modified the value of _O_TRUNC to 0x0020 which equates to 32 decimal. > No error is issued from the open routine. 0x0020 is _O_SEQUENTIAL in VC5. I would guess that's just an optimizing hint. > I know the the SDK/misc/posix/fcntl.h defines it as 0x00000200 which is > the same as 0x0200. So, does the open routine in crtdll have a bug, or > is the _O_TRUNC value actually wrong? What does the NT Posix subsystem have to do with anything here? so long, benny ====================================== Benjamin Riefenstahl (benny AT crocodial DOT de) Crocodial Communications EntwicklungsGmbH Ruhrstraße 61, D-22761 Hamburg, Germany - 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".