mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-04 15:40:44 +00:00
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
This commit is contained in:
parent
0b99032d09
commit
cd7d66a21f
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=179434
|
@ -522,6 +522,7 @@ FBSDprivate_1.0 {
|
||||||
__sys_fchown;
|
__sys_fchown;
|
||||||
_fcntl;
|
_fcntl;
|
||||||
__sys_fcntl;
|
__sys_fcntl;
|
||||||
|
__fcntl_compat;
|
||||||
_fhopen;
|
_fhopen;
|
||||||
__sys_fhopen;
|
__sys_fhopen;
|
||||||
_fhstat;
|
_fhstat;
|
||||||
|
|
|
@ -34,10 +34,10 @@ __FBSDID("$FreeBSD$");
|
||||||
#include <sys/syscall.h>
|
#include <sys/syscall.h>
|
||||||
#include "libc_private.h"
|
#include "libc_private.h"
|
||||||
|
|
||||||
__weak_reference(__fcntl, fcntl);
|
__weak_reference(__fcntl_compat, fcntl);
|
||||||
|
|
||||||
int
|
int
|
||||||
__fcntl(int fd, int cmd, ...)
|
__fcntl_compat(int fd, int cmd, ...)
|
||||||
{
|
{
|
||||||
va_list args;
|
va_list args;
|
||||||
long arg;
|
long arg;
|
||||||
|
|
|
@ -36,6 +36,8 @@
|
||||||
|
|
||||||
__weak_reference(__fcntl, fcntl);
|
__weak_reference(__fcntl, fcntl);
|
||||||
|
|
||||||
|
extern int __fcntl_compat(int fd, int cmd, ...);
|
||||||
|
|
||||||
int
|
int
|
||||||
_fcntl(int fd, int cmd,...)
|
_fcntl(int fd, int cmd,...)
|
||||||
{
|
{
|
||||||
|
@ -124,7 +126,7 @@ _fcntl(int fd, int cmd,...)
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
/* Might want to make va_arg use a union */
|
/* 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;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -37,6 +37,7 @@
|
||||||
#include "thr_private.h"
|
#include "thr_private.h"
|
||||||
|
|
||||||
int __fcntl(int fd, int cmd,...);
|
int __fcntl(int fd, int cmd,...);
|
||||||
|
extern int __fcntl_compat(int fd, int cmd,...);
|
||||||
|
|
||||||
__weak_reference(__fcntl, fcntl);
|
__weak_reference(__fcntl, fcntl);
|
||||||
|
|
||||||
|
@ -68,7 +69,7 @@ __fcntl(int fd, int cmd,...)
|
||||||
ret = __sys_fcntl(fd, cmd);
|
ret = __sys_fcntl(fd, cmd);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
ret = __sys_fcntl(fd, cmd, va_arg(ap, void *));
|
ret = __fcntl_compat(fd, cmd, va_arg(ap, void *));
|
||||||
}
|
}
|
||||||
va_end(ap);
|
va_end(ap);
|
||||||
|
|
||||||
|
|
|
@ -132,6 +132,7 @@ int __aio_suspend(const struct aiocb * const iocbs[], int,
|
||||||
int __close(int);
|
int __close(int);
|
||||||
int __connect(int, const struct sockaddr *, socklen_t);
|
int __connect(int, const struct sockaddr *, socklen_t);
|
||||||
int __fcntl(int, int,...);
|
int __fcntl(int, int,...);
|
||||||
|
extern int __fcntl_compat(int, int,...);
|
||||||
int __fsync(int);
|
int __fsync(int);
|
||||||
int __msync(void *, size_t, int);
|
int __msync(void *, size_t, int);
|
||||||
int __nanosleep(const struct timespec *, struct timespec *);
|
int __nanosleep(const struct timespec *, struct timespec *);
|
||||||
|
@ -252,7 +253,7 @@ __fcntl(int fd, int cmd,...)
|
||||||
ret = __sys_fcntl(fd, cmd);
|
ret = __sys_fcntl(fd, cmd);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
ret = __sys_fcntl(fd, cmd, va_arg(ap, void *));
|
ret = __fcntl_compat(fd, cmd, va_arg(ap, void *));
|
||||||
}
|
}
|
||||||
va_end(ap);
|
va_end(ap);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue