* revert part of r44879: flock must use kernel_off_t: off_t breaks e.g. i386

git-svn-id: trunk@45810 -
This commit is contained in:
florian 2020-07-19 19:54:22 +00:00
parent 64da9c4ab2
commit d6d92e3666
3 changed files with 7 additions and 8 deletions

View File

@ -2352,9 +2352,10 @@ implementation
not trecorddef(self).contains_cross_aword_field and
{ records cannot go into registers on 16 bit targets for now }
(sizeof(aint)>2) and
not trecorddef(self).contains_float_field
) and
not needs_inittable;
(not trecorddef(self).contains_float_field) or
(recsize <= sizeof(aint))
) and
not needs_inittable;
{$endif cpuhighleveltarget}
end;
else

View File

@ -1728,8 +1728,6 @@ implementation
function tabstractvarsym.is_regvar(refpara: boolean):boolean;
var
tempdef : tdef;
begin
{ Register variables are not allowed in the following cases:
- regvars are disabled
@ -1748,7 +1746,6 @@ implementation
{$if not defined(powerpc) and not defined(powerpc64)}
and ((vardef.typ <> recorddef) or
(varregable = vr_addr) or
tabstractrecordsymtable(tabstractrecorddef(vardef).symtable).has_single_field(tempdef) or
not(varstate in [vs_written,vs_readwritten]));
{$endif}
end;

View File

@ -170,8 +170,9 @@ type
FLock = Record
l_type : cshort; { lock type: read/write, etc. }
l_whence: cshort; { type of l_start }
l_start : off_t; { starting offset }
l_len : off_t; { len = 0 means until end of file }
{ this must be really kernel_off_t: it must be 32 bit on i386 }
l_start : kernel_off_t; { starting offset }
l_len : kernel_off_t; { len = 0 means until end of file }
l_pid : pid_t; { lock owner }
{$if defined(cpusparc) or defined(cpusparc64)}
__pad : cshort;