Use sysconf (_SC_GETPW_R_SIZE_MAX) for initial bufsize, where available.

2000-05-31  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>

	* gutils.c (g_get_any_init): Use sysconf (_SC_GETPW_R_SIZE_MAX)
	for initial bufsize, where available. This is already in GLib 1.3.
This commit is contained in:
Sebastian Wilhelmi
2000-05-31 08:57:52 +00:00
committed by Sebastian Wilhelmi
parent 9cf514b198
commit d79c9740fa
10 changed files with 50 additions and 0 deletions

View File

@@ -1,3 +1,8 @@
2000-05-31 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* gutils.c (g_get_any_init): Use sysconf (_SC_GETPW_R_SIZE_MAX)
for initial bufsize, where available. This is already in GLib 1.3.
Thu May 25 03:45:41 2000 Tim Janik <timj@gtk.org>
* released GLib-1.2.8.

View File

@@ -1,3 +1,8 @@
2000-05-31 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* gutils.c (g_get_any_init): Use sysconf (_SC_GETPW_R_SIZE_MAX)
for initial bufsize, where available. This is already in GLib 1.3.
Thu May 25 03:45:41 2000 Tim Janik <timj@gtk.org>
* released GLib-1.2.8.

View File

@@ -1,3 +1,8 @@
2000-05-31 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* gutils.c (g_get_any_init): Use sysconf (_SC_GETPW_R_SIZE_MAX)
for initial bufsize, where available. This is already in GLib 1.3.
Thu May 25 03:45:41 2000 Tim Janik <timj@gtk.org>
* released GLib-1.2.8.

View File

@@ -1,3 +1,8 @@
2000-05-31 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* gutils.c (g_get_any_init): Use sysconf (_SC_GETPW_R_SIZE_MAX)
for initial bufsize, where available. This is already in GLib 1.3.
Thu May 25 03:45:41 2000 Tim Janik <timj@gtk.org>
* released GLib-1.2.8.

View File

@@ -1,3 +1,8 @@
2000-05-31 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* gutils.c (g_get_any_init): Use sysconf (_SC_GETPW_R_SIZE_MAX)
for initial bufsize, where available. This is already in GLib 1.3.
Thu May 25 03:45:41 2000 Tim Janik <timj@gtk.org>
* released GLib-1.2.8.

View File

@@ -1,3 +1,8 @@
2000-05-31 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* gutils.c (g_get_any_init): Use sysconf (_SC_GETPW_R_SIZE_MAX)
for initial bufsize, where available. This is already in GLib 1.3.
Thu May 25 03:45:41 2000 Tim Janik <timj@gtk.org>
* released GLib-1.2.8.

View File

@@ -1,3 +1,8 @@
2000-05-31 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* gutils.c (g_get_any_init): Use sysconf (_SC_GETPW_R_SIZE_MAX)
for initial bufsize, where available. This is already in GLib 1.3.
Thu May 25 03:45:41 2000 Tim Janik <timj@gtk.org>
* released GLib-1.2.8.

View File

@@ -1,3 +1,8 @@
2000-05-31 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* gutils.c (g_get_any_init): Use sysconf (_SC_GETPW_R_SIZE_MAX)
for initial bufsize, where available. This is already in GLib 1.3.
Thu May 25 03:45:41 2000 Tim Janik <timj@gtk.org>
* released GLib-1.2.8.

View File

@@ -480,7 +480,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

View File

@@ -480,7 +480,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