[M3devel] unix - unknown qualification
Patrick Goltzsch
pgoltzsch at gmail.com
Thu Jul 12 14:58:11 CEST 2012
>>>>> Rodney M. Bates wrote:
> I think we need to see some source code for ClsShare.m3.
> particularly to see what is before the dot on these lines. I
> don't see any of the failing qualifications in Unix.i3 in my
> cm3 directory.
The first errors are caused by the following procedure,
which seems to copied from old DEC example code as I found
out while looking for a solution:
PROCEDURE FilePartLock( h : INTEGER; start, len : INTEGER ) : BOOLEAN RAISES {OSError.E} =
VAR flock := Unix.struct_flock {
l_type := Unix.F_WRLCK,
l_whence := Unix.L_SET,
l_start := 0,
l_len := 0, (* i.e., whole file *)
l_pid := 0 }; (* don't care *)
BEGIN
flock.l_start := start;
flock.l_len := len;
IF Unix.fcntl( h, Unix.F_SETLK, LOOPHOLE( ADR( flock ), Ctypes.long ) ) < 0
THEN
IF Uerror.errno = Uerror.EACCES OR
Uerror.errno = Uerror.EAGAIN THEN
RETURN FALSE
END;
OSErrorPosix.Raise()
END;
RETURN TRUE
END FilePartLock;
Regards,
Patrick
More information about the M3devel
mailing list