delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2000/10/24/03:32:36

Date: Tue, 24 Oct 2000 09:29:47 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: "Peter J. Farley III" <pjfarley AT banet DOT net>
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: <Pine.SUN.3.91.1001024092921.24828F-100000@is>
MIME-Version: 1.0
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

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 <sys/file.h>.  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.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019