Configure question

Patrik Stridvall ps at leissner.se
Tue Nov 19 14:51:43 CST 2002


> Martin Wilck <Martin.Wilck at fujitsu-siemens.com> writes:
> 
> > Very true. Perhaps the practical way would be to assume
> > HAVE_GETPWUID == HAVE_GETPWNAM and see whether someone with
> > a really strange platform complains (but see below).
> 
> There's no reason to do that, it's trivial to check for both. If you
> use getpwnam() check for HAVE_GETPWNAM, if you use getpwuid() check
> for HAVE_GETPWUID. Simple, logical, and works even on strange
> platforms.

Of course. It was so obvious that I missed it. :-)

Still I think the code should verify that any assumptions
made str really true, if possible. Like:

#if defined(HAVE_GETPWUID) || defined(HAVE_GETPWNAM) ||
defined(HAVE_GETPWENT)
# if !(defined(HAVE_GETPWUID) && defined(HAVE_GETPWNAM) &&
defined(HAVE_GETPWENT))
#  error All or none of the functions getpwuid, getpwnam and getpwent are
assumed to exist
# endif
#endif



More information about the wine-devel mailing list