about summary refs log tree commit diff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2006-05-11 17:11:16 +0000
committerUlrich Drepper <drepper@redhat.com>2006-05-11 17:11:16 +0000
commit3d237e425c326606721bed45c741729c35133c5f (patch)
treea34ae8e1723a04de989c83e987d79a96b60e2de8
parent790fc6e41d5f4e888b938be1d653fb23fdf3540c (diff)
downloadglibc-3d237e425c326606721bed45c741729c35133c5f.tar.gz
glibc-3d237e425c326606721bed45c741729c35133c5f.tar.xz
glibc-3d237e425c326606721bed45c741729c35133c5f.zip
* locale/programs/ld-time.c (time_finish): If wide era name or
	format aren't provided, set both wname and wformat to L"".
-rw-r--r--ChangeLog5
-rw-r--r--locale/programs/ld-time.c15
-rw-r--r--nptl/ChangeLog5
-rw-r--r--nptl/sem_open.c4
-rw-r--r--nptl/semaphoreP.h4
5 files changed, 25 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index 92259aa5b4..6854e56c83 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2006-05-11  Jakub Jelinek  <jakub@redhat.com>
+
+	* locale/programs/ld-time.c (time_finish): If wide era name or
+	format aren't provided, set both wname and wformat to L"".
+
 2006-05-10  Ulrich Drepper  <drepper@redhat.com>
 
 	* sysdeps/unix/sysv/linux/tcgetattr.c (__tcgetattr): Only store
diff --git a/locale/programs/ld-time.c b/locale/programs/ld-time.c
index 78aff7fee6..4f1dcb0ce7 100644
--- a/locale/programs/ld-time.c
+++ b/locale/programs/ld-time.c
@@ -467,15 +467,22 @@ No definition for %s category found"), "LC_TIME"));
 	  wstr = wstr ? wcschr (wstr + 1, L':') : NULL;	/* end offset */
 	  wstr = wstr ? wcschr (wstr + 1, L':') : NULL;	/* end start */
 	  wstr = wstr ? wcschr (wstr + 1, L':') : NULL;	/* end end */
-	  time->era_entries[idx].wname = (uint32_t *) wstr + 1;
 	  if (wstr != NULL)
 	    {
+	      time->era_entries[idx].wname = (uint32_t *) wstr + 1;
 	      wstr = wcschr (wstr + 1, L':');	/* end name */
-	      *wstr = L'\0';
-	      time->era_entries[idx].wformat = (uint32_t *) wstr + 1;
+	      if (wstr != NULL)
+		{
+		  *wstr = L'\0';
+		  time->era_entries[idx].wformat = (uint32_t *) wstr + 1;
+		}
+	      else
+		time->era_entries[idx].wname =
+		  time->era_entries[idx].wformat = (uint32_t *) L"";
 	    }
 	  else
-	    time->era_entries[idx].wformat = NULL;
+	    time->era_entries[idx].wname =
+	      time->era_entries[idx].wformat = (uint32_t *) L"";
 	}
     }
 
diff --git a/nptl/ChangeLog b/nptl/ChangeLog
index 024bc6ecfe..c5374404e5 100644
--- a/nptl/ChangeLog
+++ b/nptl/ChangeLog
@@ -1,3 +1,8 @@
+2006-05-11  Ulrich Drepper  <drepper@redhat.com>
+
+	* sem_open.c (__sem_mappings_lock): Mark as hidden.
+	* semaphoreP.h (__sem_mappings_lock): Likewise.
+
 2006-05-10  Ulrich Drepper  <drepper@redhat.com>
 
 	* pthread_atfork.c: Mark __dso_handle as hidden.
diff --git a/nptl/sem_open.c b/nptl/sem_open.c
index a4b2f5b3ac..66bcb13aec 100644
--- a/nptl/sem_open.c
+++ b/nptl/sem_open.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003, 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
 
@@ -147,7 +147,7 @@ __sem_search (const void *a, const void *b)
 void *__sem_mappings attribute_hidden;
 
 /* Lock to protect the search tree.  */
-lll_lock_t __sem_mappings_lock = LLL_LOCK_INITIALIZER;
+lll_lock_t __sem_mappings_lock attribute_hidden = LLL_LOCK_INITIALIZER;
 
 
 /* Search for existing mapping and if possible add the one provided.  */
diff --git a/nptl/semaphoreP.h b/nptl/semaphoreP.h
index d14ea92c74..754609a1a8 100644
--- a/nptl/semaphoreP.h
+++ b/nptl/semaphoreP.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003, 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
 
@@ -48,7 +48,7 @@ extern pthread_once_t __namedsem_once attribute_hidden;
 extern void *__sem_mappings attribute_hidden;
 
 /* Lock to protect the search tree.  */
-extern lll_lock_t __sem_mappings_lock;
+extern lll_lock_t __sem_mappings_lock attribute_hidden;
 
 
 /* Initializer for mountpoint.  */