[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#489906: glibc: tst-regex fails on hppa




There are already some related commits in upstream CVS.
Other posibility might be to just use attached patch instead
of cvs-strerror_r.diff

Petr

http://sourceware.org/ml/glibc-cvs/2008-q2/msg00089.html

2008-04-11  Jakub Jelinek  <jakub@redhat.com>

        [BZ #5443]
        * time/era.c: Transform __libc_setlocale_lock into rwlock.
        * time/alt_digit.c: Likewise.
        * wcsmbs/wcsmbsload.c: Likewise.


http://sourceware.org/ml/glibc-cvs/2008-q3/msg00043.html
http://sourceware.org/ml/glibc-cvs/2008-q3/msg00045.html

2008-07-20  Ulrich Drepper  <drepper@redhat.com>

        * locale/setlocale.c (setname): Remove inline to avoid compiler
        warning.

        [BZ #6712]
        * locale/setlocale.c (setlocale): Take the setlocale lock earlier.
--- intl/dcigettext.c.ORIG	2008-07-28 13:24:48.000000000 +0000
+++ intl/dcigettext.c	2008-07-28 13:26:18.000000000 +0000
@@ -445,6 +445,10 @@
 #endif
 
   __libc_rwlock_rdlock (_nl_state_lock);
+#ifdef _LIBC
+  __libc_lock_define (extern, __libc_setlocale_lock attribute_hidden)
+  __libc_lock_lock (__libc_setlocale_lock);
+#endif
 
   /* If DOMAINNAME is NULL, we are interested in the default domain.  If
      CATEGORY is not LC_MESSAGES this might not make much sense but the
@@ -464,7 +468,7 @@
   search->category = category;
 # ifdef HAVE_PER_THREAD_LOCALE
 #  ifdef _LIBC
-  localename = __current_locale_name (category);
+  localename = strdupa (__current_locale_name (category));
 #  endif
   search->localename = localename;
 # endif
@@ -488,6 +492,9 @@
       else
 	retval = (char *) (*foundp)->translation;
 
+# ifdef _LIBC
+      __libc_lock_unlock (__libc_setlocale_lock);
+# endif
       __libc_rwlock_unlock (_nl_state_lock);
       return retval;
     }
@@ -547,6 +554,7 @@
 	  /* We cannot get the current working directory.  Don't signal an
 	     error but simply return the default string.  */
 	  FREE_BLOCKS (block_list);
+	  __libc_lock_unlock (__libc_setlocale_lock);
 	  __libc_rwlock_unlock (_nl_state_lock);
 	  __set_errno (saved_errno);
 	  return (plural == 0
@@ -613,6 +621,7 @@
 	{
 	no_translation:
 	  FREE_BLOCKS (block_list);
+	  __libc_lock_unlock (__libc_setlocale_lock);
 	  __libc_rwlock_unlock (_nl_state_lock);
 	  __set_errno (saved_errno);
 	  return (plural == 0
@@ -723,6 +732,7 @@
 	      if (plural)
 		retval = plural_lookup (domain, n, retval, retlen);
 
+	      __libc_lock_unlock (__libc_setlocale_lock);
 	      __libc_rwlock_unlock (_nl_state_lock);
 	      return retval;
 	    }

Reply to: