mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-22 08:58:54 +02:00
use sysconf (_SC_GETPW_R_SIZE_MAX) as the new initinal bufsize for
1999-04-22 Sebastian Wilhelmi <wilhelmi@ira.uka.de> * gutils.c (g_get_any_init): use sysconf (_SC_GETPW_R_SIZE_MAX) as the new initinal bufsize for getpwuid_r on systems, that support this. Hint from Holger Duerer <H.Duerer@zait.uni-bremen.de>.
This commit is contained in:
committed by
Sebastian Wilhelmi
parent
68b24cb4a8
commit
737d9c6714
@@ -452,7 +452,12 @@ g_get_any_init (void)
|
||||
|
||||
# ifdef HAVE_GETPWUID_R
|
||||
struct passwd pwd;
|
||||
# ifdef _SC_GETPW_R_SIZE_MAX
|
||||
/* This reurns the maximum length */
|
||||
guint bufsize = sysconf (_SC_GETPW_R_SIZE_MAX);
|
||||
# else /* _SC_GETPW_R_SIZE_MAX */
|
||||
guint bufsize = 64;
|
||||
# endif /* _SC_GETPW_R_SIZE_MAX */
|
||||
gint error;
|
||||
|
||||
do
|
||||
|
Reference in New Issue
Block a user