Mail Archives: djgpp-workers/2000/11/29/03:15:55
On Tue, 28 Nov 2000, Peter J. Farley III wrote:
> Ah! I misunderstood. Then, how about just the part of the comment
> that the value for 21h/33 was changed from EPERM to EACCES for
> fcntl? Is that more appropriate?
That's exactly what I had in mind.
> >If large regions can be locked, I think we need to consider changing
> >the declaration of struct flock accordingly. What trouble can this
> >make, given that we only widen the types? Do other systems which
> >support large files [Linux, Solaris] use different structures in fcntl
> >locking in this case?
>
> Well, I think on systems that support large files, type "off_t" is
> probably a "long long", whatever that means on those systems.
No, I don't think so. Changing off_t to long long would break lots of
existing code which assumes off_t and ssize_t are compatible.
> >> How would one go about determining whether an arbitrary combination
> >> "covered the whole file"?
> >
> >You use lseek to seek to the starting offset, then look at lseek's
> >return value and compare it with zero. Then you lseek to the end of
> >the region and compare lseek's return value with the result of
> >"lseek(fd,0,SEEK_END);".
>
> I also assume you meant to say "llseek" there, right?
Yes.
- Raw text -