From: Sebastian Wilhelmi Date: Thu, 22 Apr 1999 13:16:10 +0000 (+0000) Subject: use sysconf (_SC_GETPW_R_SIZE_MAX) as the new initinal bufsize for X-Git-Tag: GLIB_1_3_1~194 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=737d9c6714ed46e04edfcfee63aaf41e0426cc87;p=platform%2Fupstream%2Fglib.git use sysconf (_SC_GETPW_R_SIZE_MAX) as the new initinal bufsize for 1999-04-22 Sebastian Wilhelmi * 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 . --- diff --git a/ChangeLog b/ChangeLog index b07bb28..dc6b075 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +1999-04-22 Sebastian Wilhelmi + + * 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 . + Sat Apr 17 20:55:13 BST 1999 Tony Gale * glib.h, gstring.c: Add new g_string functions for reading diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index b07bb28..dc6b075 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,9 @@ +1999-04-22 Sebastian Wilhelmi + + * 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 . + Sat Apr 17 20:55:13 BST 1999 Tony Gale * glib.h, gstring.c: Add new g_string functions for reading diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index b07bb28..dc6b075 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,9 @@ +1999-04-22 Sebastian Wilhelmi + + * 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 . + Sat Apr 17 20:55:13 BST 1999 Tony Gale * glib.h, gstring.c: Add new g_string functions for reading diff --git a/ChangeLog.pre-2-12 b/ChangeLog.pre-2-12 index b07bb28..dc6b075 100644 --- a/ChangeLog.pre-2-12 +++ b/ChangeLog.pre-2-12 @@ -1,3 +1,9 @@ +1999-04-22 Sebastian Wilhelmi + + * 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 . + Sat Apr 17 20:55:13 BST 1999 Tony Gale * glib.h, gstring.c: Add new g_string functions for reading diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index b07bb28..dc6b075 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,9 @@ +1999-04-22 Sebastian Wilhelmi + + * 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 . + Sat Apr 17 20:55:13 BST 1999 Tony Gale * glib.h, gstring.c: Add new g_string functions for reading diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index b07bb28..dc6b075 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,9 @@ +1999-04-22 Sebastian Wilhelmi + + * 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 . + Sat Apr 17 20:55:13 BST 1999 Tony Gale * glib.h, gstring.c: Add new g_string functions for reading diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index b07bb28..dc6b075 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,9 @@ +1999-04-22 Sebastian Wilhelmi + + * 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 . + Sat Apr 17 20:55:13 BST 1999 Tony Gale * glib.h, gstring.c: Add new g_string functions for reading diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index b07bb28..dc6b075 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,9 @@ +1999-04-22 Sebastian Wilhelmi + + * 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 . + Sat Apr 17 20:55:13 BST 1999 Tony Gale * glib.h, gstring.c: Add new g_string functions for reading diff --git a/glib/gutils.c b/glib/gutils.c index 5ac16ed..ff202f7 100644 --- a/glib/gutils.c +++ b/glib/gutils.c @@ -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 diff --git a/gutils.c b/gutils.c index 5ac16ed..ff202f7 100644 --- a/gutils.c +++ b/gutils.c @@ -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