[PATCH]: Add flock syscall emulation

Corinna Vinschen cygwin-patches@cygwin.com
Mon Dec 1 10:23:00 GMT 2003


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.

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.

Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                                mailto:cygwin@cygwin.com
Red Hat, Inc.



More information about the Cygwin-patches mailing list