1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-12 09:58:36 +00:00

Track libc's three-tier symbol naming. libc_r must currently implement

the _libc_*() entry points and add *() weak aliases.  This will all
change for the better when libc_r becomes libpthread.
This commit is contained in:
Jason Evans 2000-01-12 09:28:58 +00:00
parent 929273386f
commit f560c4e709
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=55838
106 changed files with 312 additions and 124 deletions

View File

@ -41,7 +41,7 @@
#include "pthread_private.h" #include "pthread_private.h"
int int
accept(int fd, struct sockaddr * name, socklen_t *namelen) _libc_accept(int fd, struct sockaddr * name, socklen_t *namelen)
{ {
int ret; int ret;
@ -106,4 +106,6 @@ accept(int fd, struct sockaddr * name, socklen_t *namelen)
/* Return the socket file descriptor or -1 on error: */ /* Return the socket file descriptor or -1 on error: */
return (ret); return (ret);
} }
__weak_reference(_libc_accept, accept);
#endif #endif

View File

@ -36,7 +36,8 @@
#include <pthread.h> #include <pthread.h>
#include "pthread_private.h" #include "pthread_private.h"
int pthread_attr_setdetachstate(pthread_attr_t *attr, int detachstate) int
pthread_attr_setdetachstate(pthread_attr_t *attr, int detachstate)
{ {
int ret; int ret;

View File

@ -36,7 +36,8 @@
#include <pthread.h> #include <pthread.h>
#include "pthread_private.h" #include "pthread_private.h"
int pthread_attr_setprio(pthread_attr_t *attr, int priority) int
pthread_attr_setprio(pthread_attr_t *attr, int priority)
{ {
int ret; int ret;
if (attr == NULL || *attr == NULL) { if (attr == NULL || *attr == NULL) {

View File

@ -36,7 +36,8 @@
#include <pthread.h> #include <pthread.h>
#include "pthread_private.h" #include "pthread_private.h"
int pthread_attr_setstackaddr(pthread_attr_t *attr, void *stackaddr) int
pthread_attr_setstackaddr(pthread_attr_t *attr, void *stackaddr)
{ {
int ret; int ret;

View File

@ -36,7 +36,8 @@
#include <pthread.h> #include <pthread.h>
#include "pthread_private.h" #include "pthread_private.h"
int pthread_attr_setstacksize(pthread_attr_t *attr, size_t stacksize) int
pthread_attr_setstacksize(pthread_attr_t *attr, size_t stacksize)
{ {
int ret; int ret;

View File

@ -38,7 +38,7 @@
#include "pthread_private.h" #include "pthread_private.h"
int int
bind(int fd, const struct sockaddr * name, socklen_t namelen) _libc_bind(int fd, const struct sockaddr * name, socklen_t namelen)
{ {
int ret; int ret;
@ -48,4 +48,6 @@ bind(int fd, const struct sockaddr * name, socklen_t namelen)
} }
return (ret); return (ret);
} }
__weak_reference(_libc_bind, bind);
#endif #endif

View File

@ -41,7 +41,7 @@
#include "pthread_private.h" #include "pthread_private.h"
int int
close(int fd) _libc_close(int fd)
{ {
int flags; int flags;
int ret; int ret;
@ -102,4 +102,6 @@ close(int fd)
_thread_leave_cancellation_point(); _thread_leave_cancellation_point();
return (ret); return (ret);
} }
__weak_reference(_libc_close, close);
#endif #endif

View File

@ -40,7 +40,7 @@
#include "pthread_private.h" #include "pthread_private.h"
int int
connect(int fd, const struct sockaddr * name, socklen_t namelen) _libc_connect(int fd, const struct sockaddr * name, socklen_t namelen)
{ {
struct sockaddr tmpname; struct sockaddr tmpname;
int errnolen, ret, tmpnamelen; int errnolen, ret, tmpnamelen;
@ -75,4 +75,6 @@ connect(int fd, const struct sockaddr * name, socklen_t namelen)
} }
return (ret); return (ret);
} }
__weak_reference(_libc_connect, connect);
#endif #endif

View File

@ -37,7 +37,7 @@
#include "pthread_private.h" #include "pthread_private.h"
int int
dup(int fd) _libc_dup(int fd)
{ {
int ret; int ret;
@ -67,4 +67,6 @@ dup(int fd)
/* Return the completion status: */ /* Return the completion status: */
return (ret); return (ret);
} }
__weak_reference(_libc_dup, dup);
#endif #endif

View File

@ -38,7 +38,7 @@
#include "pthread_private.h" #include "pthread_private.h"
int int
dup2(int fd, int newfd) _libc_dup2(int fd, int newfd)
{ {
int ret; int ret;
int newfd_opened; int newfd_opened;
@ -83,4 +83,6 @@ dup2(int fd, int newfd)
/* Return the completion status: */ /* Return the completion status: */
return (ret); return (ret);
} }
__weak_reference(_libc_dup2, dup2);
#endif #endif

View File

@ -39,7 +39,7 @@
#include "pthread_private.h" #include "pthread_private.h"
int int
execve(const char *name, char *const * argv, char *const * envp) _libc_execve(const char *name, char *const * argv, char *const * envp)
{ {
int flags; int flags;
int i; int i;
@ -110,4 +110,6 @@ execve(const char *name, char *const * argv, char *const * envp)
/* Return the completion status: */ /* Return the completion status: */
return (ret); return (ret);
} }
__weak_reference(_libc_execve, execve);
#endif #endif

View File

@ -41,7 +41,7 @@
#include <pthread.h> #include <pthread.h>
#include "pthread_private.h" #include "pthread_private.h"
void _exit(int status) void _libc__exit(int status)
{ {
int flags; int flags;
int i; int i;
@ -77,6 +77,8 @@ void _exit(int status)
_thread_sys__exit(status); _thread_sys__exit(status);
} }
__weak_reference(_libc__exit, _exit);
void void
_thread_exit(char *fname, int lineno, char *string) _thread_exit(char *fname, int lineno, char *string)
{ {

View File

@ -12,7 +12,7 @@
#include "pthread_private.h" #include "pthread_private.h"
int int
fchflags(int fd, u_long flags) _libc_fchflags(int fd, u_long flags)
{ {
int ret; int ret;
@ -22,4 +22,6 @@ fchflags(int fd, u_long flags)
} }
return (ret); return (ret);
} }
__weak_reference(_libc_fchflags, fchflags);
#endif #endif

View File

@ -38,7 +38,7 @@
#include "pthread_private.h" #include "pthread_private.h"
int int
fchmod(int fd, mode_t mode) _libc_fchmod(int fd, mode_t mode)
{ {
int ret; int ret;
@ -48,4 +48,6 @@ fchmod(int fd, mode_t mode)
} }
return (ret); return (ret);
} }
__weak_reference(_libc_fchmod, fchmod);
#endif #endif

View File

@ -39,7 +39,7 @@
#include "pthread_private.h" #include "pthread_private.h"
int int
fchown(int fd, uid_t owner, gid_t group) _libc_fchown(int fd, uid_t owner, gid_t group)
{ {
int ret; int ret;
@ -49,4 +49,6 @@ fchown(int fd, uid_t owner, gid_t group)
} }
return (ret); return (ret);
} }
__weak_reference(_libc_fchown, fchown);
#endif #endif

View File

@ -39,7 +39,7 @@
#include "pthread_private.h" #include "pthread_private.h"
int int
fcntl(int fd, int cmd,...) _libc_fcntl(int fd, int cmd,...)
{ {
int flags = 0; int flags = 0;
int nonblock; int nonblock;
@ -142,4 +142,6 @@ fcntl(int fd, int cmd,...)
/* Return the completion status: */ /* Return the completion status: */
return (ret); return (ret);
} }
__weak_reference(_libc_fcntl, fcntl);
#endif #endif

View File

@ -37,7 +37,7 @@
#include "pthread_private.h" #include "pthread_private.h"
int int
flock(int fd, int operation) _libc_flock(int fd, int operation)
{ {
int ret; int ret;
@ -47,4 +47,6 @@ flock(int fd, int operation)
} }
return (ret); return (ret);
} }
__weak_reference(_libc_flock, flock);
#endif #endif

View File

@ -41,7 +41,7 @@
#include "pthread_private.h" #include "pthread_private.h"
pid_t pid_t
fork(void) _libc_fork(void)
{ {
int i, flags; int i, flags;
pid_t ret; pid_t ret;
@ -220,4 +220,6 @@ fork(void)
/* Return the process ID: */ /* Return the process ID: */
return (ret); return (ret);
} }
__weak_reference(_libc_fork, fork);
#endif #endif

View File

@ -42,7 +42,7 @@
#include "pthread_private.h" #include "pthread_private.h"
int int
fstat(int fd, struct stat * buf) _libc_fstat(int fd, struct stat * buf)
{ {
int ret; int ret;
@ -55,4 +55,6 @@ fstat(int fd, struct stat * buf)
} }
return (ret); return (ret);
} }
__weak_reference(_libc_fstat, fstat);
#endif #endif

View File

@ -42,7 +42,7 @@
#include "pthread_private.h" #include "pthread_private.h"
int int
fstatfs(int fd, struct statfs * buf) _libc_fstatfs(int fd, struct statfs * buf)
{ {
int ret; int ret;
@ -55,4 +55,6 @@ fstatfs(int fd, struct statfs * buf)
} }
return (ret); return (ret);
} }
__weak_reference(_libc_fstatfs, fstatfs);
#endif #endif

View File

@ -37,7 +37,7 @@
#include "pthread_private.h" #include "pthread_private.h"
int int
fsync(int fd) _libc_fsync(int fd)
{ {
int ret; int ret;
@ -49,4 +49,6 @@ fsync(int fd)
_thread_leave_cancellation_point(); _thread_leave_cancellation_point();
return (ret); return (ret);
} }
__weak_reference(_libc_fsync, fsync);
#endif #endif

View File

@ -38,7 +38,7 @@
#include "pthread_private.h" #include "pthread_private.h"
int int
getdirentries(int fd, char *buf, int nbytes, long *basep) _libc_getdirentries(int fd, char *buf, int nbytes, long *basep)
{ {
int ret; int ret;
@ -48,4 +48,6 @@ getdirentries(int fd, char *buf, int nbytes, long *basep)
} }
return (ret); return (ret);
} }
__weak_reference(_libc_getdirentries, getdirentries);
#endif #endif

View File

@ -38,7 +38,7 @@
#include "pthread_private.h" #include "pthread_private.h"
int int
getpeername(int fd, struct sockaddr * peer, socklen_t *paddrlen) _libc_getpeername(int fd, struct sockaddr * peer, socklen_t *paddrlen)
{ {
int ret; int ret;
@ -48,4 +48,6 @@ getpeername(int fd, struct sockaddr * peer, socklen_t *paddrlen)
} }
return ret; return ret;
} }
__weak_reference(_libc_getpeername, getpeername);
#endif #endif

View File

@ -38,7 +38,7 @@
#include "pthread_private.h" #include "pthread_private.h"
int int
getsockname(int s, struct sockaddr * name, socklen_t *namelen) _libc_getsockname(int s, struct sockaddr * name, socklen_t *namelen)
{ {
int ret; int ret;
@ -48,4 +48,6 @@ getsockname(int s, struct sockaddr * name, socklen_t *namelen)
} }
return ret; return ret;
} }
__weak_reference(_libc_getsockname, getsockname);
#endif #endif

View File

@ -38,7 +38,8 @@
#include "pthread_private.h" #include "pthread_private.h"
int int
getsockopt(int fd, int level, int optname, void *optval, socklen_t *optlen) _libc_getsockopt(int fd, int level, int optname, void *optval, socklen_t
*optlen)
{ {
int ret; int ret;
@ -48,4 +49,6 @@ getsockopt(int fd, int level, int optname, void *optval, socklen_t *optlen)
} }
return ret; return ret;
} }
__weak_reference(_libc_getsockopt, getsockopt);
#endif #endif

View File

@ -39,7 +39,7 @@
#include "pthread_private.h" #include "pthread_private.h"
int int
ioctl(int fd, unsigned long request,...) _libc_ioctl(int fd, unsigned long request,...)
{ {
int ret; int ret;
int *op; int *op;
@ -76,4 +76,6 @@ ioctl(int fd, unsigned long request,...)
/* Return the completion status: */ /* Return the completion status: */
return (ret); return (ret);
} }
__weak_reference(_libc_ioctl, ioctl);
#endif #endif

View File

@ -38,7 +38,7 @@
#include "pthread_private.h" #include "pthread_private.h"
int int
listen(int fd, int backlog) _libc_listen(int fd, int backlog)
{ {
int ret; int ret;
@ -48,4 +48,6 @@ listen(int fd, int backlog)
} }
return (ret); return (ret);
} }
__weak_reference(_libc_listen, listen);
#endif #endif

View File

@ -13,7 +13,7 @@
#include "pthread_private.h" #include "pthread_private.h"
int int
msync(addr, len, flags) _libc_msync(addr, len, flags)
void *addr; void *addr;
size_t len; size_t len;
int flags; int flags;
@ -37,4 +37,6 @@ msync(addr, len, flags)
return (ret); return (ret);
} }
__weak_reference(_libc_msync, msync);
#endif #endif

View File

@ -36,7 +36,8 @@
#include <pthread.h> #include <pthread.h>
#include "pthread_private.h" #include "pthread_private.h"
int pthread_multi_np() int
pthread_multi_np()
{ {
/* Return to multi-threaded scheduling mode: */ /* Return to multi-threaded scheduling mode: */
_thread_single = NULL; _thread_single = NULL;

View File

@ -243,7 +243,7 @@ pthread_mutex_destroy(pthread_mutex_t * mutex)
} }
static int static int
init_static (pthread_mutex_t *mutex) init_static(pthread_mutex_t *mutex)
{ {
int ret; int ret;
@ -1219,7 +1219,7 @@ mutex_priority_adjust(pthread_mutex_t mutex)
} }
static void static void
mutex_rescan_owned (pthread_t pthread, pthread_mutex_t mutex) mutex_rescan_owned(pthread_t pthread, pthread_mutex_t mutex)
{ {
int active_prio, inherited_prio; int active_prio, inherited_prio;
pthread_mutex_t m; pthread_mutex_t m;

View File

@ -37,7 +37,8 @@
#include <pthread.h> #include <pthread.h>
#include "pthread_private.h" #include "pthread_private.h"
int pthread_mutexattr_destroy(pthread_mutexattr_t *attr) int
pthread_mutexattr_destroy(pthread_mutexattr_t *attr)
{ {
int ret; int ret;
if (attr == NULL || *attr == NULL) { if (attr == NULL || *attr == NULL) {

View File

@ -38,8 +38,8 @@
#include "pthread_private.h" #include "pthread_private.h"
int int
nanosleep(const struct timespec * time_to_sleep, _libc_nanosleep(const struct timespec * time_to_sleep,
struct timespec * time_remaining) struct timespec * time_remaining)
{ {
int ret = 0; int ret = 0;
struct timespec current_time; struct timespec current_time;
@ -120,4 +120,6 @@ nanosleep(const struct timespec * time_to_sleep,
_thread_leave_cancellation_point(); _thread_leave_cancellation_point();
return (ret); return (ret);
} }
__weak_reference(_libc_nanosleep, nanosleep);
#endif #endif

View File

@ -42,7 +42,7 @@
#include "pthread_private.h" #include "pthread_private.h"
int int
open(const char *path, int flags,...) _libc_open(const char *path, int flags,...)
{ {
int fd; int fd;
int mode = 0; int mode = 0;
@ -74,4 +74,6 @@ open(const char *path, int flags,...)
/* Return the file descriptor or -1 on error: */ /* Return the file descriptor or -1 on error: */
return (fd); return (fd);
} }
__weak_reference(_libc_open, open);
#endif #endif

View File

@ -38,7 +38,7 @@
#include "pthread_private.h" #include "pthread_private.h"
int int
pipe(int fds[2]) _libc_pipe(int fds[2])
{ {
int ret; int ret;
if ((ret = _thread_sys_pipe(fds)) >= 0) { if ((ret = _thread_sys_pipe(fds)) >= 0) {
@ -51,4 +51,6 @@ pipe(int fds[2])
} }
return (ret); return (ret);
} }
__weak_reference(_libc_pipe, pipe);
#endif #endif

View File

@ -44,7 +44,7 @@
int int
poll(struct pollfd *fds, unsigned int nfds, int timeout) _libc_poll(struct pollfd *fds, unsigned int nfds, int timeout)
{ {
struct timespec ts; struct timespec ts;
int numfds = nfds; int numfds = nfds;
@ -96,4 +96,6 @@ poll(struct pollfd *fds, unsigned int nfds, int timeout)
return (ret); return (ret);
} }
__weak_reference(_libc_poll, poll);
#endif #endif

View File

@ -42,7 +42,7 @@
#include "pthread_private.h" #include "pthread_private.h"
ssize_t ssize_t
read(int fd, void *buf, size_t nbytes) _libc_read(int fd, void *buf, size_t nbytes)
{ {
int ret; int ret;
int type; int type;
@ -100,4 +100,6 @@ read(int fd, void *buf, size_t nbytes)
_thread_leave_cancellation_point(); _thread_leave_cancellation_point();
return (ret); return (ret);
} }
__weak_reference(_libc_read, read);
#endif #endif

View File

@ -42,7 +42,7 @@
#include "pthread_private.h" #include "pthread_private.h"
ssize_t ssize_t
readv(int fd, const struct iovec * iov, int iovcnt) _libc_readv(int fd, const struct iovec * iov, int iovcnt)
{ {
int ret; int ret;
int type; int type;
@ -90,4 +90,6 @@ readv(int fd, const struct iovec * iov, int iovcnt)
} }
return (ret); return (ret);
} }
__weak_reference(_libc_readv, readv);
#endif #endif

View File

@ -40,7 +40,8 @@
#include "pthread_private.h" #include "pthread_private.h"
ssize_t ssize_t
recvfrom(int fd, void *buf, size_t len, int flags, struct sockaddr * from, socklen_t *from_len) _libc_recvfrom(int fd, void *buf, size_t len, int flags, struct sockaddr * from,
socklen_t *from_len)
{ {
int ret; int ret;
@ -70,4 +71,6 @@ recvfrom(int fd, void *buf, size_t len, int flags, struct sockaddr * from, sockl
} }
return (ret); return (ret);
} }
__weak_reference(_libc_recvfrom, recvfrom);
#endif #endif

View File

@ -40,7 +40,7 @@
#include "pthread_private.h" #include "pthread_private.h"
ssize_t ssize_t
recvmsg(int fd, struct msghdr *msg, int flags) _libc_recvmsg(int fd, struct msghdr *msg, int flags)
{ {
int ret; int ret;
@ -70,4 +70,6 @@ recvmsg(int fd, struct msghdr *msg, int flags)
} }
return (ret); return (ret);
} }
__weak_reference(_libc_recvmsg, recvmsg);
#endif #endif

View File

@ -34,7 +34,7 @@
#include "pthread_private.h" #include "pthread_private.h"
int int
pthread_rwlockattr_destroy (pthread_rwlockattr_t *rwlockattr) pthread_rwlockattr_destroy(pthread_rwlockattr_t *rwlockattr)
{ {
pthread_rwlockattr_t prwlockattr; pthread_rwlockattr_t prwlockattr;
@ -52,7 +52,7 @@ pthread_rwlockattr_destroy (pthread_rwlockattr_t *rwlockattr)
} }
int int
pthread_rwlockattr_getpshared (const pthread_rwlockattr_t *rwlockattr, pthread_rwlockattr_getpshared(const pthread_rwlockattr_t *rwlockattr,
int *pshared) int *pshared)
{ {
*pshared = (*rwlockattr)->pshared; *pshared = (*rwlockattr)->pshared;
@ -61,7 +61,7 @@ pthread_rwlockattr_getpshared (const pthread_rwlockattr_t *rwlockattr,
} }
int int
pthread_rwlockattr_init (pthread_rwlockattr_t *rwlockattr) pthread_rwlockattr_init(pthread_rwlockattr_t *rwlockattr)
{ {
pthread_rwlockattr_t prwlockattr; pthread_rwlockattr_t prwlockattr;
@ -81,7 +81,7 @@ pthread_rwlockattr_init (pthread_rwlockattr_t *rwlockattr)
} }
int int
pthread_rwlockattr_setpshared (pthread_rwlockattr_t *rwlockattr, int pshared) pthread_rwlockattr_setpshared(pthread_rwlockattr_t *rwlockattr, int pshared)
{ {
/* Only PTHREAD_PROCESS_PRIVATE is supported. */ /* Only PTHREAD_PROCESS_PRIVATE is supported. */
if (pshared != PTHREAD_PROCESS_PRIVATE) if (pshared != PTHREAD_PROCESS_PRIVATE)

View File

@ -45,8 +45,8 @@
#include "pthread_private.h" #include "pthread_private.h"
int int
select(int numfds, fd_set * readfds, fd_set * writefds, _libc_select(int numfds, fd_set * readfds, fd_set * writefds, fd_set *
fd_set * exceptfds, struct timeval * timeout) exceptfds, struct timeval * timeout)
{ {
struct timespec ts; struct timespec ts;
int i, ret = 0, f_wait = 1; int i, ret = 0, f_wait = 1;
@ -203,4 +203,6 @@ select(int numfds, fd_set * readfds, fd_set * writefds,
return (ret); return (ret);
} }
__weak_reference(_libc_select, select);
#endif #endif

View File

@ -40,7 +40,7 @@
#include "pthread_private.h" #include "pthread_private.h"
ssize_t ssize_t
sendmsg(int fd, const struct msghdr *msg, int flags) _libc_sendmsg(int fd, const struct msghdr *msg, int flags)
{ {
int ret; int ret;
@ -69,4 +69,6 @@ sendmsg(int fd, const struct msghdr *msg, int flags)
} }
return (ret); return (ret);
} }
__weak_reference(_libc_sendmsg, sendmsg);
#endif #endif

View File

@ -40,7 +40,8 @@
#include "pthread_private.h" #include "pthread_private.h"
ssize_t ssize_t
sendto(int fd, const void *msg, size_t len, int flags, const struct sockaddr * to, socklen_t to_len) _libc_sendto(int fd, const void *msg, size_t len, int flags, const struct
sockaddr * to, socklen_t to_len)
{ {
int ret; int ret;
@ -69,4 +70,6 @@ sendto(int fd, const void *msg, size_t len, int flags, const struct sockaddr * t
} }
return (ret); return (ret);
} }
__weak_reference(_libc_sendto, sendto);
#endif #endif

View File

@ -38,7 +38,8 @@
#include "pthread_private.h" #include "pthread_private.h"
int int
setsockopt(int fd, int level, int optname, const void *optval, socklen_t optlen) _libc_setsockopt(int fd, int level, int optname, const void *optval, socklen_t
optlen)
{ {
int ret; int ret;
@ -48,4 +49,6 @@ setsockopt(int fd, int level, int optname, const void *optval, socklen_t optlen)
} }
return ret; return ret;
} }
__weak_reference(_libc_setsockopt, setsockopt);
#endif #endif

View File

@ -39,7 +39,7 @@
#include "pthread_private.h" #include "pthread_private.h"
int int
shutdown(int fd, int how) _libc_shutdown(int fd, int how)
{ {
int ret; int ret;
@ -69,4 +69,6 @@ shutdown(int fd, int how)
} }
return (ret); return (ret);
} }
__weak_reference(_libc_shutdown, shutdown);
#endif #endif

View File

@ -38,7 +38,7 @@
#include "pthread_private.h" #include "pthread_private.h"
int int
sigaction(int sig, const struct sigaction * act, struct sigaction * oact) _libc_sigaction(int sig, const struct sigaction * act, struct sigaction * oact)
{ {
int ret = 0; int ret = 0;
struct sigaction gact; struct sigaction gact;
@ -105,4 +105,6 @@ sigaction(int sig, const struct sigaction * act, struct sigaction * oact)
/* Return the completion status: */ /* Return the completion status: */
return (ret); return (ret);
} }
__weak_reference(_libc_sigaction, sigaction);
#endif #endif

View File

@ -38,7 +38,7 @@
#include "pthread_private.h" #include "pthread_private.h"
int int
sigpending(sigset_t * set) _libc_sigpending(sigset_t * set)
{ {
int ret = 0; int ret = 0;
@ -53,4 +53,6 @@ sigpending(sigset_t * set)
/* Return the completion status: */ /* Return the completion status: */
return (ret); return (ret);
} }
__weak_reference(_libc_sigpending, sigpending);
#endif #endif

View File

@ -41,7 +41,7 @@
#include "pthread_private.h" #include "pthread_private.h"
int int
sigprocmask(int how, const sigset_t * set, sigset_t * oset) _libc_sigprocmask(int how, const sigset_t * set, sigset_t * oset)
{ {
int ret = 0; int ret = 0;
@ -89,4 +89,6 @@ sigprocmask(int how, const sigset_t * set, sigset_t * oset)
/* Return the completion status: */ /* Return the completion status: */
return (ret); return (ret);
} }
__weak_reference(_libc_sigprocmask, sigprocmask);
#endif #endif

View File

@ -38,7 +38,7 @@
#include "pthread_private.h" #include "pthread_private.h"
int int
sigsuspend(const sigset_t * set) _libc_sigsuspend(const sigset_t * set)
{ {
int ret = -1; int ret = -1;
sigset_t oset; sigset_t oset;
@ -67,4 +67,6 @@ sigsuspend(const sigset_t * set)
/* Return the completion status: */ /* Return the completion status: */
return (ret); return (ret);
} }
__weak_reference(_libc_sigsuspend, sigsuspend);
#endif #endif

View File

@ -40,7 +40,7 @@
#include "pthread_private.h" #include "pthread_private.h"
int int
socket(int af, int type, int protocol) _libc_socket(int af, int type, int protocol)
{ {
int fd; int fd;
@ -55,4 +55,6 @@ socket(int af, int type, int protocol)
} }
return (fd); return (fd);
} }
__weak_reference(_libc_socket, socket);
#endif #endif

View File

@ -41,7 +41,7 @@
#include "pthread_private.h" #include "pthread_private.h"
int int
socketpair(int af, int type, int protocol, int pair[2]) _libc_socketpair(int af, int type, int protocol, int pair[2])
{ {
int ret; int ret;
if (!((ret = _thread_sys_socketpair(af, type, protocol, pair)) < 0)) if (!((ret = _thread_sys_socketpair(af, type, protocol, pair)) < 0))
@ -53,4 +53,6 @@ socketpair(int af, int type, int protocol, int pair[2])
} }
return (ret); return (ret);
} }
__weak_reference(_libc_socketpair, socketpair);
#endif #endif

View File

@ -38,7 +38,7 @@
#include "pthread_private.h" #include "pthread_private.h"
pid_t pid_t
wait4(pid_t pid, int *istat, int options, struct rusage * rusage) _libc_wait4(pid_t pid, int *istat, int options, struct rusage * rusage)
{ {
pid_t ret; pid_t ret;
@ -66,4 +66,6 @@ wait4(pid_t pid, int *istat, int options, struct rusage * rusage)
return (ret); return (ret);
} }
__weak_reference(_libc_wait4, wait4);
#endif #endif

View File

@ -42,7 +42,7 @@
#include "pthread_private.h" #include "pthread_private.h"
ssize_t ssize_t
write(int fd, const void *buf, size_t nbytes) _libc_write(int fd, const void *buf, size_t nbytes)
{ {
int blocking; int blocking;
int type; int type;
@ -136,4 +136,6 @@ write(int fd, const void *buf, size_t nbytes)
_thread_leave_cancellation_point(); _thread_leave_cancellation_point();
return (ret); return (ret);
} }
__weak_reference(_libc_write, write);
#endif #endif

View File

@ -44,7 +44,7 @@
#include "pthread_private.h" #include "pthread_private.h"
ssize_t ssize_t
writev(int fd, const struct iovec * iov, int iovcnt) _libc_writev(int fd, const struct iovec * iov, int iovcnt)
{ {
int blocking; int blocking;
int idx = 0; int idx = 0;
@ -200,4 +200,6 @@ writev(int fd, const struct iovec * iov, int iovcnt)
return (ret); return (ret);
} }
__weak_reference(_libc_writev, writev);
#endif #endif

View File

@ -36,7 +36,8 @@
#include <pthread.h> #include <pthread.h>
#include "pthread_private.h" #include "pthread_private.h"
int pthread_attr_setdetachstate(pthread_attr_t *attr, int detachstate) int
pthread_attr_setdetachstate(pthread_attr_t *attr, int detachstate)
{ {
int ret; int ret;

View File

@ -36,7 +36,8 @@
#include <pthread.h> #include <pthread.h>
#include "pthread_private.h" #include "pthread_private.h"
int pthread_attr_setstackaddr(pthread_attr_t *attr, void *stackaddr) int
pthread_attr_setstackaddr(pthread_attr_t *attr, void *stackaddr)
{ {
int ret; int ret;

View File

@ -36,7 +36,8 @@
#include <pthread.h> #include <pthread.h>
#include "pthread_private.h" #include "pthread_private.h"
int pthread_attr_setstacksize(pthread_attr_t *attr, size_t stacksize) int
pthread_attr_setstacksize(pthread_attr_t *attr, size_t stacksize)
{ {
int ret; int ret;

View File

@ -41,7 +41,7 @@
#include "pthread_private.h" #include "pthread_private.h"
int int
close(int fd) _libc_close(int fd)
{ {
int flags; int flags;
int ret; int ret;
@ -102,4 +102,6 @@ close(int fd)
_thread_leave_cancellation_point(); _thread_leave_cancellation_point();
return (ret); return (ret);
} }
__weak_reference(_libc_close, close);
#endif #endif

View File

@ -41,7 +41,7 @@
#include <pthread.h> #include <pthread.h>
#include "pthread_private.h" #include "pthread_private.h"
void _exit(int status) void _libc__exit(int status)
{ {
int flags; int flags;
int i; int i;
@ -77,6 +77,8 @@ void _exit(int status)
_thread_sys__exit(status); _thread_sys__exit(status);
} }
__weak_reference(_libc__exit, _exit);
void void
_thread_exit(char *fname, int lineno, char *string) _thread_exit(char *fname, int lineno, char *string)
{ {

View File

@ -39,7 +39,7 @@
#include "pthread_private.h" #include "pthread_private.h"
int int
fcntl(int fd, int cmd,...) _libc_fcntl(int fd, int cmd,...)
{ {
int flags = 0; int flags = 0;
int nonblock; int nonblock;
@ -142,4 +142,6 @@ fcntl(int fd, int cmd,...)
/* Return the completion status: */ /* Return the completion status: */
return (ret); return (ret);
} }
__weak_reference(_libc_fcntl, fcntl);
#endif #endif

View File

@ -41,7 +41,7 @@
#include "pthread_private.h" #include "pthread_private.h"
pid_t pid_t
fork(void) _libc_fork(void)
{ {
int i, flags; int i, flags;
pid_t ret; pid_t ret;
@ -220,4 +220,6 @@ fork(void)
/* Return the process ID: */ /* Return the process ID: */
return (ret); return (ret);
} }
__weak_reference(_libc_fork, fork);
#endif #endif

View File

@ -37,7 +37,7 @@
#include "pthread_private.h" #include "pthread_private.h"
int int
fsync(int fd) _libc_fsync(int fd)
{ {
int ret; int ret;
@ -49,4 +49,6 @@ fsync(int fd)
_thread_leave_cancellation_point(); _thread_leave_cancellation_point();
return (ret); return (ret);
} }
__weak_reference(_libc_fsync, fsync);
#endif #endif

View File

@ -13,7 +13,7 @@
#include "pthread_private.h" #include "pthread_private.h"
int int
msync(addr, len, flags) _libc_msync(addr, len, flags)
void *addr; void *addr;
size_t len; size_t len;
int flags; int flags;
@ -37,4 +37,6 @@ msync(addr, len, flags)
return (ret); return (ret);
} }
__weak_reference(_libc_msync, msync);
#endif #endif

View File

@ -36,7 +36,8 @@
#include <pthread.h> #include <pthread.h>
#include "pthread_private.h" #include "pthread_private.h"
int pthread_multi_np() int
pthread_multi_np()
{ {
/* Return to multi-threaded scheduling mode: */ /* Return to multi-threaded scheduling mode: */
_thread_single = NULL; _thread_single = NULL;

View File

@ -243,7 +243,7 @@ pthread_mutex_destroy(pthread_mutex_t * mutex)
} }
static int static int
init_static (pthread_mutex_t *mutex) init_static(pthread_mutex_t *mutex)
{ {
int ret; int ret;
@ -1219,7 +1219,7 @@ mutex_priority_adjust(pthread_mutex_t mutex)
} }
static void static void
mutex_rescan_owned (pthread_t pthread, pthread_mutex_t mutex) mutex_rescan_owned(pthread_t pthread, pthread_mutex_t mutex)
{ {
int active_prio, inherited_prio; int active_prio, inherited_prio;
pthread_mutex_t m; pthread_mutex_t m;

View File

@ -37,7 +37,8 @@
#include <pthread.h> #include <pthread.h>
#include "pthread_private.h" #include "pthread_private.h"
int pthread_mutexattr_destroy(pthread_mutexattr_t *attr) int
pthread_mutexattr_destroy(pthread_mutexattr_t *attr)
{ {
int ret; int ret;
if (attr == NULL || *attr == NULL) { if (attr == NULL || *attr == NULL) {

View File

@ -38,8 +38,8 @@
#include "pthread_private.h" #include "pthread_private.h"
int int
nanosleep(const struct timespec * time_to_sleep, _libc_nanosleep(const struct timespec * time_to_sleep,
struct timespec * time_remaining) struct timespec * time_remaining)
{ {
int ret = 0; int ret = 0;
struct timespec current_time; struct timespec current_time;
@ -120,4 +120,6 @@ nanosleep(const struct timespec * time_to_sleep,
_thread_leave_cancellation_point(); _thread_leave_cancellation_point();
return (ret); return (ret);
} }
__weak_reference(_libc_nanosleep, nanosleep);
#endif #endif

View File

@ -42,7 +42,7 @@
#include "pthread_private.h" #include "pthread_private.h"
int int
open(const char *path, int flags,...) _libc_open(const char *path, int flags,...)
{ {
int fd; int fd;
int mode = 0; int mode = 0;
@ -74,4 +74,6 @@ open(const char *path, int flags,...)
/* Return the file descriptor or -1 on error: */ /* Return the file descriptor or -1 on error: */
return (fd); return (fd);
} }
__weak_reference(_libc_open, open);
#endif #endif

View File

@ -44,7 +44,7 @@
int int
poll(struct pollfd *fds, unsigned int nfds, int timeout) _libc_poll(struct pollfd *fds, unsigned int nfds, int timeout)
{ {
struct timespec ts; struct timespec ts;
int numfds = nfds; int numfds = nfds;
@ -96,4 +96,6 @@ poll(struct pollfd *fds, unsigned int nfds, int timeout)
return (ret); return (ret);
} }
__weak_reference(_libc_poll, poll);
#endif #endif

View File

@ -42,7 +42,7 @@
#include "pthread_private.h" #include "pthread_private.h"
ssize_t ssize_t
read(int fd, void *buf, size_t nbytes) _libc_read(int fd, void *buf, size_t nbytes)
{ {
int ret; int ret;
int type; int type;
@ -100,4 +100,6 @@ read(int fd, void *buf, size_t nbytes)
_thread_leave_cancellation_point(); _thread_leave_cancellation_point();
return (ret); return (ret);
} }
__weak_reference(_libc_read, read);
#endif #endif

View File

@ -42,7 +42,7 @@
#include "pthread_private.h" #include "pthread_private.h"
ssize_t ssize_t
readv(int fd, const struct iovec * iov, int iovcnt) _libc_readv(int fd, const struct iovec * iov, int iovcnt)
{ {
int ret; int ret;
int type; int type;
@ -90,4 +90,6 @@ readv(int fd, const struct iovec * iov, int iovcnt)
} }
return (ret); return (ret);
} }
__weak_reference(_libc_readv, readv);
#endif #endif

View File

@ -34,7 +34,7 @@
#include "pthread_private.h" #include "pthread_private.h"
int int
pthread_rwlockattr_destroy (pthread_rwlockattr_t *rwlockattr) pthread_rwlockattr_destroy(pthread_rwlockattr_t *rwlockattr)
{ {
pthread_rwlockattr_t prwlockattr; pthread_rwlockattr_t prwlockattr;
@ -52,7 +52,7 @@ pthread_rwlockattr_destroy (pthread_rwlockattr_t *rwlockattr)
} }
int int
pthread_rwlockattr_getpshared (const pthread_rwlockattr_t *rwlockattr, pthread_rwlockattr_getpshared(const pthread_rwlockattr_t *rwlockattr,
int *pshared) int *pshared)
{ {
*pshared = (*rwlockattr)->pshared; *pshared = (*rwlockattr)->pshared;
@ -61,7 +61,7 @@ pthread_rwlockattr_getpshared (const pthread_rwlockattr_t *rwlockattr,
} }
int int
pthread_rwlockattr_init (pthread_rwlockattr_t *rwlockattr) pthread_rwlockattr_init(pthread_rwlockattr_t *rwlockattr)
{ {
pthread_rwlockattr_t prwlockattr; pthread_rwlockattr_t prwlockattr;
@ -81,7 +81,7 @@ pthread_rwlockattr_init (pthread_rwlockattr_t *rwlockattr)
} }
int int
pthread_rwlockattr_setpshared (pthread_rwlockattr_t *rwlockattr, int pshared) pthread_rwlockattr_setpshared(pthread_rwlockattr_t *rwlockattr, int pshared)
{ {
/* Only PTHREAD_PROCESS_PRIVATE is supported. */ /* Only PTHREAD_PROCESS_PRIVATE is supported. */
if (pshared != PTHREAD_PROCESS_PRIVATE) if (pshared != PTHREAD_PROCESS_PRIVATE)

View File

@ -45,8 +45,8 @@
#include "pthread_private.h" #include "pthread_private.h"
int int
select(int numfds, fd_set * readfds, fd_set * writefds, _libc_select(int numfds, fd_set * readfds, fd_set * writefds, fd_set *
fd_set * exceptfds, struct timeval * timeout) exceptfds, struct timeval * timeout)
{ {
struct timespec ts; struct timespec ts;
int i, ret = 0, f_wait = 1; int i, ret = 0, f_wait = 1;
@ -203,4 +203,6 @@ select(int numfds, fd_set * readfds, fd_set * writefds,
return (ret); return (ret);
} }
__weak_reference(_libc_select, select);
#endif #endif

View File

@ -38,7 +38,7 @@
#include "pthread_private.h" #include "pthread_private.h"
int int
sigaction(int sig, const struct sigaction * act, struct sigaction * oact) _libc_sigaction(int sig, const struct sigaction * act, struct sigaction * oact)
{ {
int ret = 0; int ret = 0;
struct sigaction gact; struct sigaction gact;
@ -105,4 +105,6 @@ sigaction(int sig, const struct sigaction * act, struct sigaction * oact)
/* Return the completion status: */ /* Return the completion status: */
return (ret); return (ret);
} }
__weak_reference(_libc_sigaction, sigaction);
#endif #endif

View File

@ -38,7 +38,7 @@
#include "pthread_private.h" #include "pthread_private.h"
int int
sigpending(sigset_t * set) _libc_sigpending(sigset_t * set)
{ {
int ret = 0; int ret = 0;
@ -53,4 +53,6 @@ sigpending(sigset_t * set)
/* Return the completion status: */ /* Return the completion status: */
return (ret); return (ret);
} }
__weak_reference(_libc_sigpending, sigpending);
#endif #endif

View File

@ -41,7 +41,7 @@
#include "pthread_private.h" #include "pthread_private.h"
int int
sigprocmask(int how, const sigset_t * set, sigset_t * oset) _libc_sigprocmask(int how, const sigset_t * set, sigset_t * oset)
{ {
int ret = 0; int ret = 0;
@ -89,4 +89,6 @@ sigprocmask(int how, const sigset_t * set, sigset_t * oset)
/* Return the completion status: */ /* Return the completion status: */
return (ret); return (ret);
} }
__weak_reference(_libc_sigprocmask, sigprocmask);
#endif #endif

View File

@ -38,7 +38,7 @@
#include "pthread_private.h" #include "pthread_private.h"
int int
sigsuspend(const sigset_t * set) _libc_sigsuspend(const sigset_t * set)
{ {
int ret = -1; int ret = -1;
sigset_t oset; sigset_t oset;
@ -67,4 +67,6 @@ sigsuspend(const sigset_t * set)
/* Return the completion status: */ /* Return the completion status: */
return (ret); return (ret);
} }
__weak_reference(_libc_sigsuspend, sigsuspend);
#endif #endif

View File

@ -38,7 +38,7 @@
#include "pthread_private.h" #include "pthread_private.h"
pid_t pid_t
wait4(pid_t pid, int *istat, int options, struct rusage * rusage) _libc_wait4(pid_t pid, int *istat, int options, struct rusage * rusage)
{ {
pid_t ret; pid_t ret;
@ -66,4 +66,6 @@ wait4(pid_t pid, int *istat, int options, struct rusage * rusage)
return (ret); return (ret);
} }
__weak_reference(_libc_wait4, wait4);
#endif #endif

View File

@ -42,7 +42,7 @@
#include "pthread_private.h" #include "pthread_private.h"
ssize_t ssize_t
write(int fd, const void *buf, size_t nbytes) _libc_write(int fd, const void *buf, size_t nbytes)
{ {
int blocking; int blocking;
int type; int type;
@ -136,4 +136,6 @@ write(int fd, const void *buf, size_t nbytes)
_thread_leave_cancellation_point(); _thread_leave_cancellation_point();
return (ret); return (ret);
} }
__weak_reference(_libc_write, write);
#endif #endif

View File

@ -44,7 +44,7 @@
#include "pthread_private.h" #include "pthread_private.h"
ssize_t ssize_t
writev(int fd, const struct iovec * iov, int iovcnt) _libc_writev(int fd, const struct iovec * iov, int iovcnt)
{ {
int blocking; int blocking;
int idx = 0; int idx = 0;
@ -200,4 +200,6 @@ writev(int fd, const struct iovec * iov, int iovcnt)
return (ret); return (ret);
} }
__weak_reference(_libc_writev, writev);
#endif #endif

View File

@ -36,7 +36,8 @@
#include <pthread.h> #include <pthread.h>
#include "pthread_private.h" #include "pthread_private.h"
int pthread_attr_setdetachstate(pthread_attr_t *attr, int detachstate) int
pthread_attr_setdetachstate(pthread_attr_t *attr, int detachstate)
{ {
int ret; int ret;

View File

@ -36,7 +36,8 @@
#include <pthread.h> #include <pthread.h>
#include "pthread_private.h" #include "pthread_private.h"
int pthread_attr_setstackaddr(pthread_attr_t *attr, void *stackaddr) int
pthread_attr_setstackaddr(pthread_attr_t *attr, void *stackaddr)
{ {
int ret; int ret;

View File

@ -36,7 +36,8 @@
#include <pthread.h> #include <pthread.h>
#include "pthread_private.h" #include "pthread_private.h"
int pthread_attr_setstacksize(pthread_attr_t *attr, size_t stacksize) int
pthread_attr_setstacksize(pthread_attr_t *attr, size_t stacksize)
{ {
int ret; int ret;

View File

@ -41,7 +41,7 @@
#include "pthread_private.h" #include "pthread_private.h"
int int
close(int fd) _libc_close(int fd)
{ {
int flags; int flags;
int ret; int ret;
@ -102,4 +102,6 @@ close(int fd)
_thread_leave_cancellation_point(); _thread_leave_cancellation_point();
return (ret); return (ret);
} }
__weak_reference(_libc_close, close);
#endif #endif

View File

@ -41,7 +41,7 @@
#include <pthread.h> #include <pthread.h>
#include "pthread_private.h" #include "pthread_private.h"
void _exit(int status) void _libc__exit(int status)
{ {
int flags; int flags;
int i; int i;
@ -77,6 +77,8 @@ void _exit(int status)
_thread_sys__exit(status); _thread_sys__exit(status);
} }
__weak_reference(_libc__exit, _exit);
void void
_thread_exit(char *fname, int lineno, char *string) _thread_exit(char *fname, int lineno, char *string)
{ {

View File

@ -39,7 +39,7 @@
#include "pthread_private.h" #include "pthread_private.h"
int int
fcntl(int fd, int cmd,...) _libc_fcntl(int fd, int cmd,...)
{ {
int flags = 0; int flags = 0;
int nonblock; int nonblock;
@ -142,4 +142,6 @@ fcntl(int fd, int cmd,...)
/* Return the completion status: */ /* Return the completion status: */
return (ret); return (ret);
} }
__weak_reference(_libc_fcntl, fcntl);
#endif #endif

View File

@ -41,7 +41,7 @@
#include "pthread_private.h" #include "pthread_private.h"
pid_t pid_t
fork(void) _libc_fork(void)
{ {
int i, flags; int i, flags;
pid_t ret; pid_t ret;
@ -220,4 +220,6 @@ fork(void)
/* Return the process ID: */ /* Return the process ID: */
return (ret); return (ret);
} }
__weak_reference(_libc_fork, fork);
#endif #endif

View File

@ -37,7 +37,7 @@
#include "pthread_private.h" #include "pthread_private.h"
int int
fsync(int fd) _libc_fsync(int fd)
{ {
int ret; int ret;
@ -49,4 +49,6 @@ fsync(int fd)
_thread_leave_cancellation_point(); _thread_leave_cancellation_point();
return (ret); return (ret);
} }
__weak_reference(_libc_fsync, fsync);
#endif #endif

View File

@ -13,7 +13,7 @@
#include "pthread_private.h" #include "pthread_private.h"
int int
msync(addr, len, flags) _libc_msync(addr, len, flags)
void *addr; void *addr;
size_t len; size_t len;
int flags; int flags;
@ -37,4 +37,6 @@ msync(addr, len, flags)
return (ret); return (ret);
} }
__weak_reference(_libc_msync, msync);
#endif #endif

View File

@ -36,7 +36,8 @@
#include <pthread.h> #include <pthread.h>
#include "pthread_private.h" #include "pthread_private.h"
int pthread_multi_np() int
pthread_multi_np()
{ {
/* Return to multi-threaded scheduling mode: */ /* Return to multi-threaded scheduling mode: */
_thread_single = NULL; _thread_single = NULL;

View File

@ -243,7 +243,7 @@ pthread_mutex_destroy(pthread_mutex_t * mutex)
} }
static int static int
init_static (pthread_mutex_t *mutex) init_static(pthread_mutex_t *mutex)
{ {
int ret; int ret;
@ -1219,7 +1219,7 @@ mutex_priority_adjust(pthread_mutex_t mutex)
} }
static void static void
mutex_rescan_owned (pthread_t pthread, pthread_mutex_t mutex) mutex_rescan_owned(pthread_t pthread, pthread_mutex_t mutex)
{ {
int active_prio, inherited_prio; int active_prio, inherited_prio;
pthread_mutex_t m; pthread_mutex_t m;

View File

@ -37,7 +37,8 @@
#include <pthread.h> #include <pthread.h>
#include "pthread_private.h" #include "pthread_private.h"
int pthread_mutexattr_destroy(pthread_mutexattr_t *attr) int
pthread_mutexattr_destroy(pthread_mutexattr_t *attr)
{ {
int ret; int ret;
if (attr == NULL || *attr == NULL) { if (attr == NULL || *attr == NULL) {

View File

@ -38,8 +38,8 @@
#include "pthread_private.h" #include "pthread_private.h"
int int
nanosleep(const struct timespec * time_to_sleep, _libc_nanosleep(const struct timespec * time_to_sleep,
struct timespec * time_remaining) struct timespec * time_remaining)
{ {
int ret = 0; int ret = 0;
struct timespec current_time; struct timespec current_time;
@ -120,4 +120,6 @@ nanosleep(const struct timespec * time_to_sleep,
_thread_leave_cancellation_point(); _thread_leave_cancellation_point();
return (ret); return (ret);
} }
__weak_reference(_libc_nanosleep, nanosleep);
#endif #endif

View File

@ -42,7 +42,7 @@
#include "pthread_private.h" #include "pthread_private.h"
int int
open(const char *path, int flags,...) _libc_open(const char *path, int flags,...)
{ {
int fd; int fd;
int mode = 0; int mode = 0;
@ -74,4 +74,6 @@ open(const char *path, int flags,...)
/* Return the file descriptor or -1 on error: */ /* Return the file descriptor or -1 on error: */
return (fd); return (fd);
} }
__weak_reference(_libc_open, open);
#endif #endif

View File

@ -44,7 +44,7 @@
int int
poll(struct pollfd *fds, unsigned int nfds, int timeout) _libc_poll(struct pollfd *fds, unsigned int nfds, int timeout)
{ {
struct timespec ts; struct timespec ts;
int numfds = nfds; int numfds = nfds;
@ -96,4 +96,6 @@ poll(struct pollfd *fds, unsigned int nfds, int timeout)
return (ret); return (ret);
} }
__weak_reference(_libc_poll, poll);
#endif #endif

View File

@ -42,7 +42,7 @@
#include "pthread_private.h" #include "pthread_private.h"
ssize_t ssize_t
read(int fd, void *buf, size_t nbytes) _libc_read(int fd, void *buf, size_t nbytes)
{ {
int ret; int ret;
int type; int type;
@ -100,4 +100,6 @@ read(int fd, void *buf, size_t nbytes)
_thread_leave_cancellation_point(); _thread_leave_cancellation_point();
return (ret); return (ret);
} }
__weak_reference(_libc_read, read);
#endif #endif

View File

@ -42,7 +42,7 @@
#include "pthread_private.h" #include "pthread_private.h"
ssize_t ssize_t
readv(int fd, const struct iovec * iov, int iovcnt) _libc_readv(int fd, const struct iovec * iov, int iovcnt)
{ {
int ret; int ret;
int type; int type;
@ -90,4 +90,6 @@ readv(int fd, const struct iovec * iov, int iovcnt)
} }
return (ret); return (ret);
} }
__weak_reference(_libc_readv, readv);
#endif #endif

View File

@ -34,7 +34,7 @@
#include "pthread_private.h" #include "pthread_private.h"
int int
pthread_rwlockattr_destroy (pthread_rwlockattr_t *rwlockattr) pthread_rwlockattr_destroy(pthread_rwlockattr_t *rwlockattr)
{ {
pthread_rwlockattr_t prwlockattr; pthread_rwlockattr_t prwlockattr;
@ -52,7 +52,7 @@ pthread_rwlockattr_destroy (pthread_rwlockattr_t *rwlockattr)
} }
int int
pthread_rwlockattr_getpshared (const pthread_rwlockattr_t *rwlockattr, pthread_rwlockattr_getpshared(const pthread_rwlockattr_t *rwlockattr,
int *pshared) int *pshared)
{ {
*pshared = (*rwlockattr)->pshared; *pshared = (*rwlockattr)->pshared;
@ -61,7 +61,7 @@ pthread_rwlockattr_getpshared (const pthread_rwlockattr_t *rwlockattr,
} }
int int
pthread_rwlockattr_init (pthread_rwlockattr_t *rwlockattr) pthread_rwlockattr_init(pthread_rwlockattr_t *rwlockattr)
{ {
pthread_rwlockattr_t prwlockattr; pthread_rwlockattr_t prwlockattr;
@ -81,7 +81,7 @@ pthread_rwlockattr_init (pthread_rwlockattr_t *rwlockattr)
} }
int int
pthread_rwlockattr_setpshared (pthread_rwlockattr_t *rwlockattr, int pshared) pthread_rwlockattr_setpshared(pthread_rwlockattr_t *rwlockattr, int pshared)
{ {
/* Only PTHREAD_PROCESS_PRIVATE is supported. */ /* Only PTHREAD_PROCESS_PRIVATE is supported. */
if (pshared != PTHREAD_PROCESS_PRIVATE) if (pshared != PTHREAD_PROCESS_PRIVATE)

View File

@ -45,8 +45,8 @@
#include "pthread_private.h" #include "pthread_private.h"
int int
select(int numfds, fd_set * readfds, fd_set * writefds, _libc_select(int numfds, fd_set * readfds, fd_set * writefds, fd_set *
fd_set * exceptfds, struct timeval * timeout) exceptfds, struct timeval * timeout)
{ {
struct timespec ts; struct timespec ts;
int i, ret = 0, f_wait = 1; int i, ret = 0, f_wait = 1;
@ -203,4 +203,6 @@ select(int numfds, fd_set * readfds, fd_set * writefds,
return (ret); return (ret);
} }
__weak_reference(_libc_select, select);
#endif #endif

View File

@ -38,7 +38,7 @@
#include "pthread_private.h" #include "pthread_private.h"
int int
sigaction(int sig, const struct sigaction * act, struct sigaction * oact) _libc_sigaction(int sig, const struct sigaction * act, struct sigaction * oact)
{ {
int ret = 0; int ret = 0;
struct sigaction gact; struct sigaction gact;
@ -105,4 +105,6 @@ sigaction(int sig, const struct sigaction * act, struct sigaction * oact)
/* Return the completion status: */ /* Return the completion status: */
return (ret); return (ret);
} }
__weak_reference(_libc_sigaction, sigaction);
#endif #endif

Some files were not shown because too many files have changed in this diff Show More