Mail Archives: djgpp-workers/2000/10/24/03:32:36
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 -