From ff87d4a0b6a46031663fccdfa0d8120813329578 Mon Sep 17 00:00:00 2001 From: Raja R Harinath Date: Sun, 24 Jan 1999 03:32:55 +0000 Subject: [PATCH] (g_get_any_init) [HAVE_GETPWUID_R && HAVE_GETPWUID_R_POSIX]: Aargh. `getpwuid_r' error return: GNU libc.info says to look at `errno'. Solaris 2.5 man page says error code (eg ERANGE) is returned. --- glib/gutils.c | 4 +--- gutils.c | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/glib/gutils.c b/glib/gutils.c index 36ab275c8..74dac8abe 100644 --- a/glib/gutils.c +++ b/glib/gutils.c @@ -453,9 +453,7 @@ g_get_any_init (void) error = getpwuid_r (getuid (), &pwd, buffer, bufsize, &pw); if (!error) goto pw_out; - /* error = errno; According to the Solaris man page, - this is not necessary. */ - + error = errno; # else /* !HAVE_GETPWUID_R_POSIX */ pw = getpwuid_r (getuid (), &pwd, buffer, bufsize); if (pw == NULL) diff --git a/gutils.c b/gutils.c index 36ab275c8..74dac8abe 100644 --- a/gutils.c +++ b/gutils.c @@ -453,9 +453,7 @@ g_get_any_init (void) error = getpwuid_r (getuid (), &pwd, buffer, bufsize, &pw); if (!error) goto pw_out; - /* error = errno; According to the Solaris man page, - this is not necessary. */ - + error = errno; # else /* !HAVE_GETPWUID_R_POSIX */ pw = getpwuid_r (getuid (), &pwd, buffer, bufsize); if (pw == NULL)