Update.
authorUlrich Drepper <drepper@redhat.com>
Tue, 4 May 2004 19:25:38 +0000 (19:25 +0000)
committerUlrich Drepper <drepper@redhat.com>
Tue, 4 May 2004 19:25:38 +0000 (19:25 +0000)
* sysdeps/unix/sysv/linux/ia64/Makefile (librt-routines): Mention
  rt-sysdep.
* sysdeps/unix/sysv/linux/ia64/rt-sysdep.S: New file.

ChangeLog
libidn/ChangeLog
libidn/idna.c
libidn/stringprep.c
libidn/stringprep.h
linuxthreads/ChangeLog
linuxthreads/tst-stack1.c
nptl/ChangeLog
nptl/tst-stack3.c
sysdeps/unix/sysv/linux/ia64/Makefile
sysdeps/unix/sysv/linux/ia64/rt-sysdep.S [new file with mode: 0644]

index c246a2c..68e09e8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2004-04-22  David Mosberger  <davidm@hpl.hp.com>
 
+       * sysdeps/unix/sysv/linux/ia64/Makefile (librt-routines): Mention
+         rt-sysdep.
+       * sysdeps/unix/sysv/linux/ia64/rt-sysdep.S: New file.
+
        * sysdeps/ia64/strcat.c: New file.
        * sysdeps/ia64/strcat.S: Delete.
 
index 17e00a6..045a1e6 100644 (file)
@@ -1,3 +1,9 @@
+2004-04-22  Simon Josefsson  <jas@extundo.com>
+
+       * stringprep.h: Update to latest libidn version.
+       * stringprep.c: Likewise.
+       * idna.c: Likewise.
+
 2004-03-14  Ulrich Drepper  <drepper@redhat.com>
 
        * idn-stub.c (__idna_to_unicode_lzlz): Use __strchrnul, not strchrnul.
index 69c928f..bf692c0 100644 (file)
@@ -778,6 +778,8 @@ idna_to_unicode_lzlz (const char *input, char **output, int flags)
  * @IDNA_ICONV_ERROR: Could not convert string in locale encoding.
  * @IDNA_MALLOC_ERROR: Could not allocate buffer (this is typically a
  *   fatal error).
+ * @IDNA_DLOPEN_ERROR: Could not dlopen the libcidn DSO (only used
+ *   internally in libc).
  *
  * Enumerated return codes of idna_to_ascii_4i(),
  * idna_to_unicode_44i() functions (and functions derived from those
index 357f9e9..1841b36 100644 (file)
@@ -42,7 +42,7 @@ stringprep_find_character_in_table (uint32_t ucs4,
      mostly interested in having someone give real-world benchmark on
      the impact of libidn.) */
 
-  for (i = 0; table[i].start; i++)
+  for (i = 0; table[i].start || table[i].end; i++)
     if (ucs4 >= table[i].start &&
        ucs4 <= (table[i].end ? table[i].end : table[i].start))
       return i;
index 5f504e8..dcc30b3 100644 (file)
@@ -1,5 +1,5 @@
 /* stringprep.h                Header file for stringprep functions.         -*- c -*-
- * Copyright (C) 2002, 2003  Simon Josefsson
+ * Copyright (C) 2002, 2003, 2004  Simon Josefsson
  *
  * This file is part of GNU Libidn.
  *
@@ -29,13 +29,9 @@ extern "C"
 
 #include <stddef.h>            /* size_t */
 #include <unistd.h>            /* ssize_t */
-#ifdef _LIBC
-# include <stdint.h>
-#else
-# include <idn-int.h>          /* uint32_t */
-#endif
+#include <stdint.h>            /* uint32_t */
 
-#define STRINGPREP_VERSION "0.4.1"
+#define STRINGPREP_VERSION "0.4.3"
 
 /* Error codes. */
   typedef enum
index 5840521..44cfa9e 100644 (file)
@@ -1,3 +1,9 @@
+2004-05-04  Jakub Jelinek  <jakub@redhat.com>
+
+       * tst-stack1.c: Don't include mcheck.h.
+       (do_test): Make sure user defined stacks aren't reused,
+       don't free them at the end.  [BZ #110]
+
 2004-05-02  Jakub Jelinek  <jakub@redhat.com>
 
        * manager.c: Include not-cancel.h.
index fa9aedd..057bfa3 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003 Free Software Foundation, Inc.
+/* Copyright (C) 2003, 2004 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Jakub Jelinek <jakub@redhat.com>, 2003.
 
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
    02111-1307 USA.  */
 
-/* Test whether pthread_create/pthread_join with user defined stacks
-   doesn't leak memory.  */
+/* Test pthread_create/pthread_join with user defined stacks.  */
 
 #include <limits.h>
-#include <mcheck.h>
 #include <pthread.h>
 #include <stdlib.h>
 #include <stdio.h>
@@ -37,13 +35,13 @@ tf (void *p)
   return NULL;
 }
 
+#define N 16
+
 static int
 do_test (void)
 {
-  mtrace ();
-
   void *stack;
-  int res = posix_memalign (&stack, getpagesize (), 4 * PTHREAD_STACK_MIN);
+  int res = posix_memalign (&stack, getpagesize (), N * 4 * PTHREAD_STACK_MIN);
   if (res)
     {
       printf ("malloc failed %s\n", strerror (res));
@@ -54,15 +52,17 @@ do_test (void)
   pthread_attr_init (&attr);
 
   int result = 0;
-  res = pthread_attr_setstack (&attr, stack, 4 * PTHREAD_STACK_MIN);
-  if (res)
+  for (int i = 0; i < N; ++i)
     {
-      printf ("pthread_attr_setstack failed %d\n", res);
-      result = 1;
-    }
+      res = pthread_attr_setstack (&attr, stack + i * 4 * PTHREAD_STACK_MIN,
+                                  4 * PTHREAD_STACK_MIN);
+      if (res)
+       {
+         printf ("pthread_attr_setstack failed %d\n", res);
+         result = 1;
+         continue;
+       }
 
-  for (int i = 0; i < 16; ++i)
-    {
       /* Create the thread.  */
       pthread_t th;
       res = pthread_create (&th, &attr, tf, NULL);
@@ -84,13 +84,12 @@ do_test (void)
 
   pthread_attr_destroy (&attr);
 
-  if (seen != 16)
+  if (seen != N)
     {
-      printf ("seen %d != 16\n", seen);
+      printf ("seen %d != %d\n", seen, N);
       result = 1;
     }
 
-  free (stack);
   return result;
 }
 
index 11b282a..7e3de56 100644 (file)
@@ -1,5 +1,9 @@
 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
 
+       * tst-stack3.c: Note testing functionality beyond POSIX.
+
+2004-05-04  Jakub Jelinek  <jakub@redhat.com>
+
        * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
        Change conditional from ifdef to if.
 
index fa9aedd..d99e1ea 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003 Free Software Foundation, Inc.
+/* Copyright (C) 2003, 2004 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Jakub Jelinek <jakub@redhat.com>, 2003.
 
    02111-1307 USA.  */
 
 /* Test whether pthread_create/pthread_join with user defined stacks
-   doesn't leak memory.  */
+   doesn't leak memory.
+   NOTE: this tests functionality beyond POSIX.  In POSIX user defined
+   stacks cannot be ever freed once used by pthread_create nor they can
+   be reused for other thread.  */
 
 #include <limits.h>
 #include <mcheck.h>
index 6ede14a..d9a35a7 100644 (file)
@@ -18,6 +18,10 @@ sysdep_routines += $(sysdep-dl-routines)
 sysdep-rtld-routines += $(sysdep-dl-routines)
 endif
 
+ifeq ($(subdir),rt)
+librt-routines += rt-sysdep
+endif
+
 # This is a crude attempt to silence the compiler which complains about
 # then 'current' definition in the kernel headers.
 CPPFLAGS += -D_ASM_IA64_CURRENT_H
diff --git a/sysdeps/unix/sysv/linux/ia64/rt-sysdep.S b/sysdeps/unix/sysv/linux/ia64/rt-sysdep.S
new file mode 100644 (file)
index 0000000..f966bf1
--- /dev/null
@@ -0,0 +1 @@
+#include <sysdep.S>