diff options
author | deischen <deischen@FreeBSD.org> | 2001-04-10 04:19:21 +0000 |
---|---|---|
committer | deischen <deischen@FreeBSD.org> | 2001-04-10 04:19:21 +0000 |
commit | dd46d4e05f2e301b4d9451bbfabfabbc788975c5 (patch) | |
tree | f253a6d0598ff480596963ca3fcf2b9320aefaee /lib/libkse | |
parent | 3c4f2f3db28798206129ecb0f94e4aa3fa0dd106 (diff) | |
download | FreeBSD-src-dd46d4e05f2e301b4d9451bbfabfabbc788975c5.zip FreeBSD-src-dd46d4e05f2e301b4d9451bbfabfabbc788975c5.tar.gz |
To be consistent, use the __weak_reference macro from <sys/cdefs.h>
instead of #pragma weak to create weak definitions.
Suggested by: bde
Diffstat (limited to 'lib/libkse')
80 files changed, 122 insertions, 122 deletions
diff --git a/lib/libkse/thread/thr_aio_suspend.c b/lib/libkse/thread/thr_aio_suspend.c index ea77f4e..23d34f9 100644 --- a/lib/libkse/thread/thr_aio_suspend.c +++ b/lib/libkse/thread/thr_aio_suspend.c @@ -33,7 +33,7 @@ #include <pthread.h> #include "pthread_private.h" -#pragma weak aio_suspend=_aio_suspend +__weak_reference(_aio_suspend, aio_suspend); int _aio_suspend(const struct aiocb * const iocbs[], int niocb, const struct diff --git a/lib/libkse/thread/thr_attr_destroy.c b/lib/libkse/thread/thr_attr_destroy.c index c025072..420bd5a 100644 --- a/lib/libkse/thread/thr_attr_destroy.c +++ b/lib/libkse/thread/thr_attr_destroy.c @@ -36,7 +36,7 @@ #include <pthread.h> #include "pthread_private.h" -#pragma weak pthread_attr_destroy=_pthread_attr_destroy +__weak_reference(_pthread_attr_destroy, pthread_attr_destroy); int _pthread_attr_destroy(pthread_attr_t *attr) diff --git a/lib/libkse/thread/thr_attr_getdetachstate.c b/lib/libkse/thread/thr_attr_getdetachstate.c index 581c952..515248d 100644 --- a/lib/libkse/thread/thr_attr_getdetachstate.c +++ b/lib/libkse/thread/thr_attr_getdetachstate.c @@ -35,7 +35,7 @@ #include <pthread.h> #include "pthread_private.h" -#pragma weak pthread_attr_getdetachstate=_pthread_attr_getdetachstate +__weak_reference(_pthread_attr_getdetachstate, pthread_attr_getdetachstate); int _pthread_attr_getdetachstate(const pthread_attr_t *attr, int *detachstate) diff --git a/lib/libkse/thread/thr_attr_getinheritsched.c b/lib/libkse/thread/thr_attr_getinheritsched.c index 65e347b..6d6d324 100644 --- a/lib/libkse/thread/thr_attr_getinheritsched.c +++ b/lib/libkse/thread/thr_attr_getinheritsched.c @@ -35,7 +35,7 @@ #include <pthread.h> #include "pthread_private.h" -#pragma weak pthread_attr_getinheritsched=_pthread_attr_getinheritsched +__weak_reference(_pthread_attr_getinheritsched, pthread_attr_getinheritsched); int _pthread_attr_getinheritsched(const pthread_attr_t *attr, int *sched_inherit) diff --git a/lib/libkse/thread/thr_attr_getschedparam.c b/lib/libkse/thread/thr_attr_getschedparam.c index 454e1c2..cac86fa 100644 --- a/lib/libkse/thread/thr_attr_getschedparam.c +++ b/lib/libkse/thread/thr_attr_getschedparam.c @@ -35,7 +35,7 @@ #include <pthread.h> #include "pthread_private.h" -#pragma weak pthread_attr_getschedparam=_pthread_attr_getschedparam +__weak_reference(_pthread_attr_getschedparam, pthread_attr_getschedparam); int _pthread_attr_getschedparam(const pthread_attr_t *attr, struct sched_param *param) diff --git a/lib/libkse/thread/thr_attr_getschedpolicy.c b/lib/libkse/thread/thr_attr_getschedpolicy.c index 8328b3c..f2b74fc 100644 --- a/lib/libkse/thread/thr_attr_getschedpolicy.c +++ b/lib/libkse/thread/thr_attr_getschedpolicy.c @@ -35,7 +35,7 @@ #include <pthread.h> #include "pthread_private.h" -#pragma weak pthread_attr_getschedpolicy=_pthread_attr_getschedpolicy +__weak_reference(_pthread_attr_getschedpolicy, pthread_attr_getschedpolicy); int _pthread_attr_getschedpolicy(const pthread_attr_t *attr, int *policy) diff --git a/lib/libkse/thread/thr_attr_getscope.c b/lib/libkse/thread/thr_attr_getscope.c index ca0f4c9..8abf418 100644 --- a/lib/libkse/thread/thr_attr_getscope.c +++ b/lib/libkse/thread/thr_attr_getscope.c @@ -35,7 +35,7 @@ #include <pthread.h> #include "pthread_private.h" -#pragma weak pthread_attr_getscope=_pthread_attr_getscope +__weak_reference(_pthread_attr_getscope, pthread_attr_getscope); int _pthread_attr_getscope(const pthread_attr_t *attr, int *contentionscope) diff --git a/lib/libkse/thread/thr_attr_getstackaddr.c b/lib/libkse/thread/thr_attr_getstackaddr.c index dd14176..0cef0f3 100644 --- a/lib/libkse/thread/thr_attr_getstackaddr.c +++ b/lib/libkse/thread/thr_attr_getstackaddr.c @@ -35,7 +35,7 @@ #include <pthread.h> #include "pthread_private.h" -#pragma weak pthread_attr_getstackaddr=_pthread_attr_getstackaddr +__weak_reference(_pthread_attr_getstackaddr, pthread_attr_getstackaddr); int _pthread_attr_getstackaddr(const pthread_attr_t *attr, void **stackaddr) diff --git a/lib/libkse/thread/thr_attr_getstacksize.c b/lib/libkse/thread/thr_attr_getstacksize.c index d66e473..091a0c7 100644 --- a/lib/libkse/thread/thr_attr_getstacksize.c +++ b/lib/libkse/thread/thr_attr_getstacksize.c @@ -35,7 +35,7 @@ #include <pthread.h> #include "pthread_private.h" -#pragma weak pthread_attr_getstacksize=_pthread_attr_getstacksize +__weak_reference(_pthread_attr_getstacksize, pthread_attr_getstacksize); int _pthread_attr_getstacksize(const pthread_attr_t *attr, size_t *stacksize) diff --git a/lib/libkse/thread/thr_attr_init.c b/lib/libkse/thread/thr_attr_init.c index 2e560c7..e10d521 100644 --- a/lib/libkse/thread/thr_attr_init.c +++ b/lib/libkse/thread/thr_attr_init.c @@ -37,7 +37,7 @@ #include <pthread.h> #include "pthread_private.h" -#pragma weak pthread_attr_init=_pthread_attr_init +__weak_reference(_pthread_attr_init, pthread_attr_init); int _pthread_attr_init(pthread_attr_t *attr) diff --git a/lib/libkse/thread/thr_attr_setcreatesuspend_np.c b/lib/libkse/thread/thr_attr_setcreatesuspend_np.c index 5520368..be6f8d7 100644 --- a/lib/libkse/thread/thr_attr_setcreatesuspend_np.c +++ b/lib/libkse/thread/thr_attr_setcreatesuspend_np.c @@ -35,7 +35,7 @@ #include <pthread.h> #include "pthread_private.h" -#pragma weak pthread_attr_setcreatesuspend_np=_pthread_attr_setcreatesuspend_np +__weak_reference(_pthread_attr_setcreatesuspend_np, pthread_attr_setcreatesuspend_np); int _pthread_attr_setcreatesuspend_np(pthread_attr_t *attr) diff --git a/lib/libkse/thread/thr_attr_setdetachstate.c b/lib/libkse/thread/thr_attr_setdetachstate.c index 8c8a5fc..e0e23c2 100644 --- a/lib/libkse/thread/thr_attr_setdetachstate.c +++ b/lib/libkse/thread/thr_attr_setdetachstate.c @@ -35,7 +35,7 @@ #include <pthread.h> #include "pthread_private.h" -#pragma weak pthread_attr_setdetachstate=_pthread_attr_setdetachstate +__weak_reference(_pthread_attr_setdetachstate, pthread_attr_setdetachstate); int _pthread_attr_setdetachstate(pthread_attr_t *attr, int detachstate) diff --git a/lib/libkse/thread/thr_attr_setinheritsched.c b/lib/libkse/thread/thr_attr_setinheritsched.c index e35b4e9..3538131 100644 --- a/lib/libkse/thread/thr_attr_setinheritsched.c +++ b/lib/libkse/thread/thr_attr_setinheritsched.c @@ -35,7 +35,7 @@ #include <pthread.h> #include "pthread_private.h" -#pragma weak pthread_attr_setinheritsched=_pthread_attr_setinheritsched +__weak_reference(_pthread_attr_setinheritsched, pthread_attr_setinheritsched); int _pthread_attr_setinheritsched(pthread_attr_t *attr, int sched_inherit) diff --git a/lib/libkse/thread/thr_attr_setschedparam.c b/lib/libkse/thread/thr_attr_setschedparam.c index a18494b..c42973e 100644 --- a/lib/libkse/thread/thr_attr_setschedparam.c +++ b/lib/libkse/thread/thr_attr_setschedparam.c @@ -35,7 +35,7 @@ #include <pthread.h> #include "pthread_private.h" -#pragma weak pthread_attr_setschedparam=_pthread_attr_setschedparam +__weak_reference(_pthread_attr_setschedparam, pthread_attr_setschedparam); int _pthread_attr_setschedparam(pthread_attr_t *attr, const struct sched_param *param) diff --git a/lib/libkse/thread/thr_attr_setschedpolicy.c b/lib/libkse/thread/thr_attr_setschedpolicy.c index 29de2f4..d9c83e6 100644 --- a/lib/libkse/thread/thr_attr_setschedpolicy.c +++ b/lib/libkse/thread/thr_attr_setschedpolicy.c @@ -35,7 +35,7 @@ #include <pthread.h> #include "pthread_private.h" -#pragma weak pthread_attr_setschedpolicy=_pthread_attr_setschedpolicy +__weak_reference(_pthread_attr_setschedpolicy, pthread_attr_setschedpolicy); int _pthread_attr_setschedpolicy(pthread_attr_t *attr, int policy) diff --git a/lib/libkse/thread/thr_attr_setscope.c b/lib/libkse/thread/thr_attr_setscope.c index 81a09fa..967cb39 100644 --- a/lib/libkse/thread/thr_attr_setscope.c +++ b/lib/libkse/thread/thr_attr_setscope.c @@ -35,7 +35,7 @@ #include <pthread.h> #include "pthread_private.h" -#pragma weak pthread_attr_setscope=_pthread_attr_setscope +__weak_reference(_pthread_attr_setscope, pthread_attr_setscope); int _pthread_attr_setscope(pthread_attr_t *attr, int contentionscope) diff --git a/lib/libkse/thread/thr_attr_setstackaddr.c b/lib/libkse/thread/thr_attr_setstackaddr.c index 8552ea4..6046932 100644 --- a/lib/libkse/thread/thr_attr_setstackaddr.c +++ b/lib/libkse/thread/thr_attr_setstackaddr.c @@ -35,7 +35,7 @@ #include <pthread.h> #include "pthread_private.h" -#pragma weak pthread_attr_setstackaddr=_pthread_attr_setstackaddr +__weak_reference(_pthread_attr_setstackaddr, pthread_attr_setstackaddr); int _pthread_attr_setstackaddr(pthread_attr_t *attr, void *stackaddr) diff --git a/lib/libkse/thread/thr_attr_setstacksize.c b/lib/libkse/thread/thr_attr_setstacksize.c index 4233cb5..622ba7f 100644 --- a/lib/libkse/thread/thr_attr_setstacksize.c +++ b/lib/libkse/thread/thr_attr_setstacksize.c @@ -35,7 +35,7 @@ #include <pthread.h> #include "pthread_private.h" -#pragma weak pthread_attr_setstacksize=_pthread_attr_setstacksize +__weak_reference(_pthread_attr_setstacksize, pthread_attr_setstacksize); int _pthread_attr_setstacksize(pthread_attr_t *attr, size_t stacksize) diff --git a/lib/libkse/thread/thr_cancel.c b/lib/libkse/thread/thr_cancel.c index 55f94fb..8b9132c 100644 --- a/lib/libkse/thread/thr_cancel.c +++ b/lib/libkse/thread/thr_cancel.c @@ -8,10 +8,10 @@ static void finish_cancellation(void *arg); -#pragma weak pthread_cancel=_pthread_cancel -#pragma weak pthread_setcancelstate=_pthread_setcancelstate -#pragma weak pthread_setcanceltype=_pthread_setcanceltype -#pragma weak pthread_testcancel=_pthread_testcancel +__weak_reference(_pthread_cancel, pthread_cancel); +__weak_reference(_pthread_setcancelstate, pthread_setcancelstate); +__weak_reference(_pthread_setcanceltype, pthread_setcanceltype); +__weak_reference(_pthread_testcancel, pthread_testcancel); int _pthread_cancel(pthread_t pthread) diff --git a/lib/libkse/thread/thr_clean.c b/lib/libkse/thread/thr_clean.c index 9ce3fc2..6330cb9 100644 --- a/lib/libkse/thread/thr_clean.c +++ b/lib/libkse/thread/thr_clean.c @@ -37,8 +37,8 @@ #include <pthread.h> #include "pthread_private.h" -#pragma weak pthread_cleanup_push=_pthread_cleanup_push -#pragma weak pthread_cleanup_pop=_pthread_cleanup_pop +__weak_reference(_pthread_cleanup_push, pthread_cleanup_push); +__weak_reference(_pthread_cleanup_pop, pthread_cleanup_pop); void _pthread_cleanup_push(void (*routine) (void *), void *routine_arg) diff --git a/lib/libkse/thread/thr_close.c b/lib/libkse/thread/thr_close.c index 43c3b22..0a5bd24 100644 --- a/lib/libkse/thread/thr_close.c +++ b/lib/libkse/thread/thr_close.c @@ -39,7 +39,7 @@ #include <pthread.h> #include "pthread_private.h" -#pragma weak close=__close +__weak_reference(__close, close); int _close(int fd) diff --git a/lib/libkse/thread/thr_cond.c b/lib/libkse/thread/thr_cond.c index 6f2c509..ea8215d 100644 --- a/lib/libkse/thread/thr_cond.c +++ b/lib/libkse/thread/thr_cond.c @@ -44,12 +44,12 @@ static inline pthread_t cond_queue_deq(pthread_cond_t); static inline void cond_queue_remove(pthread_cond_t, pthread_t); static inline void cond_queue_enq(pthread_cond_t, pthread_t); -#pragma weak pthread_cond_init=_pthread_cond_init -#pragma weak pthread_cond_destroy=_pthread_cond_destroy -#pragma weak pthread_cond_wait=_pthread_cond_wait -#pragma weak pthread_cond_timedwait=_pthread_cond_timedwait -#pragma weak pthread_cond_signal=_pthread_cond_signal -#pragma weak pthread_cond_broadcast=_pthread_cond_broadcast +__weak_reference(_pthread_cond_init, pthread_cond_init); +__weak_reference(_pthread_cond_destroy, pthread_cond_destroy); +__weak_reference(_pthread_cond_wait, pthread_cond_wait); +__weak_reference(_pthread_cond_timedwait, pthread_cond_timedwait); +__weak_reference(_pthread_cond_signal, pthread_cond_signal); +__weak_reference(_pthread_cond_broadcast, pthread_cond_broadcast); /* Reinitialize a condition variable to defaults. */ diff --git a/lib/libkse/thread/thr_condattr_destroy.c b/lib/libkse/thread/thr_condattr_destroy.c index 578523a..3a05487 100644 --- a/lib/libkse/thread/thr_condattr_destroy.c +++ b/lib/libkse/thread/thr_condattr_destroy.c @@ -36,7 +36,7 @@ #include <pthread.h> #include "pthread_private.h" -#pragma weak pthread_condattr_destroy=_pthread_condattr_destroy +__weak_reference(_pthread_condattr_destroy, pthread_condattr_destroy); int _pthread_condattr_destroy(pthread_condattr_t *attr) diff --git a/lib/libkse/thread/thr_condattr_init.c b/lib/libkse/thread/thr_condattr_init.c index dc8059d..cfc1e4a 100644 --- a/lib/libkse/thread/thr_condattr_init.c +++ b/lib/libkse/thread/thr_condattr_init.c @@ -37,7 +37,7 @@ #include <pthread.h> #include "pthread_private.h" -#pragma weak pthread_condattr_init=_pthread_condattr_init +__weak_reference(_pthread_condattr_init, pthread_condattr_init); int _pthread_condattr_init(pthread_condattr_t *attr) diff --git a/lib/libkse/thread/thr_creat.c b/lib/libkse/thread/thr_creat.c index 56100dd..92da971 100644 --- a/lib/libkse/thread/thr_creat.c +++ b/lib/libkse/thread/thr_creat.c @@ -33,7 +33,7 @@ #include <pthread.h> #include "pthread_private.h" -#pragma weak creat=___creat +__weak_reference(___creat, creat); int ___creat(const char *path, mode_t mode) diff --git a/lib/libkse/thread/thr_create.c b/lib/libkse/thread/thr_create.c index a0a51ec..f1a3473 100644 --- a/lib/libkse/thread/thr_create.c +++ b/lib/libkse/thread/thr_create.c @@ -63,7 +63,7 @@ int _thread_CTX_JB_value = CTX_JB; int _thread_CTX_SJB_value = CTX_SJB; int _thread_CTX_UC_value = CTX_UC; -#pragma weak pthread_create=_pthread_create +__weak_reference(_pthread_create, pthread_create); int _pthread_create(pthread_t * thread, const pthread_attr_t * attr, diff --git a/lib/libkse/thread/thr_detach.c b/lib/libkse/thread/thr_detach.c index c387926..0b3cfd7 100644 --- a/lib/libkse/thread/thr_detach.c +++ b/lib/libkse/thread/thr_detach.c @@ -35,7 +35,7 @@ #include <pthread.h> #include "pthread_private.h" -#pragma weak pthread_detach=_pthread_detach +__weak_reference(_pthread_detach, pthread_detach); int _pthread_detach(pthread_t pthread) diff --git a/lib/libkse/thread/thr_equal.c b/lib/libkse/thread/thr_equal.c index 334d023..0dfb63d 100644 --- a/lib/libkse/thread/thr_equal.c +++ b/lib/libkse/thread/thr_equal.c @@ -34,7 +34,7 @@ #include <pthread.h> #include "pthread_private.h" -#pragma weak pthread_equal=_pthread_equal +__weak_reference(_pthread_equal, pthread_equal); int _pthread_equal(pthread_t t1, pthread_t t2) diff --git a/lib/libkse/thread/thr_exit.c b/lib/libkse/thread/thr_exit.c index fd0e84a..a0ebc8c 100644 --- a/lib/libkse/thread/thr_exit.c +++ b/lib/libkse/thread/thr_exit.c @@ -43,7 +43,7 @@ #define FLAGS_IN_SCHEDQ \ (PTHREAD_FLAGS_IN_PRIOQ|PTHREAD_FLAGS_IN_WAITQ|PTHREAD_FLAGS_IN_WORKQ) -#pragma weak pthread_exit=_pthread_exit +__weak_reference(_pthread_exit, pthread_exit); void _exit(int status) { diff --git a/lib/libkse/thread/thr_fcntl.c b/lib/libkse/thread/thr_fcntl.c index 84f4678..1d12c0e 100644 --- a/lib/libkse/thread/thr_fcntl.c +++ b/lib/libkse/thread/thr_fcntl.c @@ -37,7 +37,7 @@ #include <pthread.h> #include "pthread_private.h" -#pragma weak fcntl=__fcntl +__weak_reference(__fcntl, fcntl); int _fcntl(int fd, int cmd,...) diff --git a/lib/libkse/thread/thr_fork.c b/lib/libkse/thread/thr_fork.c index 34d640c..7af2f75 100644 --- a/lib/libkse/thread/thr_fork.c +++ b/lib/libkse/thread/thr_fork.c @@ -39,7 +39,7 @@ #include <pthread.h> #include "pthread_private.h" -#pragma weak fork=_fork +__weak_reference(_fork, fork); pid_t _fork(void) diff --git a/lib/libkse/thread/thr_fsync.c b/lib/libkse/thread/thr_fsync.c index b90d896..b8b9f3c 100644 --- a/lib/libkse/thread/thr_fsync.c +++ b/lib/libkse/thread/thr_fsync.c @@ -35,7 +35,7 @@ #include <pthread.h> #include "pthread_private.h" -#pragma weak fsync=__fsync +__weak_reference(__fsync, fsync); int _fsync(int fd) diff --git a/lib/libkse/thread/thr_getprio.c b/lib/libkse/thread/thr_getprio.c index 35eeb5b..a10c889 100644 --- a/lib/libkse/thread/thr_getprio.c +++ b/lib/libkse/thread/thr_getprio.c @@ -35,7 +35,7 @@ #include <pthread.h> #include "pthread_private.h" -#pragma weak pthread_getprio=_pthread_getprio +__weak_reference(_pthread_getprio, pthread_getprio); int _pthread_getprio(pthread_t pthread) diff --git a/lib/libkse/thread/thr_getschedparam.c b/lib/libkse/thread/thr_getschedparam.c index 02f27c2..0d1ffe9 100644 --- a/lib/libkse/thread/thr_getschedparam.c +++ b/lib/libkse/thread/thr_getschedparam.c @@ -35,7 +35,7 @@ #include <pthread.h> #include "pthread_private.h" -#pragma weak pthread_getschedparam=_pthread_getschedparam +__weak_reference(_pthread_getschedparam, pthread_getschedparam); int _pthread_getschedparam(pthread_t pthread, int *policy, diff --git a/lib/libkse/thread/thr_info.c b/lib/libkse/thread/thr_info.c index 9c85e84..0eddb22 100644 --- a/lib/libkse/thread/thr_info.c +++ b/lib/libkse/thread/thr_info.c @@ -46,7 +46,7 @@ static void dump_thread(int fd, pthread_t pthread, int long_version); -#pragma weak pthread_set_name_np=_pthread_set_name_np +__weak_reference(_pthread_set_name_np, pthread_set_name_np); struct s_thread_info { enum pthread_state state; diff --git a/lib/libkse/thread/thr_join.c b/lib/libkse/thread/thr_join.c index 2615f73..b9c75ac 100644 --- a/lib/libkse/thread/thr_join.c +++ b/lib/libkse/thread/thr_join.c @@ -35,7 +35,7 @@ #include <pthread.h> #include "pthread_private.h" -#pragma weak pthread_join=_pthread_join +__weak_reference(_pthread_join, pthread_join); int _pthread_join(pthread_t pthread, void **thread_return) diff --git a/lib/libkse/thread/thr_kill.c b/lib/libkse/thread/thr_kill.c index 7a24ffb..29e1814 100644 --- a/lib/libkse/thread/thr_kill.c +++ b/lib/libkse/thread/thr_kill.c @@ -36,7 +36,7 @@ #include <pthread.h> #include "pthread_private.h" -#pragma weak pthread_kill=_pthread_kill +__weak_reference(_pthread_kill, pthread_kill); int _pthread_kill(pthread_t pthread, int sig) diff --git a/lib/libkse/thread/thr_mattr_init.c b/lib/libkse/thread/thr_mattr_init.c index 4859915..e4e2e50 100644 --- a/lib/libkse/thread/thr_mattr_init.c +++ b/lib/libkse/thread/thr_mattr_init.c @@ -37,7 +37,7 @@ #include <pthread.h> #include "pthread_private.h" -#pragma weak pthread_mutexattr_init=_pthread_mutexattr_init +__weak_reference(_pthread_mutexattr_init, pthread_mutexattr_init); int _pthread_mutexattr_init(pthread_mutexattr_t *attr) diff --git a/lib/libkse/thread/thr_mattr_kind_np.c b/lib/libkse/thread/thr_mattr_kind_np.c index 5ad7928..04db2a0 100644 --- a/lib/libkse/thread/thr_mattr_kind_np.c +++ b/lib/libkse/thread/thr_mattr_kind_np.c @@ -35,10 +35,10 @@ #include <pthread.h> #include "pthread_private.h" -#pragma weak pthread_mutexattr_setkind_np=_pthread_mutexattr_setkind_np -#pragma weak pthread_mutexattr_getkind_np=_pthread_mutexattr_getkind_np -#pragma weak pthread_mutexattr_gettype=_pthread_mutexattr_gettype -#pragma weak pthread_mutexattr_settype=_pthread_mutexattr_settype +__weak_reference(_pthread_mutexattr_setkind_np, pthread_mutexattr_setkind_np); +__weak_reference(_pthread_mutexattr_getkind_np, pthread_mutexattr_getkind_np); +__weak_reference(_pthread_mutexattr_gettype, pthread_mutexattr_gettype); +__weak_reference(_pthread_mutexattr_settype, pthread_mutexattr_settype); int _pthread_mutexattr_setkind_np(pthread_mutexattr_t *attr, int kind) diff --git a/lib/libkse/thread/thr_msync.c b/lib/libkse/thread/thr_msync.c index 2952da8..24cbaa6 100644 --- a/lib/libkse/thread/thr_msync.c +++ b/lib/libkse/thread/thr_msync.c @@ -11,7 +11,7 @@ #include <pthread.h> #include "pthread_private.h" -#pragma weak msync=__msync +__weak_reference(__msync, msync); int _msync(void *addr, size_t len, int flags) diff --git a/lib/libkse/thread/thr_multi_np.c b/lib/libkse/thread/thr_multi_np.c index cf58bb4..c1a069f 100644 --- a/lib/libkse/thread/thr_multi_np.c +++ b/lib/libkse/thread/thr_multi_np.c @@ -35,7 +35,7 @@ #include <pthread.h> #include "pthread_private.h" -#pragma weak pthread_multi_np=_pthread_multi_np +__weak_reference(_pthread_multi_np, pthread_multi_np); int _pthread_multi_np() diff --git a/lib/libkse/thread/thr_mutex.c b/lib/libkse/thread/thr_mutex.c index 27377f3..0f67b4b 100644 --- a/lib/libkse/thread/thr_mutex.c +++ b/lib/libkse/thread/thr_mutex.c @@ -79,13 +79,13 @@ static struct pthread_mutex_attr static_mutex_attr = static pthread_mutexattr_t static_mattr = &static_mutex_attr; /* Single underscore versions provided for libc internal usage: */ -#pragma weak pthread_mutex_trylock=__pthread_mutex_trylock -#pragma weak pthread_mutex_lock=__pthread_mutex_lock +__weak_reference(__pthread_mutex_trylock, pthread_mutex_trylock); +__weak_reference(__pthread_mutex_lock, pthread_mutex_lock); /* No difference between libc and application usage of these: */ -#pragma weak pthread_mutex_init=_pthread_mutex_init -#pragma weak pthread_mutex_destroy=_pthread_mutex_destroy -#pragma weak pthread_mutex_unlock=_pthread_mutex_unlock +__weak_reference(_pthread_mutex_init, pthread_mutex_init); +__weak_reference(_pthread_mutex_destroy, pthread_mutex_destroy); +__weak_reference(_pthread_mutex_unlock, pthread_mutex_unlock); /* Reinitialize a mutex to defaults. */ diff --git a/lib/libkse/thread/thr_mutex_prioceiling.c b/lib/libkse/thread/thr_mutex_prioceiling.c index d19f521..2682abc 100644 --- a/lib/libkse/thread/thr_mutex_prioceiling.c +++ b/lib/libkse/thread/thr_mutex_prioceiling.c @@ -37,10 +37,10 @@ #include <pthread.h> #include "pthread_private.h" -#pragma weak pthread_mutexattr_getprioceiling=_pthread_mutexattr_getprioceiling -#pragma weak pthread_mutexattr_setprioceiling=_pthread_mutexattr_setprioceiling -#pragma weak pthread_mutex_getprioceiling=_pthread_mutex_getprioceiling -#pragma weak pthread_mutex_setprioceiling=_pthread_mutex_setprioceiling +__weak_reference(_pthread_mutexattr_getprioceiling, pthread_mutexattr_getprioceiling); +__weak_reference(_pthread_mutexattr_setprioceiling, pthread_mutexattr_setprioceiling); +__weak_reference(_pthread_mutex_getprioceiling, pthread_mutex_getprioceiling); +__weak_reference(_pthread_mutex_setprioceiling, pthread_mutex_setprioceiling); int _pthread_mutexattr_getprioceiling(pthread_mutexattr_t *mattr, int *prioceiling) diff --git a/lib/libkse/thread/thr_mutex_protocol.c b/lib/libkse/thread/thr_mutex_protocol.c index 1ad9b15..4d020d6 100644 --- a/lib/libkse/thread/thr_mutex_protocol.c +++ b/lib/libkse/thread/thr_mutex_protocol.c @@ -37,8 +37,8 @@ #include <pthread.h> #include "pthread_private.h" -#pragma weak pthread_mutexattr_getprotocol=_pthread_mutexattr_getprotocol -#pragma weak pthread_mutexattr_setprotocol=_pthread_mutexattr_setprotocol +__weak_reference(_pthread_mutexattr_getprotocol, pthread_mutexattr_getprotocol); +__weak_reference(_pthread_mutexattr_setprotocol, pthread_mutexattr_setprotocol); int _pthread_mutexattr_getprotocol(pthread_mutexattr_t *mattr, int *protocol) diff --git a/lib/libkse/thread/thr_mutexattr_destroy.c b/lib/libkse/thread/thr_mutexattr_destroy.c index cc766f0..bdc85a5 100644 --- a/lib/libkse/thread/thr_mutexattr_destroy.c +++ b/lib/libkse/thread/thr_mutexattr_destroy.c @@ -36,7 +36,7 @@ #include <pthread.h> #include "pthread_private.h" -#pragma weak pthread_mutexattr_destroy=_pthread_mutexattr_destroy +__weak_reference(_pthread_mutexattr_destroy, pthread_mutexattr_destroy); int _pthread_mutexattr_destroy(pthread_mutexattr_t *attr) diff --git a/lib/libkse/thread/thr_nanosleep.c b/lib/libkse/thread/thr_nanosleep.c index 54349d4..e5569e7 100644 --- a/lib/libkse/thread/thr_nanosleep.c +++ b/lib/libkse/thread/thr_nanosleep.c @@ -36,7 +36,7 @@ #include <pthread.h> #include "pthread_private.h" -#pragma weak nanosleep=__nanosleep +__weak_reference(__nanosleep, nanosleep); int _nanosleep(const struct timespec * time_to_sleep, diff --git a/lib/libkse/thread/thr_once.c b/lib/libkse/thread/thr_once.c index dde5474..20e2904 100644 --- a/lib/libkse/thread/thr_once.c +++ b/lib/libkse/thread/thr_once.c @@ -34,7 +34,7 @@ #include <pthread.h> #include "pthread_private.h" -#pragma weak pthread_once=_pthread_once +__weak_reference(_pthread_once, pthread_once); int _pthread_once(pthread_once_t * once_control, void (*init_routine) (void)) diff --git a/lib/libkse/thread/thr_open.c b/lib/libkse/thread/thr_open.c index 37bd43d..9ce28a9 100644 --- a/lib/libkse/thread/thr_open.c +++ b/lib/libkse/thread/thr_open.c @@ -40,7 +40,7 @@ #include <pthread.h> #include "pthread_private.h" -#pragma weak open=_open +__weak_reference(_open, open); int _open(const char *path, int flags,...) diff --git a/lib/libkse/thread/thr_pause.c b/lib/libkse/thread/thr_pause.c index 19501df..57b508f 100644 --- a/lib/libkse/thread/thr_pause.c +++ b/lib/libkse/thread/thr_pause.c @@ -33,7 +33,7 @@ #include <pthread.h> #include "pthread_private.h" -#pragma weak pause=_pause +__weak_reference(_pause, pause); int _pause(void) diff --git a/lib/libkse/thread/thr_poll.c b/lib/libkse/thread/thr_poll.c index d3f631a..e2a7cc0 100644 --- a/lib/libkse/thread/thr_poll.c +++ b/lib/libkse/thread/thr_poll.c @@ -41,7 +41,7 @@ #include <pthread.h> #include "pthread_private.h" -#pragma weak poll=_poll +__weak_reference(_poll, poll); int _poll(struct pollfd *fds, unsigned int nfds, int timeout) diff --git a/lib/libkse/thread/thr_read.c b/lib/libkse/thread/thr_read.c index 5f5475d..4d81414 100644 --- a/lib/libkse/thread/thr_read.c +++ b/lib/libkse/thread/thr_read.c @@ -40,7 +40,7 @@ #include <pthread.h> #include "pthread_private.h" -#pragma weak read=__read +__weak_reference(__read, read); ssize_t _read(int fd, void *buf, size_t nbytes) diff --git a/lib/libkse/thread/thr_readv.c b/lib/libkse/thread/thr_readv.c index 2e14a9f..2759819 100644 --- a/lib/libkse/thread/thr_readv.c +++ b/lib/libkse/thread/thr_readv.c @@ -40,7 +40,7 @@ #include <pthread.h> #include "pthread_private.h" -#pragma weak readv=_readv +__weak_reference(_readv, readv); ssize_t _readv(int fd, const struct iovec * iov, int iovcnt) diff --git a/lib/libkse/thread/thr_resume_np.c b/lib/libkse/thread/thr_resume_np.c index 0d4738d..5ed408b 100644 --- a/lib/libkse/thread/thr_resume_np.c +++ b/lib/libkse/thread/thr_resume_np.c @@ -35,7 +35,7 @@ #include <pthread.h> #include "pthread_private.h" -#pragma weak pthread_resume_np=_pthread_resume_np +__weak_reference(_pthread_resume_np, pthread_resume_np); /* Resume a thread: */ int diff --git a/lib/libkse/thread/thr_rwlock.c b/lib/libkse/thread/thr_rwlock.c index 9c87e44..25fab59 100644 --- a/lib/libkse/thread/thr_rwlock.c +++ b/lib/libkse/thread/thr_rwlock.c @@ -36,13 +36,13 @@ /* maximum number of times a read lock may be obtained */ #define MAX_READ_LOCKS (INT_MAX - 1) -#pragma weak pthread_rwlock_destroy=_pthread_rwlock_destroy -#pragma weak pthread_rwlock_init=_pthread_rwlock_init -#pragma weak pthread_rwlock_rdlock=_pthread_rwlock_rdlock -#pragma weak pthread_rwlock_tryrdlock=_pthread_rwlock_tryrdlock -#pragma weak pthread_rwlock_trywrlock=_pthread_rwlock_trywrlock -#pragma weak pthread_rwlock_unlock=_pthread_rwlock_unlock -#pragma weak pthread_rwlock_wrlock=_pthread_rwlock_wrlock +__weak_reference(_pthread_rwlock_destroy, pthread_rwlock_destroy); +__weak_reference(_pthread_rwlock_init, pthread_rwlock_init); +__weak_reference(_pthread_rwlock_rdlock, pthread_rwlock_rdlock); +__weak_reference(_pthread_rwlock_tryrdlock, pthread_rwlock_tryrdlock); +__weak_reference(_pthread_rwlock_trywrlock, pthread_rwlock_trywrlock); +__weak_reference(_pthread_rwlock_unlock, pthread_rwlock_unlock); +__weak_reference(_pthread_rwlock_wrlock, pthread_rwlock_wrlock); static int init_static (pthread_rwlock_t *rwlock); diff --git a/lib/libkse/thread/thr_rwlockattr.c b/lib/libkse/thread/thr_rwlockattr.c index 7dcaaeb..bc1b9ee 100644 --- a/lib/libkse/thread/thr_rwlockattr.c +++ b/lib/libkse/thread/thr_rwlockattr.c @@ -32,10 +32,10 @@ #include <pthread.h> #include "pthread_private.h" -#pragma weak pthread_rwlockattr_destroy=_pthread_rwlockattr_destroy -#pragma weak pthread_rwlockattr_getpshared=_pthread_rwlockattr_getpshared -#pragma weak pthread_rwlockattr_init=_pthread_rwlockattr_init -#pragma weak pthread_rwlockattr_setpshared=_pthread_rwlockattr_setpshared +__weak_reference(_pthread_rwlockattr_destroy, pthread_rwlockattr_destroy); +__weak_reference(_pthread_rwlockattr_getpshared, pthread_rwlockattr_getpshared); +__weak_reference(_pthread_rwlockattr_init, pthread_rwlockattr_init); +__weak_reference(_pthread_rwlockattr_setpshared, pthread_rwlockattr_setpshared); int _pthread_rwlockattr_destroy(pthread_rwlockattr_t *rwlockattr) diff --git a/lib/libkse/thread/thr_select.c b/lib/libkse/thread/thr_select.c index 547046a..5860efe 100644 --- a/lib/libkse/thread/thr_select.c +++ b/lib/libkse/thread/thr_select.c @@ -43,7 +43,7 @@ #include <pthread.h> #include "pthread_private.h" -#pragma weak select=_select +__weak_reference(_select, select); int _select(int numfds, fd_set * readfds, fd_set * writefds, fd_set * exceptfds, diff --git a/lib/libkse/thread/thr_self.c b/lib/libkse/thread/thr_self.c index 3c92daa..1c09e3d 100644 --- a/lib/libkse/thread/thr_self.c +++ b/lib/libkse/thread/thr_self.c @@ -34,7 +34,7 @@ #include <pthread.h> #include "pthread_private.h" -#pragma weak pthread_self=_pthread_self +__weak_reference(_pthread_self, pthread_self); pthread_t _pthread_self(void) diff --git a/lib/libkse/thread/thr_sem.c b/lib/libkse/thread/thr_sem.c index 926f498..9ed6922 100644 --- a/lib/libkse/thread/thr_sem.c +++ b/lib/libkse/thread/thr_sem.c @@ -42,15 +42,15 @@ goto RETURN; \ } -#pragma weak sem_init=_sem_init -#pragma weak sem_destroy=_sem_destroy -#pragma weak sem_open=_sem_open -#pragma weak sem_close=_sem_close -#pragma weak sem_unlink=_sem_unlink -#pragma weak sem_wait=_sem_wait -#pragma weak sem_trywait=_sem_trywait -#pragma weak sem_post=_sem_post -#pragma weak sem_getvalue=_sem_getvalue +__weak_reference(_sem_init, sem_init); +__weak_reference(_sem_destroy, sem_destroy); +__weak_reference(_sem_open, sem_open); +__weak_reference(_sem_close, sem_close); +__weak_reference(_sem_unlink, sem_unlink); +__weak_reference(_sem_wait, sem_wait); +__weak_reference(_sem_trywait, sem_trywait); +__weak_reference(_sem_post, sem_post); +__weak_reference(_sem_getvalue, sem_getvalue); int diff --git a/lib/libkse/thread/thr_setprio.c b/lib/libkse/thread/thr_setprio.c index eee05dc..9099a6e 100644 --- a/lib/libkse/thread/thr_setprio.c +++ b/lib/libkse/thread/thr_setprio.c @@ -34,7 +34,7 @@ #include <pthread.h> #include "pthread_private.h" -#pragma weak pthread_setprio=_pthread_setprio +__weak_reference(_pthread_setprio, pthread_setprio); int _pthread_setprio(pthread_t pthread, int prio) diff --git a/lib/libkse/thread/thr_setschedparam.c b/lib/libkse/thread/thr_setschedparam.c index a03f036..7696762 100644 --- a/lib/libkse/thread/thr_setschedparam.c +++ b/lib/libkse/thread/thr_setschedparam.c @@ -36,7 +36,7 @@ #include <pthread.h> #include "pthread_private.h" -#pragma weak pthread_setschedparam=_pthread_setschedparam +__weak_reference(_pthread_setschedparam, pthread_setschedparam); int _pthread_setschedparam(pthread_t pthread, int policy, diff --git a/lib/libkse/thread/thr_sigaction.c b/lib/libkse/thread/thr_sigaction.c index dba2f7e..2be587c 100644 --- a/lib/libkse/thread/thr_sigaction.c +++ b/lib/libkse/thread/thr_sigaction.c @@ -36,7 +36,7 @@ #include <pthread.h> #include "pthread_private.h" -#pragma weak sigaction=_sigaction +__weak_reference(_sigaction, sigaction); int _sigaction(int sig, const struct sigaction * act, struct sigaction * oact) diff --git a/lib/libkse/thread/thr_sigmask.c b/lib/libkse/thread/thr_sigmask.c index c16d66b..040e7aa 100644 --- a/lib/libkse/thread/thr_sigmask.c +++ b/lib/libkse/thread/thr_sigmask.c @@ -39,7 +39,7 @@ #include <pthread.h> #include "pthread_private.h" -#pragma weak pthread_sigmask=_pthread_sigmask +__weak_reference(_pthread_sigmask, pthread_sigmask); int _pthread_sigmask(int how, const sigset_t *set, sigset_t *oset) diff --git a/lib/libkse/thread/thr_sigpending.c b/lib/libkse/thread/thr_sigpending.c index 98b7d26..3c7efa4 100644 --- a/lib/libkse/thread/thr_sigpending.c +++ b/lib/libkse/thread/thr_sigpending.c @@ -36,7 +36,7 @@ #include <pthread.h> #include "pthread_private.h" -#pragma weak sigpending=_sigpending +__weak_reference(_sigpending, sigpending); int _sigpending(sigset_t * set) diff --git a/lib/libkse/thread/thr_sigprocmask.c b/lib/libkse/thread/thr_sigprocmask.c index f93d463..cc0b8da 100644 --- a/lib/libkse/thread/thr_sigprocmask.c +++ b/lib/libkse/thread/thr_sigprocmask.c @@ -39,7 +39,7 @@ #include <pthread.h> #include "pthread_private.h" -#pragma weak sigprocmask=_sigprocmask +__weak_reference(_sigprocmask, sigprocmask); int _sigprocmask(int how, const sigset_t *set, sigset_t *oset) diff --git a/lib/libkse/thread/thr_sigsuspend.c b/lib/libkse/thread/thr_sigsuspend.c index f0a08e2..1201097 100644 --- a/lib/libkse/thread/thr_sigsuspend.c +++ b/lib/libkse/thread/thr_sigsuspend.c @@ -36,7 +36,7 @@ #include <pthread.h> #include "pthread_private.h" -#pragma weak sigsuspend=__sigsuspend +__weak_reference(__sigsuspend, sigsuspend); int _sigsuspend(const sigset_t * set) diff --git a/lib/libkse/thread/thr_sigwait.c b/lib/libkse/thread/thr_sigwait.c index 71fe007..1e87249 100644 --- a/lib/libkse/thread/thr_sigwait.c +++ b/lib/libkse/thread/thr_sigwait.c @@ -38,7 +38,7 @@ #include <pthread.h> #include "pthread_private.h" -#pragma weak sigwait=_sigwait +__weak_reference(_sigwait, sigwait); int _sigwait(const sigset_t *set, int *sig) diff --git a/lib/libkse/thread/thr_single_np.c b/lib/libkse/thread/thr_single_np.c index 52cd6ed..85471b8 100644 --- a/lib/libkse/thread/thr_single_np.c +++ b/lib/libkse/thread/thr_single_np.c @@ -35,7 +35,7 @@ #include <pthread.h> #include "pthread_private.h" -#pragma weak pthread_single_np=_pthread_single_np +__weak_reference(_pthread_single_np, pthread_single_np); int _pthread_single_np() { diff --git a/lib/libkse/thread/thr_sleep.c b/lib/libkse/thread/thr_sleep.c index acc6e55..9e09db7 100644 --- a/lib/libkse/thread/thr_sleep.c +++ b/lib/libkse/thread/thr_sleep.c @@ -33,7 +33,7 @@ #include <pthread.h> #include "pthread_private.h" -#pragma weak sleep=_sleep +__weak_reference(_sleep, sleep); unsigned int _sleep(unsigned int seconds) diff --git a/lib/libkse/thread/thr_spec.c b/lib/libkse/thread/thr_spec.c index 783617f..2b359c8 100644 --- a/lib/libkse/thread/thr_spec.c +++ b/lib/libkse/thread/thr_spec.c @@ -41,10 +41,10 @@ /* Static variables: */ static struct pthread_key key_table[PTHREAD_KEYS_MAX]; -#pragma weak pthread_key_create=_pthread_key_create -#pragma weak pthread_key_delete=_pthread_key_delete -#pragma weak pthread_getspecific=_pthread_getspecific -#pragma weak pthread_setspecific=_pthread_setspecific +__weak_reference(_pthread_key_create, pthread_key_create); +__weak_reference(_pthread_key_delete, pthread_key_delete); +__weak_reference(_pthread_getspecific, pthread_getspecific); +__weak_reference(_pthread_setspecific, pthread_setspecific); int diff --git a/lib/libkse/thread/thr_suspend_np.c b/lib/libkse/thread/thr_suspend_np.c index 5c204a2..082f88b 100644 --- a/lib/libkse/thread/thr_suspend_np.c +++ b/lib/libkse/thread/thr_suspend_np.c @@ -37,7 +37,7 @@ static void finish_suspension(void *arg); -#pragma weak pthread_suspend_np=_pthread_suspend_np +__weak_reference(_pthread_suspend_np, pthread_suspend_np); /* Suspend a thread: */ int diff --git a/lib/libkse/thread/thr_switch_np.c b/lib/libkse/thread/thr_switch_np.c index e999259..f24d99f 100644 --- a/lib/libkse/thread/thr_switch_np.c +++ b/lib/libkse/thread/thr_switch_np.c @@ -37,8 +37,8 @@ #include "pthread_private.h" -#pragma weak pthread_switch_add_np=_pthread_switch_add_np -#pragma weak pthread_switch_delete_np=_pthread_switch_delete_np +__weak_reference(_pthread_switch_add_np, pthread_switch_add_np); +__weak_reference(_pthread_switch_delete_np, pthread_switch_delete_np); int _pthread_switch_add_np(pthread_switch_routine_t routine) diff --git a/lib/libkse/thread/thr_system.c b/lib/libkse/thread/thr_system.c index d3a16cb..d63969b 100644 --- a/lib/libkse/thread/thr_system.c +++ b/lib/libkse/thread/thr_system.c @@ -33,7 +33,7 @@ #include <pthread.h> #include "pthread_private.h" -#pragma weak system=_system +__weak_reference(_system, system); int _system(const char *string) diff --git a/lib/libkse/thread/thr_tcdrain.c b/lib/libkse/thread/thr_tcdrain.c index 7700791..272bdf6 100644 --- a/lib/libkse/thread/thr_tcdrain.c +++ b/lib/libkse/thread/thr_tcdrain.c @@ -33,7 +33,7 @@ #include <pthread.h> #include "pthread_private.h" -#pragma weak tcdrain=_tcdrain +__weak_reference(_tcdrain, tcdrain); int _tcdrain(int fd) diff --git a/lib/libkse/thread/thr_vfork.c b/lib/libkse/thread/thr_vfork.c index 78d9f01..dbefc65 100644 --- a/lib/libkse/thread/thr_vfork.c +++ b/lib/libkse/thread/thr_vfork.c @@ -3,7 +3,7 @@ */ #include <unistd.h> -#pragma weak vfork=_vfork +__weak_reference(_vfork, vfork); int _vfork(void) diff --git a/lib/libkse/thread/thr_wait.c b/lib/libkse/thread/thr_wait.c index 9482586..e61138b 100644 --- a/lib/libkse/thread/thr_wait.c +++ b/lib/libkse/thread/thr_wait.c @@ -32,7 +32,7 @@ #include <pthread.h> #include "pthread_private.h" -#pragma weak wait=_wait +__weak_reference(_wait, wait); pid_t _wait(int *istat) diff --git a/lib/libkse/thread/thr_wait4.c b/lib/libkse/thread/thr_wait4.c index 8b44366..6c4e068 100644 --- a/lib/libkse/thread/thr_wait4.c +++ b/lib/libkse/thread/thr_wait4.c @@ -38,7 +38,7 @@ #include <pthread.h> #include "pthread_private.h" -#pragma weak wait4=_wait4 +__weak_reference(_wait4, wait4); pid_t _wait4(pid_t pid, int *istat, int options, struct rusage * rusage) diff --git a/lib/libkse/thread/thr_waitpid.c b/lib/libkse/thread/thr_waitpid.c index 672183d..fcbbc9f 100644 --- a/lib/libkse/thread/thr_waitpid.c +++ b/lib/libkse/thread/thr_waitpid.c @@ -34,7 +34,7 @@ #include <pthread.h> #include "pthread_private.h" -#pragma weak waitpid=_waitpid +__weak_reference(_waitpid, waitpid); pid_t _waitpid(pid_t wpid, int *status, int options) diff --git a/lib/libkse/thread/thr_write.c b/lib/libkse/thread/thr_write.c index b841726..e655a34 100644 --- a/lib/libkse/thread/thr_write.c +++ b/lib/libkse/thread/thr_write.c @@ -40,7 +40,7 @@ #include <pthread.h> #include "pthread_private.h" -#pragma weak write=__write +__weak_reference(__write, write); ssize_t _write(int fd, const void *buf, size_t nbytes) diff --git a/lib/libkse/thread/thr_writev.c b/lib/libkse/thread/thr_writev.c index 66b451f..c084cd0 100644 --- a/lib/libkse/thread/thr_writev.c +++ b/lib/libkse/thread/thr_writev.c @@ -42,7 +42,7 @@ #include <pthread.h> #include "pthread_private.h" -#pragma weak writev=_writev +__weak_reference(_writev, writev); ssize_t _writev(int fd, const struct iovec * iov, int iovcnt) diff --git a/lib/libkse/thread/thr_yield.c b/lib/libkse/thread/thr_yield.c index 67ca501..ec89255 100644 --- a/lib/libkse/thread/thr_yield.c +++ b/lib/libkse/thread/thr_yield.c @@ -34,8 +34,8 @@ #include <pthread.h> #include "pthread_private.h" -#pragma weak sched_yield=_sched_yield -#pragma weak pthread_yield=_pthread_yield +__weak_reference(_sched_yield, sched_yield); +__weak_reference(_pthread_yield, pthread_yield); int _sched_yield(void) |