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