htl C11 threads: Avoid pthread_ symbols visibility in static library

This commit is contained in:
Samuel Thibault 2020-02-10 23:45:23 +00:00
parent 8ba6ad703c
commit fba7fc5a21
42 changed files with 41 additions and 45 deletions

View File

@ -89,7 +89,7 @@ __pthread_create (pthread_t * thread, const pthread_attr_t * attr,
return err;
}
strong_alias (__pthread_create, pthread_create)
weak_alias (__pthread_create, pthread_create)
/* Internal version of pthread_create. See comment in
pt-internal.h. */

View File

@ -77,4 +77,4 @@ __pthread_detach (pthread_t thread)
return err;
}
strong_alias (__pthread_detach, pthread_detach)
weak_alias (__pthread_detach, pthread_detach)

View File

@ -109,4 +109,4 @@ __pthread_exit (void *status)
abort ();
}
strong_alias (__pthread_exit, pthread_exit);
weak_alias (__pthread_exit, pthread_exit);

View File

@ -76,4 +76,4 @@ __pthread_join (pthread_t thread, void **status)
return err;
}
strong_alias (__pthread_join, pthread_join);
weak_alias (__pthread_join, pthread_join);

View File

@ -30,4 +30,4 @@ __pthread_self (void)
return self->thread;
}
strong_alias (__pthread_self, pthread_self);
weak_alias (__pthread_self, pthread_self);

View File

@ -43,4 +43,4 @@ __pthread_setcancelstate (int state, int *oldstate)
return 0;
}
strong_alias (__pthread_setcancelstate, pthread_setcancelstate);
weak_alias (__pthread_setcancelstate, pthread_setcancelstate);

View File

@ -43,4 +43,4 @@ __pthread_setcanceltype (int type, int *oldtype)
return 0;
}
strong_alias (__pthread_setcanceltype, pthread_setcanceltype);
weak_alias (__pthread_setcanceltype, pthread_setcanceltype);

View File

@ -24,4 +24,4 @@ __pthread_attr_destroy (pthread_attr_t *attr)
{
return 0;
}
strong_alias (__pthread_attr_destroy, pthread_attr_destroy);
weak_alias (__pthread_attr_destroy, pthread_attr_destroy);

View File

@ -26,4 +26,4 @@ __pthread_attr_getdetachstate (const pthread_attr_t *attr, int *detachstate)
return 0;
}
strong_alias (__pthread_attr_getdetachstate, pthread_attr_getdetachstate);
weak_alias (__pthread_attr_getdetachstate, pthread_attr_getdetachstate);

View File

@ -26,4 +26,4 @@ __pthread_attr_getinheritsched (const pthread_attr_t *attr, int *inheritsched)
return 0;
}
strong_alias (__pthread_attr_getinheritsched, pthread_attr_getinheritsched);
weak_alias (__pthread_attr_getinheritsched, pthread_attr_getinheritsched);

View File

@ -30,4 +30,4 @@ __pthread_attr_getschedparam (const pthread_attr_t *attr,
return 0;
}
strong_alias (__pthread_attr_getschedparam, pthread_attr_getschedparam);
weak_alias (__pthread_attr_getschedparam, pthread_attr_getschedparam);

View File

@ -26,4 +26,4 @@ __pthread_attr_getschedpolicy (const pthread_attr_t *attr, int *policy)
return 0;
}
strong_alias (__pthread_attr_getschedpolicy, pthread_attr_getschedpolicy);
weak_alias (__pthread_attr_getschedpolicy, pthread_attr_getschedpolicy);

View File

@ -26,4 +26,4 @@ __pthread_attr_getscope (const pthread_attr_t *attr, int *contentionscope)
return 0;
}
strong_alias (__pthread_attr_getscope, pthread_attr_getscope);
weak_alias (__pthread_attr_getscope, pthread_attr_getscope);

View File

@ -27,4 +27,4 @@ __pthread_attr_init (pthread_attr_t *attr)
*attr = __pthread_default_attr;
return 0;
}
strong_alias (__pthread_attr_init, pthread_attr_init);
weak_alias (__pthread_attr_init, pthread_attr_init);

View File

@ -35,4 +35,4 @@ __pthread_attr_setdetachstate (pthread_attr_t *attr, int detachstate)
return 0;
}
strong_alias (__pthread_attr_setdetachstate, pthread_attr_setdetachstate);
weak_alias (__pthread_attr_setdetachstate, pthread_attr_setdetachstate);

View File

@ -35,4 +35,4 @@ __pthread_attr_setinheritsched (pthread_attr_t *attr, int inheritsched)
return 0;
}
strong_alias (__pthread_attr_setinheritsched, pthread_attr_setinheritsched);
weak_alias (__pthread_attr_setinheritsched, pthread_attr_setinheritsched);

View File

@ -35,4 +35,4 @@ __pthread_attr_setschedparam (pthread_attr_t *attr,
return ENOTSUP;
}
strong_alias (__pthread_attr_setschedparam, pthread_attr_setschedparam);
weak_alias (__pthread_attr_setschedparam, pthread_attr_setschedparam);

View File

@ -39,4 +39,4 @@ __pthread_attr_setschedpolicy (pthread_attr_t *attr, int policy)
return 0;
}
strong_alias (__pthread_attr_setschedpolicy, pthread_attr_setschedpolicy);
weak_alias (__pthread_attr_setschedpolicy, pthread_attr_setschedpolicy);

View File

@ -38,4 +38,4 @@ __pthread_attr_setscope (pthread_attr_t *attr, int contentionscope)
}
}
strong_alias (__pthread_attr_setscope, pthread_attr_setscope);
weak_alias (__pthread_attr_setscope, pthread_attr_setscope);

View File

@ -41,4 +41,4 @@ __pthread_cond_broadcast (pthread_cond_t *cond)
return 0;
}
strong_alias (__pthread_cond_broadcast, pthread_cond_broadcast);
weak_alias (__pthread_cond_broadcast, pthread_cond_broadcast);

View File

@ -32,4 +32,4 @@ __pthread_cond_destroy (pthread_cond_t *cond)
return ret;
}
strong_alias (__pthread_cond_destroy, pthread_cond_destroy);
weak_alias (__pthread_cond_destroy, pthread_cond_destroy);

View File

@ -44,4 +44,4 @@ __pthread_cond_init (pthread_cond_t *cond, const pthread_condattr_t * attr)
return 0;
}
strong_alias (__pthread_cond_init, pthread_cond_init);
weak_alias (__pthread_cond_init, pthread_cond_init);

View File

@ -39,4 +39,4 @@ __pthread_cond_signal (pthread_cond_t *cond)
return 0;
}
strong_alias (__pthread_cond_signal, pthread_cond_signal);
weak_alias (__pthread_cond_signal, pthread_cond_signal);

View File

@ -34,7 +34,7 @@ __pthread_cond_timedwait (pthread_cond_t *cond,
return __pthread_cond_timedwait_internal (cond, mutex, abstime);
}
strong_alias (__pthread_cond_timedwait, pthread_cond_timedwait);
weak_alias (__pthread_cond_timedwait, pthread_cond_timedwait);
struct cancel_ctx
{

View File

@ -35,4 +35,4 @@ __pthread_cond_wait (pthread_cond_t *cond, pthread_mutex_t *mutex)
return __pthread_cond_timedwait_internal (cond, mutex, 0);
}
strong_alias (__pthread_cond_wait, pthread_cond_wait);
weak_alias (__pthread_cond_wait, pthread_cond_wait);

View File

@ -25,4 +25,4 @@ __pthread_condattr_destroy (pthread_condattr_t *cond)
return 0;
}
strong_alias (__pthread_condattr_destroy, pthread_condattr_destroy);
weak_alias (__pthread_condattr_destroy, pthread_condattr_destroy);

View File

@ -28,4 +28,4 @@ __pthread_condattr_init (pthread_condattr_t *attr)
return 0;
}
strong_alias (__pthread_condattr_init, pthread_condattr_init);
weak_alias (__pthread_condattr_init, pthread_condattr_init);

View File

@ -27,4 +27,4 @@ __pthread_equal (pthread_t __t1, pthread_t __t2)
return __t1 == __t2;
}
strong_alias (__pthread_equal, pthread_equal);
weak_alias (__pthread_equal, pthread_equal);

View File

@ -28,4 +28,4 @@ __pthread_getschedparam (pthread_t thread, int *policy,
return 0;
}
strong_alias (__pthread_getschedparam, pthread_getschedparam);
weak_alias (__pthread_getschedparam, pthread_getschedparam);

View File

@ -35,5 +35,5 @@ __pthread_getspecific (pthread_key_t key)
return self->thread_specifics[key];
}
strong_alias (__pthread_getspecific, pthread_getspecific);
weak_alias (__pthread_getspecific, pthread_getspecific);
hidden_def (__pthread_getspecific)

View File

@ -106,5 +106,5 @@ do_search:
__pthread_mutex_unlock (&__pthread_key_lock);
return 0;
}
strong_alias (__pthread_key_create, pthread_key_create)
weak_alias (__pthread_key_create, pthread_key_create)
hidden_def (__pthread_key_create)

View File

@ -61,4 +61,4 @@ __pthread_key_delete (pthread_key_t key)
return err;
}
strong_alias (__pthread_key_delete, pthread_key_delete)
weak_alias (__pthread_key_delete, pthread_key_delete)

View File

@ -53,4 +53,4 @@ __pthread_once (pthread_once_t *once_control, void (*init_routine) (void))
return 0;
}
strong_alias (__pthread_once, pthread_once);
weak_alias (__pthread_once, pthread_once);

View File

@ -26,5 +26,5 @@ __pthread_setschedparam (pthread_t thread, int policy,
return ENOSYS;
}
strong_alias (__pthread_setschedparam, pthread_setschedparam);
weak_alias (__pthread_setschedparam, pthread_setschedparam);
stub_warning (pthread_setschedparam)

View File

@ -47,5 +47,5 @@ __pthread_setspecific (pthread_key_t key, const void *value)
self->thread_specifics[key] = (void *) value;
return 0;
}
strong_alias (__pthread_setspecific, pthread_setspecific);
weak_alias (__pthread_setspecific, pthread_setspecific);
hidden_def (__pthread_setspecific)

View File

@ -34,5 +34,5 @@ __pthread_mutex_destroy (pthread_mutex_t *mtxp)
return 0;
}
strong_alias (__pthread_mutex_destroy, pthread_mutex_destroy)
weak_alias (__pthread_mutex_destroy, pthread_mutex_destroy)
hidden_def (__pthread_mutex_destroy)

View File

@ -55,5 +55,5 @@ __pthread_mutex_init (pthread_mutex_t *mtxp, const pthread_mutexattr_t *attrp)
return 0;
}
strong_alias (__pthread_mutex_init, pthread_mutex_init)
weak_alias (__pthread_mutex_init, pthread_mutex_init)
hidden_def (__pthread_mutex_init)

View File

@ -77,4 +77,4 @@ __pthread_mutex_lock (pthread_mutex_t *mtxp)
}
strong_alias (__pthread_mutex_lock, _pthread_mutex_lock)
strong_alias (__pthread_mutex_lock, pthread_mutex_lock)
weak_alias (__pthread_mutex_lock, pthread_mutex_lock)

View File

@ -76,5 +76,5 @@ __pthread_mutex_timedlock (pthread_mutex_t *mtxp, const struct timespec *tsp)
return ret;
}
strong_alias (__pthread_mutex_timedlock, pthread_mutex_timedlock)
weak_alias (__pthread_mutex_timedlock, pthread_mutex_timedlock)
hidden_def (__pthread_mutex_timedlock)

View File

@ -81,4 +81,4 @@ __pthread_mutex_trylock (pthread_mutex_t *mtxp)
}
strong_alias (__pthread_mutex_trylock, _pthread_mutex_trylock)
strong_alias (__pthread_mutex_trylock, pthread_mutex_trylock)
weak_alias (__pthread_mutex_trylock, pthread_mutex_trylock)

View File

@ -88,4 +88,4 @@ __pthread_mutex_unlock (pthread_mutex_t *mtxp)
}
strong_alias (__pthread_mutex_unlock, _pthread_mutex_unlock)
strong_alias (__pthread_mutex_unlock, pthread_mutex_unlock)
weak_alias (__pthread_mutex_unlock, pthread_mutex_unlock)

View File

@ -87,10 +87,6 @@ test-xfail-XOPEN2K8/sys/socket.h/conform = yes
test-xfail-XOPEN2K8/sys/types.h/conform = yes
test-xfail-XOPEN2K8/stdlib.h/conform = yes
test-xfail-XOPEN2K8/arpa/inet.h/conform = yes
# For bug 23819
test-xfail-ISO11/threads.h/linknamespace = yes
test-xfail-ISO11/threads.h/conform = yes
endif
# For bug 23286