[libvirt] PATCH: Latest MinGW patches

Jim Meyering jim at meyering.net
Thu Sep 4 09:56:44 UTC 2008


"Richard W.M. Jones" <rjones at redhat.com> wrote:
> On Thu, Sep 04, 2008 at 08:24:14AM +0200, Jim Meyering wrote:
>> Instead of adding the #if/else blocks above,
>> how about adding these in some header file?
>>
>> #ifndef HAVE_GETGID
>> static inline gid_t getgid (void) { return 0; }
>> #endif
>>
>> #ifndef HAVE_GETUID
>> static inline uid_t getuid (void) { return 0; }
>> #endif
>
> Hmmm ...
>
> It's a bit unexpected to have fundamental syscalls like getuid()
> implemented as macros which can return 0 ...

Why?
If those functions don't exist, this supplies replacements
(functions) that have the same semantics as the code in
Dan's patch: i.e. pretend UID==0 and GID==0.

but with far fewer cpp directives.

Doesn't it do the right thing?




More information about the libvir-list mailing list