2015-06-17 Joseph Myers <joseph@codesourcery.com>
+ [BZ #18536]
+ * misc/tsearch.c (__tsearch): Use libc_hidden_def.
+ (__tfind): Likewise.
+ (__tdelete): Likewise.
+ (__twalk): Likewise.
+ * misc/Versions (libc): Add __tdelete, __tfind, __tsearch and
+ __twalk to GLIBC_PRIVATE.
+ * include/search.h (__tsearch): Use libc_hidden_proto.
+ (__tfind): Likewise.
+ (__tdelete): Likewise.
+ (__twalk): Likewise.
+ * nptl/sem_close.c (sem_close): Call __twalk instead of twalk.
+ Call __tdelete instead of tdelete.
+ * nptl/sem_open.c (check_add_mapping): Call __tfind instead of
+ tfind. Call __tsearch instead of tsearch.
+ * sysdeps/sparc/sparc32/sem_open.c (check_add_mapping): Likewise.
+ * conform/Makefile (test-xfail-POSIX/semaphore.h/linknamespace):
+ Remove variable.
+ (test-xfail-POSIX2008/semaphore.h/linknamespace): Likewise.
+
[BZ #18534]
* stdio-common/dprintf.c (__dprintf): Use libc_hidden_def.
(dprintf): Define as a weak alias of __dprintf, not a strong
18324, 18333, 18346, 18397, 18409, 18410, 18412, 18418, 18422, 18434,
18444, 18468, 18469, 18470, 18479, 18483, 18495, 18496, 18497, 18498,
18507, 18512, 18519, 18520, 18522, 18527, 18528, 18529, 18530, 18532,
- 18533, 18534.
+ 18533, 18534, 18536.
* Cache information can be queried via sysconf() function on s390 e.g. with
_SC_LEVEL1_ICACHE_SIZE as argument.
test-xfail-XPG4/fmtmsg.h/linknamespace = yes
test-xfail-XPG4/unistd.h/linknamespace = yes
test-xfail-POSIX/mqueue.h/linknamespace = yes
-test-xfail-POSIX/semaphore.h/linknamespace = yes
test-xfail-UNIX98/fmtmsg.h/linknamespace = yes
test-xfail-UNIX98/mqueue.h/linknamespace = yes
test-xfail-UNIX98/unistd.h/linknamespace = yes
test-xfail-UNIX98/wchar.h/linknamespace = yes
test-xfail-XOPEN2K/fmtmsg.h/linknamespace = yes
-test-xfail-POSIX2008/semaphore.h/linknamespace = yes
test-xfail-XOPEN2K8/fmtmsg.h/linknamespace = yes
extern void __hdestroy (void);
extern void *__tsearch (const void *__key, void **__rootp,
__compar_fn_t compar);
+libc_hidden_proto (__tsearch)
extern void *__tfind (const void *__key, void *const *__rootp,
__compar_fn_t compar);
+libc_hidden_proto (__tfind)
extern void *__tdelete (const void *__key, void **__rootp,
__compar_fn_t compar);
+libc_hidden_proto (__tdelete)
extern void __twalk (const void *__root, __action_fn_t action);
+libc_hidden_proto (__twalk)
extern void __tdestroy (void *__root, __free_fn_t freefct);
#endif
#endif
__madvise;
__mktemp;
__libc_ifunc_impl_list;
+ __tdelete; __tfind; __tsearch; __twalk;
}
}
return q;
}
+libc_hidden_def (__tsearch)
weak_alias (__tsearch, tsearch)
}
return NULL;
}
+libc_hidden_def (__tfind)
weak_alias (__tfind, tfind)
free (unchained);
return retval;
}
+libc_hidden_def (__tdelete)
weak_alias (__tdelete, tdelete)
if (root != NULL && action != NULL)
trecurse (root, action, 0);
}
+libc_hidden_def (__twalk)
weak_alias (__twalk, twalk)
/* 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
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));
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. */
/* 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
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. */
/* 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