use sysconf (_SC_GETPW_R_SIZE_MAX) as the new initinal bufsize for
authorSebastian Wilhelmi <wilhelmi@ira.uka.de>
Thu, 22 Apr 1999 13:16:10 +0000 (13:16 +0000)
committerSebastian Wilhelmi <wilhelmi@src.gnome.org>
Thu, 22 Apr 1999 13:16:10 +0000 (13:16 +0000)
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>.

ChangeLog
ChangeLog.pre-2-0
ChangeLog.pre-2-10
ChangeLog.pre-2-12
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
glib/gutils.c
gutils.c

index b07bb28..dc6b075 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+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>.
+
 Sat Apr 17 20:55:13 BST 1999  Tony Gale <gale@gtk.org>
 
        * glib.h, gstring.c: Add new g_string functions for reading
index b07bb28..dc6b075 100644 (file)
@@ -1,3 +1,9 @@
+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>.
+
 Sat Apr 17 20:55:13 BST 1999  Tony Gale <gale@gtk.org>
 
        * glib.h, gstring.c: Add new g_string functions for reading
index b07bb28..dc6b075 100644 (file)
@@ -1,3 +1,9 @@
+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>.
+
 Sat Apr 17 20:55:13 BST 1999  Tony Gale <gale@gtk.org>
 
        * glib.h, gstring.c: Add new g_string functions for reading
index b07bb28..dc6b075 100644 (file)
@@ -1,3 +1,9 @@
+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>.
+
 Sat Apr 17 20:55:13 BST 1999  Tony Gale <gale@gtk.org>
 
        * glib.h, gstring.c: Add new g_string functions for reading
index b07bb28..dc6b075 100644 (file)
@@ -1,3 +1,9 @@
+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>.
+
 Sat Apr 17 20:55:13 BST 1999  Tony Gale <gale@gtk.org>
 
        * glib.h, gstring.c: Add new g_string functions for reading
index b07bb28..dc6b075 100644 (file)
@@ -1,3 +1,9 @@
+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>.
+
 Sat Apr 17 20:55:13 BST 1999  Tony Gale <gale@gtk.org>
 
        * glib.h, gstring.c: Add new g_string functions for reading
index b07bb28..dc6b075 100644 (file)
@@ -1,3 +1,9 @@
+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>.
+
 Sat Apr 17 20:55:13 BST 1999  Tony Gale <gale@gtk.org>
 
        * glib.h, gstring.c: Add new g_string functions for reading
index b07bb28..dc6b075 100644 (file)
@@ -1,3 +1,9 @@
+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>.
+
 Sat Apr 17 20:55:13 BST 1999  Tony Gale <gale@gtk.org>
 
        * glib.h, gstring.c: Add new g_string functions for reading
index 5ac16ed..ff202f7 100644 (file)
@@ -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
index 5ac16ed..ff202f7 100644 (file)
--- 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