Date: Tue, 24 Oct 2000 09:29:47 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: "Peter J. Farley III" cc: djgpp-workers AT delorie DOT com Subject: Re: New versions of perl require "flock" or working "fcntl(fh, F_SETLK/W,...)" In-Reply-To: <4.3.1.0.20001023200320.00afcac0@pop5.banet.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp-workers AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp-workers AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Mon, 23 Oct 2000, Peter J. Farley III wrote: > OK, let me restate what I need to do so I don't get it wrong: > > 1. Implement flock and fcntl(... F_SETLK/W, ...) using _dos_lock > (INT21/5C) as a base function > 2. Add flock to the libc headers (where? unistd.h?) My references say it's in . And it looks like it's non-Posix, so its prototype should be after "#ifndef _POSIX_SOURCE". Btw, what about lockf? It has similar functionality and might be even Posix (anybody knows?). The prototype of lockf is in unistd.h. Does Perl try to use that? > 3. Add a DJGPP wrappper function for perl to call as flock; this is > needed so that the perl flock implementation can ignore errors > when running under plain DOS (using INT 2Fh/AX=1600h) Sounds like a good plan. > Q: Do I need to test for Win3.1, or do *all* win versions load > vshare as you said? VSHARE exists only in Windows 3.11 and Windows 9X. Windows 3.1 did not have it. However, the Windows 3.1 installation program always adds SHARE.EXE to CONFIG.SYS (or AUTOEXEC.BAT, I forget which one). So, unless the user edited SHARE out of the startup files, you can always count on it being present on Windows. I wouldn't worry about the case of the user removing SHARE on Windows 3.1: they should know what they are doing; and W3.1 is a rare platform for DJGPP nowadays anyhow. > I may (no, probably *will*) be returning here for questions as > implementation proceeds. By all means, feel free to do that. Thanks for working on this.