* gettext-tools/src/msginit.c (get_user_pwd): Don't define if HAVE_PWD_H is not
set.
(get_user_fullname): Don't call get_user_pwd if HAVE_PWD_H is not set.
}
+#if HAVE_PWD_H /* Only Unix, not native Windows. */
+
/* Returns the struct passwd entry for the current user. */
static struct passwd *
get_user_pwd ()
{
-#if HAVE_PWD_H /* Only Unix, not native Woe32. */
const char *username;
struct passwd *userpasswd;
return userpasswd;
if (errno != 0)
error (EXIT_FAILURE, errno, "getpwuid(%ju)", (uintmax_t) getuid ());
-#endif
return NULL;
}
+#endif
+
/* Return the user's full name. */
static const char *
get_user_fullname ()
{
+#if HAVE_PWD_H
struct passwd *pwd;
pwd = get_user_pwd ();
-#if HAVE_PWD_H
if (pwd != NULL)
{
const char *fullname;