This is the mail archive of the cygwin-patches@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch]: Create Global Privilege


On Thu, Dec 04, 2003 at 12:25:55AM -0500, Pierre A. Humblet wrote:
> Getting there, but I have questions.
> 1) Because I am inside cygwin, I assume I should use explicitly
>    struct __flock64 and fcntl64(). 
>    Or should I call fcntl_worker directly?

You can use fcntl_worker.  It's already declared in winsup.h.

> 2) Why does struct __flock64 have a "_off_t  l_start"
>    but a "_off64_t  l_len"  (in cygwin/types.h) ?

Urgh!  :-(   Thank god, this is only 3 days old.  Thanks for catching it.

> 3) If I use fcntl64, shouldn't I use lseek64 as well?
>    But then why does the rest of the utmp/wtmp code use lseek?

You can do this if you like but it's not necessary.  If you look what
values are used in these calls to lseek, you'll see that it's either
a seek to position 0 or a seek of sizeof(struct utmp).  And the return
value is never used.

Corinna

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]