delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2000/10/24/22:02:21

Message-Id: <4.3.1.0.20001024215752.00ac8790@pop5.banet.net>
X-Sender: usbanet DOT farley3 AT pop5 DOT banet DOT net
X-Mailer: QUALCOMM Windows Eudora Version 4.3.1
Date: Tue, 24 Oct 2000 22:03:08 -0400
To: djgpp-workers AT delorie DOT com
From: "Peter J. Farley III" <pjfarley AT banet DOT net>
Subject: Re: New versions of perl require "flock" or working "fcntl(fh,
F_SETLK/W,...)"
Cc: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
In-Reply-To: <Pine.SUN.3.91.1001024092921.24828F-100000@is>
References: <4 DOT 3 DOT 1 DOT 0 DOT 20001023200320 DOT 00afcac0 AT pop5 DOT banet DOT net>
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

At 09:29 AM 10/24/00 +0200, you wrote:
 >On Mon, 23 Oct 2000, Peter J. Farley III wrote:
<Snipped>
 >> 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".

OK, thanks for that info.

 >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?

Actually, it does.  If there is a "lockf" function, perl will emulate 
"flock" using "lockf".  The "fcntl" emulation is a last resort choice.

<Snipped>
 >Sounds like a good plan.

Thanks.  Now if I can actually do it...

 >> 	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.

Fair enough.  I'll just code to check for DOS as you already suggested, 
and ignore errors in that case only.

 >> 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.

Thanks for the invitation.  And you're welcome (I hope).  We'll see how 
far I can get (which should be pretty far, given Mark E.'s 
contribution).

More as it develops.
---------------------------------------------------------
Peter J. Farley III (pjfarley AT dorsai DOT org OR
                      pjfarley AT banet DOT net)

- Raw text -


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