bug-gnulib
[Top][All Lists]
Advanced

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

Re: Stuff missing in gnulib needed for MinGW


From: Bruno Haible
Subject: Re: Stuff missing in gnulib needed for MinGW
Date: Wed, 16 Jan 2008 23:51:34 +0100
User-agent: KMail/1.5.4

Simon Josefsson asked:
> What do people think about having dummy functions in gnulib?  Do they
> serve a purpose, or do they hide problems and lead to confusion?

If they are far away from emulating the Unix functionality, IMO they
contribute to hiding problems.

One reason not to put these into gnulib is that these substitutes will
work for some applications and be inadequate for others. That is,
gnulib's purpose of _sharing_ code can not well be achieved because
the requirements of different packages are different.

> For example, for 'getuid', the MinGW
> code in gnulib for it would just return 0, 42, or whatever.

It a good example. A good implementation of getuid would use a
uid_t type that has 128 bits and return the md5sum of the SID,
SECURITY_INFORMATION and SECURITY_DESCRIPTOR of the user, or something
like this. Probably it will also work to return the low 63 bits of this
info; collisions will still be extremely improbable. OTOH, for many
packages, returning 42 is sufficient.

Bruno





reply via email to

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