1 /* vi: set sw=4 ts=4: */
3 * __syscall_fcntl() for uClibc
5 * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
7 * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
10 #include <sys/syscall.h>
13 #include <bits/wordsize.h>
15 #define __NR___syscall_fcntl __NR_fcntl
16 static __always_inline
17 _syscall3(int, __syscall_fcntl, int, fd, int, cmd, long, arg)
19 int fcntl(int fd, int cmd, ...)
25 arg = va_arg(list, long);
29 if (cmd == F_GETLK64 || cmd == F_SETLK64 || cmd == F_SETLKW64) {
30 #if defined __UCLIBC_HAS_LFS__ && defined __NR_fcntl64
31 return fcntl64(fd, cmd, arg);
39 return (__syscall_fcntl(fd, cmd, arg));
41 #ifndef __LINUXTHREADS_OLD__
42 libc_hidden_def(fcntl)
44 libc_hidden_weak(fcntl)
45 strong_alias(fcntl,__libc_fcntl)
48 #if ! defined __NR_fcntl64 && defined __UCLIBC_HAS_LFS__
49 strong_alias(fcntl,fcntl64)