diff options
author | Ulrich Drepper <drepper@redhat.com> | 2006-09-12 11:44:01 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2006-09-12 11:44:01 +0000 |
commit | 30aa57851a93d6efd6493c5a29cf82f58083bdf4 (patch) | |
tree | 98b5c02208d0b53238de1d51ecf4cc83fb5e653b | |
parent | 41aba3d764a72e48fa5bb08969653582c38f319f (diff) | |
download | glibc-30aa57851a93d6efd6493c5a29cf82f58083bdf4.tar glibc-30aa57851a93d6efd6493c5a29cf82f58083bdf4.tar.gz glibc-30aa57851a93d6efd6493c5a29cf82f58083bdf4.tar.bz2 glibc-30aa57851a93d6efd6493c5a29cf82f58083bdf4.zip |
[BZ #2526, BZ #3138, BZ #3143]
2006-09-12 Jakub Jelinek <jakub@redhat.com>
[BZ #2526]
* README.libm: Fix a thinko in sqrt algorithm description.
[BZ #3143]
* manual/string.texi (argz_delete): Fix prototype.
Patch by <alpt@freaknet.org>.
2006-08-26 Joseph Myers <joseph@codesourcery.com>
[BZ #3138]
* io/test-lfs.c (do_prepare): Give name_len type size_t.
* io/tst-fcntl.c (do_prepare): Likewise.
* posix/tst-exec.c (do_prepare): Likewise.
* posix/tst-preadwrite.c (do_prepare): Likewise.
* posix/tst-spawn.c (do_prepare): Likewise.
* posix/tst-truncate.c (do_prepare): Likewise.
* rt/tst-aio.c (do_prepare): Likewise.
* rt/tst-aio64.c (do_prepare): Likewise.
* stdlib/test-canon2.c (do_prepare): Give test_dir_len type
size_t.
-rw-r--r-- | ChangeLog | 23 | ||||
-rw-r--r-- | README.libm | 2 | ||||
-rw-r--r-- | io/test-lfs.c | 2 | ||||
-rw-r--r-- | io/tst-fcntl.c | 2 | ||||
-rw-r--r-- | manual/string.texi | 2 | ||||
-rw-r--r-- | nptl/ChangeLog | 5 | ||||
-rw-r--r-- | nptl/tst-cond22.c | 25 | ||||
-rw-r--r-- | posix/tst-exec.c | 2 | ||||
-rw-r--r-- | posix/tst-preadwrite.c | 2 | ||||
-rw-r--r-- | posix/tst-spawn.c | 2 | ||||
-rw-r--r-- | posix/tst-truncate.c | 2 | ||||
-rw-r--r-- | rt/tst-aio.c | 2 | ||||
-rw-r--r-- | rt/tst-aio64.c | 2 | ||||
-rw-r--r-- | stdlib/test-canon2.c | 2 |
14 files changed, 55 insertions, 20 deletions
@@ -1,3 +1,26 @@ +2006-09-12 Jakub Jelinek <jakub@redhat.com> + + [BZ #2526] + * README.libm: Fix a thinko in sqrt algorithm description. + + [BZ #3143] + * manual/string.texi (argz_delete): Fix prototype. + Patch by <alpt@freaknet.org>. + +2006-08-26 Joseph Myers <joseph@codesourcery.com> + + [BZ #3138] + * io/test-lfs.c (do_prepare): Give name_len type size_t. + * io/tst-fcntl.c (do_prepare): Likewise. + * posix/tst-exec.c (do_prepare): Likewise. + * posix/tst-preadwrite.c (do_prepare): Likewise. + * posix/tst-spawn.c (do_prepare): Likewise. + * posix/tst-truncate.c (do_prepare): Likewise. + * rt/tst-aio.c (do_prepare): Likewise. + * rt/tst-aio64.c (do_prepare): Likewise. + * stdlib/test-canon2.c (do_prepare): Give test_dir_len type + size_t. + 2006-09-09 Ulrich Drepper <drepper@redhat.com> [BZ #2821] diff --git a/README.libm b/README.libm index 33ace8c065..f058cf846c 100644 --- a/README.libm +++ b/README.libm @@ -486,7 +486,7 @@ sqrt * Bit by bit method using integer arithmetic. (Slow, but portable) * 1. Normalization * Scale x to y in [1,4) with even powers of 2: - * find an integer k such that 1 <= (y=x*2^(2k)) < 4, then + * find an integer k such that 1 <= (y=x*2^(-2k)) < 4, then * sqrt(x) = 2^k * sqrt(y) * 2. Bit by bit computation * Let q = sqrt(y) truncated to i bit after binary point (q = 1), diff --git a/io/test-lfs.c b/io/test-lfs.c index a4669c3984..c27af408eb 100644 --- a/io/test-lfs.c +++ b/io/test-lfs.c @@ -50,7 +50,7 @@ int fd; void do_prepare (int argc, char *argv[]) { - char name_len; + size_t name_len; struct rlimit64 rlim; name_len = strlen (test_dir); diff --git a/io/tst-fcntl.c b/io/tst-fcntl.c index fed884913c..93ea9b0b02 100644 --- a/io/tst-fcntl.c +++ b/io/tst-fcntl.c @@ -42,7 +42,7 @@ static char *name; void do_prepare (int argc, char *argv[]) { - char name_len; + size_t name_len; name_len = strlen (test_dir); name = malloc (name_len + sizeof ("/fcntlXXXXXX")); diff --git a/manual/string.texi b/manual/string.texi index 2717699213..f582bad96d 100644 --- a/manual/string.texi +++ b/manual/string.texi @@ -2534,7 +2534,7 @@ The @code{argz_append} function appends @var{buf_len} bytes starting at @comment argz.h @comment GNU -@deftypefun {error_t} argz_delete (char **@var{argz}, size_t *@var{argz_len}, char *@var{entry}) +@deftypefun {void} argz_delete (char **@var{argz}, size_t *@var{argz_len}, char *@var{entry}) If @var{entry} points to the beginning of one of the elements in the argz vector @code{*@var{argz}}, the @code{argz_delete} function will remove this entry and reallocate @code{*@var{argz}}, modifying diff --git a/nptl/ChangeLog b/nptl/ChangeLog index c269f3daaa..6c7fd49b85 100644 --- a/nptl/ChangeLog +++ b/nptl/ChangeLog @@ -1,3 +1,8 @@ +2006-09-12 Ulrich Drepper <drepper@redhat.com> + + * tst-cond22.c (tf): Slight changes to the pthread_cond_wait use + to guarantee the thread is always canceled. + 2006-09-08 Jakub Jelinek <jakub@redhat.com> * tst-cond22.c: Include pthread.h instead of pthreadP.h. diff --git a/nptl/tst-cond22.c b/nptl/tst-cond22.c index 1094c09068..e7c8d01b5e 100644 --- a/nptl/tst-cond22.c +++ b/nptl/tst-cond22.c @@ -30,17 +30,24 @@ tf (void *arg) exit (1); } pthread_cleanup_push (cl, NULL); - if (pthread_cond_wait (&c, &m) != 0) - { - printf ("%s: cond_wait failed\n", __func__); - exit (1); + /* We have to loop here because the cancellation might come after + the cond_wait call left the cancelable area and is then waiting + on the mutex. In this case the beginning of the second cond_wait + call will cause the cancellation to happen. */ + while (1) + { + if (pthread_cond_wait (&c, &m) != 0) + { + printf ("%s: cond_wait failed\n", __func__); + exit (1); + } + if (pthread_mutex_unlock (&m) != 0) + { + printf ("%s: mutex_unlock failed\n", __func__); + exit (1); + } } pthread_cleanup_pop (0); - if (pthread_mutex_unlock (&m) != 0) - { - printf ("%s: mutex_unlock failed\n", __func__); - exit (1); - } return NULL; } diff --git a/posix/tst-exec.c b/posix/tst-exec.c index a67d2000bc..f3971e8c97 100644 --- a/posix/tst-exec.c +++ b/posix/tst-exec.c @@ -57,7 +57,7 @@ static const char fd2string[] = "This file should stay opened"; void do_prepare (int argc, char *argv[]) { - char name_len; + size_t name_len; name_len = strlen (test_dir); name1 = malloc (name_len + sizeof ("/execXXXXXX")); diff --git a/posix/tst-preadwrite.c b/posix/tst-preadwrite.c index 2810448583..8227a8205b 100644 --- a/posix/tst-preadwrite.c +++ b/posix/tst-preadwrite.c @@ -53,7 +53,7 @@ int fd; void do_prepare (int argc, char *argv[]) { - char name_len; + size_t name_len; #define FNAME FNAME2(TRUNCATE) #define FNAME2(s) "/" STRINGIFY(s) "XXXXXX" diff --git a/posix/tst-spawn.c b/posix/tst-spawn.c index 745f64d3ba..4b5d894235 100644 --- a/posix/tst-spawn.c +++ b/posix/tst-spawn.c @@ -61,7 +61,7 @@ static const char fd3string[] = "This file will be opened"; void do_prepare (int argc, char *argv[]) { - char name_len; + size_t name_len; name_len = strlen (test_dir); name1 = (char *) malloc (name_len + sizeof ("/spawnXXXXXX")); diff --git a/posix/tst-truncate.c b/posix/tst-truncate.c index d786306409..78a5139477 100644 --- a/posix/tst-truncate.c +++ b/posix/tst-truncate.c @@ -54,7 +54,7 @@ int fd; void do_prepare (int argc, char *argv[]) { - char name_len; + size_t name_len; #define FNAME FNAME2(TRUNCATE) #define FNAME2(s) "/" STRINGIFY(s) "XXXXXX" diff --git a/rt/tst-aio.c b/rt/tst-aio.c index 24efad3e23..ba50bdb082 100644 --- a/rt/tst-aio.c +++ b/rt/tst-aio.c @@ -48,7 +48,7 @@ int fd; void do_prepare (int argc, char *argv[]) { - char name_len; + size_t name_len; name_len = strlen (test_dir); name = malloc (name_len + sizeof ("/aioXXXXXX")); diff --git a/rt/tst-aio64.c b/rt/tst-aio64.c index 93e8cb2136..b6d964fd57 100644 --- a/rt/tst-aio64.c +++ b/rt/tst-aio64.c @@ -49,7 +49,7 @@ int fd; void do_prepare (int argc, char *argv[]) { - char name_len; + size_t name_len; name_len = strlen (test_dir); name = malloc (name_len + sizeof ("/aioXXXXXX")); diff --git a/stdlib/test-canon2.c b/stdlib/test-canon2.c index ba491995b7..f182e95adc 100644 --- a/stdlib/test-canon2.c +++ b/stdlib/test-canon2.c @@ -39,7 +39,7 @@ char *name2; void do_prepare (int argc, char *argv[]) { - char test_dir_len; + size_t test_dir_len; test_dir_len = strlen (test_dir); |