Patrik Stridvall ps@leissner.se writes:
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
There is absolutely no reason to do that, because we shouldn't assume anything like that. As I said, if you use getpwnam() you check for HAVE_GETPWNAM; whether getpwuid() also exists or not is completely irrelevant.