[PATCH]: Add flock syscall emulation

Nicholas Wourms nwourms@netscape.net
Mon Dec 1 18:22:00 GMT 2003


Corinna wrote:
> On Sun, Nov 30, 2003 at 12:57:48PM -0500, Nicholas Wourms wrote:
> 
>>Corinna wrote:
>>
>>>I've run indent on flock.c since its formatting was non-GNU.
>>
>>I can understand why you did it in this case (the tabs were out of 
>>control), but can we make an exception for bsd/isc-derived code?  I 
>>think that enforcing this rule strictly on written-from-scratch source 
>>is ok, but doing it on derived source reduces the overall transparency 
>>of changes against the upstream version.
> 
> 
> I see.  Is that necessary for flock?  It's not BSD derived and will
> not likely need another external update.

Oh, I think I was unclear.  I was trying to say is that I agree with 
your formatting changes to the flock code.  I just wanted to see if I 
could have an exception from this policy in certain cases where the 
source was derived.

> However, we have a problem here, which I just saw when looking into
> the flock code another time.  The newlib defintion of `struct flock'
> isn't 64 bit aware and it doesn't adhere to the SUSv3 definition.  :-(
> It uses 'long' as datatypes for l_start and l_len but these should
> be off_t.

> So we need to define flock32 and flock64 structs and change the fcntl
> interface to accept both.  Sic.

Hmm, I see what you mean.  While I've been mulling over the problem, it 
seems you've already solved it.  Thanks for catching that oversight on 
my part.

Cheers,
Nicholas



More information about the Cygwin-patches mailing list