diff --git a/ChangeLog b/ChangeLog index d5026769f..17db0f8f1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2000-03-22 Sebastian Wilhelmi + * gutils.c (g_get_current_dir): Ok, Marcus Brinkmann + convinced me, that 128 KB + path length might not be enough for the HURD. So I changed the + loop to at least avoid an integer overflow. + * configure.in: Test for sched_yield as the native yield function first. Corrected typo g_thread_sleep -> g_usleep. Corrected message for the pthread_create test. Negative Priorities are diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index d5026769f..17db0f8f1 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,5 +1,10 @@ 2000-03-22 Sebastian Wilhelmi + * gutils.c (g_get_current_dir): Ok, Marcus Brinkmann + convinced me, that 128 KB + path length might not be enough for the HURD. So I changed the + loop to at least avoid an integer overflow. + * configure.in: Test for sched_yield as the native yield function first. Corrected typo g_thread_sleep -> g_usleep. Corrected message for the pthread_create test. Negative Priorities are diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index d5026769f..17db0f8f1 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,5 +1,10 @@ 2000-03-22 Sebastian Wilhelmi + * gutils.c (g_get_current_dir): Ok, Marcus Brinkmann + convinced me, that 128 KB + path length might not be enough for the HURD. So I changed the + loop to at least avoid an integer overflow. + * configure.in: Test for sched_yield as the native yield function first. Corrected typo g_thread_sleep -> g_usleep. Corrected message for the pthread_create test. Negative Priorities are diff --git a/ChangeLog.pre-2-12 b/ChangeLog.pre-2-12 index d5026769f..17db0f8f1 100644 --- a/ChangeLog.pre-2-12 +++ b/ChangeLog.pre-2-12 @@ -1,5 +1,10 @@ 2000-03-22 Sebastian Wilhelmi + * gutils.c (g_get_current_dir): Ok, Marcus Brinkmann + convinced me, that 128 KB + path length might not be enough for the HURD. So I changed the + loop to at least avoid an integer overflow. + * configure.in: Test for sched_yield as the native yield function first. Corrected typo g_thread_sleep -> g_usleep. Corrected message for the pthread_create test. Negative Priorities are diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index d5026769f..17db0f8f1 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,5 +1,10 @@ 2000-03-22 Sebastian Wilhelmi + * gutils.c (g_get_current_dir): Ok, Marcus Brinkmann + convinced me, that 128 KB + path length might not be enough for the HURD. So I changed the + loop to at least avoid an integer overflow. + * configure.in: Test for sched_yield as the native yield function first. Corrected typo g_thread_sleep -> g_usleep. Corrected message for the pthread_create test. Negative Priorities are diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index d5026769f..17db0f8f1 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,5 +1,10 @@ 2000-03-22 Sebastian Wilhelmi + * gutils.c (g_get_current_dir): Ok, Marcus Brinkmann + convinced me, that 128 KB + path length might not be enough for the HURD. So I changed the + loop to at least avoid an integer overflow. + * configure.in: Test for sched_yield as the native yield function first. Corrected typo g_thread_sleep -> g_usleep. Corrected message for the pthread_create test. Negative Priorities are diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index d5026769f..17db0f8f1 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,5 +1,10 @@ 2000-03-22 Sebastian Wilhelmi + * gutils.c (g_get_current_dir): Ok, Marcus Brinkmann + convinced me, that 128 KB + path length might not be enough for the HURD. So I changed the + loop to at least avoid an integer overflow. + * configure.in: Test for sched_yield as the native yield function first. Corrected typo g_thread_sleep -> g_usleep. Corrected message for the pthread_create test. Negative Priorities are diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index d5026769f..17db0f8f1 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,5 +1,10 @@ 2000-03-22 Sebastian Wilhelmi + * gutils.c (g_get_current_dir): Ok, Marcus Brinkmann + convinced me, that 128 KB + path length might not be enough for the HURD. So I changed the + loop to at least avoid an integer overflow. + * configure.in: Test for sched_yield as the native yield function first. Corrected typo g_thread_sleep -> g_usleep. Corrected message for the pthread_create test. Negative Priorities are diff --git a/glib/gutils.c b/glib/gutils.c index a44c4fa8b..aad31927f 100644 --- a/glib/gutils.c +++ b/glib/gutils.c @@ -344,7 +344,7 @@ g_get_current_dir (void) *buffer = 0; dir = getwd (buffer); #else /* !sun */ - while (max_len < 128 * 1024) + while (max_len < G_MAXULONG / 2) { buffer = g_new (gchar, max_len + 1); *buffer = 0; diff --git a/gutils.c b/gutils.c index a44c4fa8b..aad31927f 100644 --- a/gutils.c +++ b/gutils.c @@ -344,7 +344,7 @@ g_get_current_dir (void) *buffer = 0; dir = getwd (buffer); #else /* !sun */ - while (max_len < 128 * 1024) + while (max_len < G_MAXULONG / 2) { buffer = g_new (gchar, max_len + 1); *buffer = 0;