Date: Sun, 28 Jun 1998 11:31:23 +0300 (IDT) From: Eli Zaretskii To: Theo Landgraf cc: "djgpp AT delorie DOT com" Subject: Re: _fsopen In-Reply-To: <359354EA.B2EC7B60@pac.nl> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk On Fri, 26 Jun 1998, Theo Landgraf wrote: > how can i open a file with file-sharing.... > > usually it's _fsopen, but it's not in libc. Currently, there's no _fsopen in DJGPP's libc. To get the same functionality, use `open' with the sharing bits you want, then call `fdopen' to get a FILE *. For example (UNTESTED!): #include #include ... int fd = open ("foo", O_WRONLY | O_BINARY | SH_DENYWR, 0666); FILE *fp = fd < 0 ? NULL : fdopen (fd, "wb");