Hi,
I've noticed taht as of 3.23.28 all binary files are created as
read-only under Windows NT. The problem is the call to open()
under NT, if O_CREAT is specified, the third parameter (pmode) to
open() is mandatory. If the file does already exist, the parameter is
ignored. I assume it is not intentional to create the files as
read-only.
I suggest the patch below.
Best regards,
/Roger Larsson
*** E:\TEMP\my_open.cdDAQBA Sun Dec 03 22:25:02 2000
--- E:\TEMP\my_open.c.savedDAdLG Sun Dec 03 22:25:02 2000
***************
*** 17,23 ****
#define USES_TYPES
#include "mysys_priv.h"
- #include <my_dir.h>
#include "mysys_err.h"
#include <errno.h>
#if defined(MSDOS) || defined(__WIN__)
--- 17,22 ----
***************
*** 37,47 ****
FileName, Flags, MyFlags));
#if defined(MSDOS) || defined(__WIN__)
if (Flags & O_SHARE)
! fd = sopen((my_string) FileName, (Flags & ~O_SHARE) | O_BINARY,
SH_DENYNO,
! MY_S_IREAD | MY_S_IWRITE);
else
! fd = open((my_string) FileName, Flags | O_BINARY,
! MY_S_IREAD | MY_S_IWRITE);
#elif !defined(NO_OPEN_3)
fd = open(FileName, Flags, my_umask); /* Normal unix */
#else
--- 36,44 ----
FileName, Flags, MyFlags));
#if defined(MSDOS) || defined(__WIN__)
if (Flags & O_SHARE)
! fd = sopen((my_string) FileName, (Flags & ~O_SHARE) | O_BINARY,
SH_DENYNO);
else
! fd = open((my_string) FileName, Flags | O_BINARY);
#elif !defined(NO_OPEN_3)
fd = open(FileName, Flags, my_umask); /* Normal unix */
#else
_____________________________________________________________________________________
Get more from the Web. FREE MSN Explorer download : http://explorer.msn.com