From: Raja R Harinath Date: Sun, 24 Jan 1999 03:32:55 +0000 (+0000) Subject: (g_get_any_init) [HAVE_GETPWUID_R && HAVE_GETPWUID_R_POSIX]: X-Git-Url: http://git.openbox.org/?a=commitdiff_plain;h=ff87d4a0b6a46031663fccdfa0d8120813329578;p=dana%2Fcg-glib.git (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. --- diff --git a/glib/gutils.c b/glib/gutils.c index 36ab275c..74dac8ab 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 36ab275c..74dac8ab 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)