mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-10-05 05:09:21 +02:00
Fixed yet another bloody implementation of getpwuid_r. This time for AIX.
1999-03-01 Sebastian Wilhelmi <wilhelmi@ira.uka.de> * gutils.c (g_get_any_init): Fixed yet another bloody implementation of getpwuid_r. This time for AIX. Thanks to Olaf Dietsche <olaf.dietsche+list.gtk@netcologne.de>. I would like a configure test better than that, but have no idea, how to do that easily.
This commit is contained in:
committed by
Sebastian Wilhelmi
parent
9816c0fa17
commit
1ed6997670
@@ -462,11 +462,16 @@ g_get_any_init (void)
|
||||
errno = 0;
|
||||
|
||||
# ifdef HAVE_GETPWUID_R_POSIX
|
||||
error = getpwuid_r (getuid (), &pwd, buffer, bufsize, &pw);
|
||||
error = getpwuid_r (getuid (), &pwd, buffer, bufsize, &pw);
|
||||
error = error < 0 ? errno : error;
|
||||
# else /* !HAVE_GETPWUID_R_POSIX */
|
||||
# ifdef _AIX
|
||||
error = getpwuid_r (getuid (), &pwd, buffer, bufsize);
|
||||
pw = error == 0 ? &pwd : NULL;
|
||||
# else /* !_AIX */
|
||||
pw = getpwuid_r (getuid (), &pwd, buffer, bufsize);
|
||||
error = pw ? 0 : errno;
|
||||
# endif /* !_AIX */
|
||||
# endif /* !HAVE_GETPWUID_R_POSIX */
|
||||
|
||||
if (!pw)
|
||||
|
Reference in New Issue
Block a user