diff options
author | Sebastian Wilhelmi <wilhelmi@ira.uka.de> | 1999-04-22 13:16:10 +0000 |
---|---|---|
committer | Sebastian Wilhelmi <wilhelmi@src.gnome.org> | 1999-04-22 13:16:10 +0000 |
commit | 737d9c6714ed46e04edfcfee63aaf41e0426cc87 (patch) | |
tree | 3025e9f662da904d0bf020a9aac116f7b5670d7d /gutils.c | |
parent | 68b24cb4a8f880f13b5cfae2efd0a38a50248931 (diff) | |
download | glib-737d9c6714ed46e04edfcfee63aaf41e0426cc87.tar.gz |
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>.
Diffstat (limited to 'gutils.c')
-rw-r--r-- | gutils.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -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 |