mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-27 14:36:16 +01:00
Ok, Marcus Brinkmann <Marcus.Brinkmann@ruhr-uni-bochum.de> convinced me,
2000-03-22 Sebastian Wilhelmi <wilhelmi@ira.uka.de> * gutils.c (g_get_current_dir): Ok, Marcus Brinkmann <Marcus.Brinkmann@ruhr-uni-bochum.de> 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, which could happen at beyond 2GB size ;-)
This commit is contained in:
parent
762a2befa4
commit
837cbbdf8d
@ -1,5 +1,10 @@
|
|||||||
2000-03-22 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
2000-03-22 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||||
|
|
||||||
|
* gutils.c (g_get_current_dir): Ok, Marcus Brinkmann
|
||||||
|
<Marcus.Brinkmann@ruhr-uni-bochum.de> 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
|
* configure.in: Test for sched_yield as the native yield function
|
||||||
first. Corrected typo g_thread_sleep -> g_usleep. Corrected
|
first. Corrected typo g_thread_sleep -> g_usleep. Corrected
|
||||||
message for the pthread_create test. Negative Priorities are
|
message for the pthread_create test. Negative Priorities are
|
||||||
|
@ -1,5 +1,10 @@
|
|||||||
2000-03-22 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
2000-03-22 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||||
|
|
||||||
|
* gutils.c (g_get_current_dir): Ok, Marcus Brinkmann
|
||||||
|
<Marcus.Brinkmann@ruhr-uni-bochum.de> 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
|
* configure.in: Test for sched_yield as the native yield function
|
||||||
first. Corrected typo g_thread_sleep -> g_usleep. Corrected
|
first. Corrected typo g_thread_sleep -> g_usleep. Corrected
|
||||||
message for the pthread_create test. Negative Priorities are
|
message for the pthread_create test. Negative Priorities are
|
||||||
|
@ -1,5 +1,10 @@
|
|||||||
2000-03-22 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
2000-03-22 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||||
|
|
||||||
|
* gutils.c (g_get_current_dir): Ok, Marcus Brinkmann
|
||||||
|
<Marcus.Brinkmann@ruhr-uni-bochum.de> 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
|
* configure.in: Test for sched_yield as the native yield function
|
||||||
first. Corrected typo g_thread_sleep -> g_usleep. Corrected
|
first. Corrected typo g_thread_sleep -> g_usleep. Corrected
|
||||||
message for the pthread_create test. Negative Priorities are
|
message for the pthread_create test. Negative Priorities are
|
||||||
|
@ -1,5 +1,10 @@
|
|||||||
2000-03-22 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
2000-03-22 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||||
|
|
||||||
|
* gutils.c (g_get_current_dir): Ok, Marcus Brinkmann
|
||||||
|
<Marcus.Brinkmann@ruhr-uni-bochum.de> 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
|
* configure.in: Test for sched_yield as the native yield function
|
||||||
first. Corrected typo g_thread_sleep -> g_usleep. Corrected
|
first. Corrected typo g_thread_sleep -> g_usleep. Corrected
|
||||||
message for the pthread_create test. Negative Priorities are
|
message for the pthread_create test. Negative Priorities are
|
||||||
|
@ -1,5 +1,10 @@
|
|||||||
2000-03-22 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
2000-03-22 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||||
|
|
||||||
|
* gutils.c (g_get_current_dir): Ok, Marcus Brinkmann
|
||||||
|
<Marcus.Brinkmann@ruhr-uni-bochum.de> 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
|
* configure.in: Test for sched_yield as the native yield function
|
||||||
first. Corrected typo g_thread_sleep -> g_usleep. Corrected
|
first. Corrected typo g_thread_sleep -> g_usleep. Corrected
|
||||||
message for the pthread_create test. Negative Priorities are
|
message for the pthread_create test. Negative Priorities are
|
||||||
|
@ -1,5 +1,10 @@
|
|||||||
2000-03-22 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
2000-03-22 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||||
|
|
||||||
|
* gutils.c (g_get_current_dir): Ok, Marcus Brinkmann
|
||||||
|
<Marcus.Brinkmann@ruhr-uni-bochum.de> 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
|
* configure.in: Test for sched_yield as the native yield function
|
||||||
first. Corrected typo g_thread_sleep -> g_usleep. Corrected
|
first. Corrected typo g_thread_sleep -> g_usleep. Corrected
|
||||||
message for the pthread_create test. Negative Priorities are
|
message for the pthread_create test. Negative Priorities are
|
||||||
|
@ -1,5 +1,10 @@
|
|||||||
2000-03-22 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
2000-03-22 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||||
|
|
||||||
|
* gutils.c (g_get_current_dir): Ok, Marcus Brinkmann
|
||||||
|
<Marcus.Brinkmann@ruhr-uni-bochum.de> 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
|
* configure.in: Test for sched_yield as the native yield function
|
||||||
first. Corrected typo g_thread_sleep -> g_usleep. Corrected
|
first. Corrected typo g_thread_sleep -> g_usleep. Corrected
|
||||||
message for the pthread_create test. Negative Priorities are
|
message for the pthread_create test. Negative Priorities are
|
||||||
|
@ -1,5 +1,10 @@
|
|||||||
2000-03-22 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
2000-03-22 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||||
|
|
||||||
|
* gutils.c (g_get_current_dir): Ok, Marcus Brinkmann
|
||||||
|
<Marcus.Brinkmann@ruhr-uni-bochum.de> 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
|
* configure.in: Test for sched_yield as the native yield function
|
||||||
first. Corrected typo g_thread_sleep -> g_usleep. Corrected
|
first. Corrected typo g_thread_sleep -> g_usleep. Corrected
|
||||||
message for the pthread_create test. Negative Priorities are
|
message for the pthread_create test. Negative Priorities are
|
||||||
|
@ -344,7 +344,7 @@ g_get_current_dir (void)
|
|||||||
*buffer = 0;
|
*buffer = 0;
|
||||||
dir = getwd (buffer);
|
dir = getwd (buffer);
|
||||||
#else /* !sun */
|
#else /* !sun */
|
||||||
while (max_len < 128 * 1024)
|
while (max_len < G_MAXULONG / 2)
|
||||||
{
|
{
|
||||||
buffer = g_new (gchar, max_len + 1);
|
buffer = g_new (gchar, max_len + 1);
|
||||||
*buffer = 0;
|
*buffer = 0;
|
||||||
|
2
gutils.c
2
gutils.c
@ -344,7 +344,7 @@ g_get_current_dir (void)
|
|||||||
*buffer = 0;
|
*buffer = 0;
|
||||||
dir = getwd (buffer);
|
dir = getwd (buffer);
|
||||||
#else /* !sun */
|
#else /* !sun */
|
||||||
while (max_len < 128 * 1024)
|
while (max_len < G_MAXULONG / 2)
|
||||||
{
|
{
|
||||||
buffer = g_new (gchar, max_len + 1);
|
buffer = g_new (gchar, max_len + 1);
|
||||||
*buffer = 0;
|
*buffer = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user