bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: glibc preparation patch for lockf support in Hurd


From: Samuel Thibault
Subject: Re: glibc preparation patch for lockf support in Hurd
Date: Mon, 18 Aug 2014 23:39:08 +0200
User-agent: Mutt/1.5.21+34 (58baf7c9f32f) (2010-12-30)

Svante Signell, le Mon 18 Aug 2014 21:56:19 +0200, a écrit :
> The reason this is needed is that the MIG generated RPC for hurd/glibc
> currently does not support mixed 32 and 64 bit entries,

Well, make it just always 64bit then.  AIUI, this type is not used in
any RPC at all yet, so this can't break anything. See how this is done
for io_statbuf_t, it's always the 64bit content.

That being said, we have a way deeper issue: once we are in the fcntl()
function, we have currently no way to know whether the application
was built using -D_FILE_OFFSET_BITS=64 or not (and thus using a 32bit
struct flock, or a 64bit struct flock), because F_GETLK is just always
defined to 7.  I see two ways to handle it.  An F_GETLK64 could be
defined to another value (then which one?), and F_GETLK be defined to
that when building with -D_FILE_OFFSET_BITS=64.  Or we can just make
struct flock always 64bit, like is done on BSD. This would however have
the unfortunate effect of breaking existing all binaries making use of
flock, until rebuilt with the fixed headers.

Roland, what do you think?

Samuel



reply via email to

[Prev in Thread] Current Thread [Next in Thread]