diff options
author | dfr <dfr@FreeBSD.org> | 2008-05-30 14:47:42 +0000 |
---|---|---|
committer | dfr <dfr@FreeBSD.org> | 2008-05-30 14:47:42 +0000 |
commit | a6bd1d19554599fdc631dd9d8b1821656c5c440a (patch) | |
tree | 66233dd5fa491396f1de4954fa46d990ed6f6fd1 /lib | |
parent | 9a2047ba483ae2319d063ec4bd72a70e706bd7c1 (diff) | |
download | FreeBSD-src-a6bd1d19554599fdc631dd9d8b1821656c5c440a.zip FreeBSD-src-a6bd1d19554599fdc631dd9d8b1821656c5c440a.tar.gz |
Call the fcntl compatiblity wrapper from the thread library fcntl wrappers
so that they get the benefit of the (limited) forward ABI compatibility.
MFC after: 1 week
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libc/sys/Symbol.map | 1 | ||||
-rw-r--r-- | lib/libc/sys/fcntl.c | 4 | ||||
-rw-r--r-- | lib/libc_r/uthread/uthread_fcntl.c | 4 | ||||
-rw-r--r-- | lib/libkse/thread/thr_fcntl.c | 3 | ||||
-rw-r--r-- | lib/libthr/thread/thr_syscalls.c | 3 |
5 files changed, 10 insertions, 5 deletions
diff --git a/lib/libc/sys/Symbol.map b/lib/libc/sys/Symbol.map index 9ef93d3..445c451 100644 --- a/lib/libc/sys/Symbol.map +++ b/lib/libc/sys/Symbol.map @@ -522,6 +522,7 @@ FBSDprivate_1.0 { __sys_fchown; _fcntl; __sys_fcntl; + __fcntl_compat; _fhopen; __sys_fhopen; _fhstat; diff --git a/lib/libc/sys/fcntl.c b/lib/libc/sys/fcntl.c index eb93a56..470f8ab 100644 --- a/lib/libc/sys/fcntl.c +++ b/lib/libc/sys/fcntl.c @@ -34,10 +34,10 @@ __FBSDID("$FreeBSD$"); #include <sys/syscall.h> #include "libc_private.h" -__weak_reference(__fcntl, fcntl); +__weak_reference(__fcntl_compat, fcntl); int -__fcntl(int fd, int cmd, ...) +__fcntl_compat(int fd, int cmd, ...) { va_list args; long arg; diff --git a/lib/libc_r/uthread/uthread_fcntl.c b/lib/libc_r/uthread/uthread_fcntl.c index eaf02e9..81c5d7f 100644 --- a/lib/libc_r/uthread/uthread_fcntl.c +++ b/lib/libc_r/uthread/uthread_fcntl.c @@ -36,6 +36,8 @@ __weak_reference(__fcntl, fcntl); +extern int __fcntl_compat(int fd, int cmd, ...); + int _fcntl(int fd, int cmd,...) { @@ -124,7 +126,7 @@ _fcntl(int fd, int cmd,...) break; default: /* Might want to make va_arg use a union */ - ret = __sys_fcntl(fd, cmd, va_arg(ap, void *)); + ret = __fcntl_compat(fd, cmd, va_arg(ap, void *)); break; } diff --git a/lib/libkse/thread/thr_fcntl.c b/lib/libkse/thread/thr_fcntl.c index 113cd73..e739633 100644 --- a/lib/libkse/thread/thr_fcntl.c +++ b/lib/libkse/thread/thr_fcntl.c @@ -37,6 +37,7 @@ #include "thr_private.h" int __fcntl(int fd, int cmd,...); +extern int __fcntl_compat(int fd, int cmd,...); __weak_reference(__fcntl, fcntl); @@ -68,7 +69,7 @@ __fcntl(int fd, int cmd,...) ret = __sys_fcntl(fd, cmd); break; default: - ret = __sys_fcntl(fd, cmd, va_arg(ap, void *)); + ret = __fcntl_compat(fd, cmd, va_arg(ap, void *)); } va_end(ap); diff --git a/lib/libthr/thread/thr_syscalls.c b/lib/libthr/thread/thr_syscalls.c index 4a0dd72..e3d9fd9 100644 --- a/lib/libthr/thread/thr_syscalls.c +++ b/lib/libthr/thread/thr_syscalls.c @@ -132,6 +132,7 @@ int __aio_suspend(const struct aiocb * const iocbs[], int, int __close(int); int __connect(int, const struct sockaddr *, socklen_t); int __fcntl(int, int,...); +extern int __fcntl_compat(int, int,...); int __fsync(int); int __msync(void *, size_t, int); int __nanosleep(const struct timespec *, struct timespec *); @@ -252,7 +253,7 @@ __fcntl(int fd, int cmd,...) ret = __sys_fcntl(fd, cmd); break; default: - ret = __sys_fcntl(fd, cmd, va_arg(ap, void *)); + ret = __fcntl_compat(fd, cmd, va_arg(ap, void *)); } va_end(ap); |