Mail Archives: djgpp/1997/04/15/19:32:31
On Tue, 15 Apr 1997 09:11:41 GMT, Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
wrote:
> Thanks. But I wanted to ask you to change the source of `fopen' so that
> it tries to call `open' once in compatinility mode, and if that fails,
> call it again with DENYNONE bit. Can you please do that and see if that
> solves the problem?
Yes, it does. Here is a patch that was used:
*** src/libc/ansi/stdio/fopen.c Wed Aug 23 03:49:24 1995
--- src/libc/ansi/stdio/fopen.c Tue Apr 15 18:57:02 1997
***************
*** 53,59 ****
fd = open(file, oflags, 0666);
if (fd < 0)
! return NULL;
if (*mode == 'a')
lseek(fd, 0, SEEK_END);
--- 53,63 ----
fd = open(file, oflags, 0666);
if (fd < 0)
! {
! fd = open(file, oflags | SH_DENYNO, 0666);
! if (fd < 0)
! return NULL;
! }
if (*mode == 'a')
lseek(fd, 0, SEEK_END);
- Raw text -