@@ -348,11 +348,9 @@ test-xfail-XPG3/unistd.h/linknamespace = yes
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
@@ -14,11 +14,15 @@ libc_hidden_proto (lfind)
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
@@ -153,5 +153,6 @@ libc {
__madvise;
__mktemp;
__libc_ifunc_impl_list;
+ __tdelete; __tfind; __tsearch; __twalk;
}
}
@@ -293,6 +293,7 @@ __tsearch (const void *key, void **vrootp, __compar_fn_t compar)
return q;
}
+libc_hidden_def (__tsearch)
weak_alias (__tsearch, tsearch)
@@ -325,6 +326,7 @@ __tfind (key, vrootp, compar)
}
return NULL;
}
+libc_hidden_def (__tfind)
weak_alias (__tfind, tfind)
@@ -585,6 +587,7 @@ __tdelete (const void *key, void **vrootp, __compar_fn_t compar)
free (unchained);
return retval;
}
+libc_hidden_def (__tdelete)
weak_alias (__tdelete, tdelete)
@@ -625,6 +628,7 @@ __twalk (const void *vroot, __action_fn_t action)
if (root != NULL && action != NULL)
trecurse (root, action, 0);
}
+libc_hidden_def (__twalk)
weak_alias (__twalk, twalk)
@@ -51,7 +51,7 @@ sem_close (sem)
/* 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 @@ sem_close (sem)
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));
@@ -79,7 +79,8 @@ check_add_mapping (const char *name, size_t namelen, int fd, sem_t *existing)
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 @@ check_add_mapping (const char *name, size_t namelen, int fd, sem_t *existing)
/* 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
@@ -79,7 +79,8 @@ check_add_mapping (const char *name, size_t namelen, int fd, sem_t *existing)
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 @@ check_add_mapping (const char *name, size_t namelen, int fd, sem_t *existing)
/* 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