[Glibc-bsd-commits] r5854 - trunk/glibc-ports-2.22/fbtl

aurel32 at alioth.debian.org aurel32 at alioth.debian.org
Thu Dec 3 16:27:07 UTC 2015


Author: aurel32
Date: 2015-12-03 16:27:06 +0000 (Thu, 03 Dec 2015)
New Revision: 5854

Modified:
   trunk/glibc-ports-2.22/fbtl/sem_close.c
   trunk/glibc-ports-2.22/fbtl/sem_open.c
Log:
Merge from upstream:

commit d051b143f73189311faf9cd311cc53c6f6a145db
Author: Joseph Myers <joseph at codesourcery.com>
Date:   Wed Jun 17 20:11:58 2015 +0000

    Fix sem_* tdelete, tfind, tsearch, twalk namespace (bug 18536).
    
    The sem_* functions bring in references to tdelete, tfind, tsearch and
    twalk.  But the t* functions are XSI-shaded, while sem_* aren't.  This
    patch fixes this by using __t* instead, exporting those functions from
    libc at version GLIBC_PRIVATE (since sem_* are in libpthread) and
    using libc_hidden_* for the benefit of calls within libc.



Modified: trunk/glibc-ports-2.22/fbtl/sem_close.c
===================================================================
--- trunk/glibc-ports-2.22/fbtl/sem_close.c	2015-12-03 14:19:27 UTC (rev 5853)
+++ trunk/glibc-ports-2.22/fbtl/sem_close.c	2015-12-03 16:27:06 UTC (rev 5854)
@@ -51,7 +51,7 @@
   /* Locate the entry for the mapping the caller provided.  */
   rec = NULL;
   the_sem = sem;
-  twalk (__sem_mappings, walker);
+  __twalk (__sem_mappings, walker);
   if  (rec != NULL)
     {
       /* Check the reference counter.  If it is going to be zero, free
@@ -59,7 +59,7 @@
       if (--rec->refcnt == 0)
 	{
 	  /* Remove the record from the tree.  */
-	  (void) tdelete (rec, &__sem_mappings, __sem_search);
+	  (void) __tdelete (rec, &__sem_mappings, __sem_search);
 
 	  result = munmap (rec->sem, sizeof (sem_t));
 

Modified: trunk/glibc-ports-2.22/fbtl/sem_open.c
===================================================================
--- trunk/glibc-ports-2.22/fbtl/sem_open.c	2015-12-03 14:19:27 UTC (rev 5853)
+++ trunk/glibc-ports-2.22/fbtl/sem_open.c	2015-12-03 16:27:06 UTC (rev 5854)
@@ -79,7 +79,8 @@
       fake->dev = st.st_dev;
       fake->ino = st.st_ino;
 
-      struct inuse_sem **foundp = tfind (fake, &__sem_mappings, __sem_search);
+      struct inuse_sem **foundp = __tfind (fake, &__sem_mappings,
+					   __sem_search);
       if (foundp != NULL)
 	{
 	  /* There is already a mapping.  Use it.  */
@@ -108,7 +109,7 @@
 
 	      /* Insert the new value.  */
 	      if (existing != MAP_FAILED
-		  && tsearch (newp, &__sem_mappings, __sem_search) != NULL)
+		  && __tsearch (newp, &__sem_mappings, __sem_search) != NULL)
 		/* Successful.  */
 		result = existing;
 	      else




More information about the Glibc-bsd-commits mailing list