[BZ #2526, BZ #3138, BZ #3143]
authorUlrich Drepper <drepper@redhat.com>
Tue, 12 Sep 2006 11:44:01 +0000 (11:44 +0000)
committerUlrich Drepper <drepper@redhat.com>
Tue, 12 Sep 2006 11:44:01 +0000 (11:44 +0000)
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.

14 files changed:
ChangeLog
README.libm
io/test-lfs.c
io/tst-fcntl.c
manual/string.texi
nptl/ChangeLog
nptl/tst-cond22.c
posix/tst-exec.c
posix/tst-preadwrite.c
posix/tst-spawn.c
posix/tst-truncate.c
rt/tst-aio.c
rt/tst-aio64.c
stdlib/test-canon2.c

index 004efe9aba2ac11f34efaa64cfea969e63653e70..d7317bd0fbff40df0e618b6be5b98a60db683253 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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]
index 33ace8c065f84a87bb80bd233bb42fdcdd2cb380..f058cf846cf32147654ecb636a5cbb59ef0092dd 100644 (file)
@@ -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),
index a4669c3984d95e3035282cfdede3bbd2260556af..c27af408eb0151cc8c1e33ce2474178c0e933236 100644 (file)
@@ -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);
index fed884913c4cb238e144d3411984b4eef11ba397..93ea9b0b0236eadf5804f08985289b092b52bc1d 100644 (file)
@@ -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"));
index 2717699213944c5dd36adf7a2a0cde706b82fbcf..f582bad96d54ea7051584e8ee6ea6beacbb7db90 100644 (file)
@@ -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
index c269f3daaae407aea31b915a797964afca0a791e..6c7fd49b859013db8981ff2e82cfea211c62229e 100644 (file)
@@ -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.
index 1094c090688c47d78e4457fb7e00eb1f33981be4..e7c8d01b5e0f7ad1572152b2c7d97379b6388e4f 100644 (file)
@@ -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;
 }
 
index a67d2000bccaffb3342c7f0f2b9b420dd4125096..f3971e8c97589a835e93411b9f53f34ec563ae64 100644 (file)
@@ -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"));
index 2810448583cf1dc6a8c50da26f2687f54c11a73b..8227a8205b7687daefae50f7af59fd8f6cad8529 100644 (file)
@@ -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"
index 745f64d3ba17ed4052fe208f999c2e16568c25ba..4b5d89423535ee737fd10b7cd3d81e5d962cafe1 100644 (file)
@@ -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"));
index d7863064092074aa5423a298f7d1ec9f06d73dc2..78a5139477bf6bc6560b3e244926ea487c7d56ed 100644 (file)
@@ -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"
index 24efad3e233c236ac25a6498aa9f3af8bfac2dea..ba50bdb0821c54e1254cc1a147a6f9f93ba7ac39 100644 (file)
@@ -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"));
index 93e8cb2136d7ff3ea4806e40e17ea847a83ef0ba..b6d964fd572abf6fc9b802eb5cf2fddc18f763b2 100644 (file)
@@ -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"));
index ba491995b74e473820abcb4e5145efd7674cbd39..f182e95adc66fd02be10c9dc1a4007f792844fa8 100644 (file)
@@ -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);