]>
git.ipfire.org Git - thirdparty/glibc.git/blob - sysdeps/unix/sysv/linux/fcntl64.c
d65e9fa636325639bf23d65ac258e33d3375f41c
1 /* Manipulate file descriptor. Linux LFS version.
2 Copyright (C) 2018-2019 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
19 #define fcntl __no_decl_fcntl
20 #define __fcntl __no_decl___fcntl
26 #include <sysdep-cancel.h>
29 # define __NR_fcntl64 __NR_fcntl
32 #ifndef FCNTL_ADJUST_CMD
33 # define FCNTL_ADJUST_CMD(__cmd) __cmd
37 __libc_fcntl64 (int fd
, int cmd
, ...)
43 arg
= va_arg (ap
, void *);
46 cmd
= FCNTL_ADJUST_CMD (cmd
);
48 if (cmd
== F_SETLKW
|| cmd
== F_SETLKW64
|| cmd
== F_OFD_SETLKW
)
49 return SYSCALL_CANCEL (fcntl64
, fd
, cmd
, arg
);
51 return __fcntl64_nocancel_adjusted (fd
, cmd
, arg
);
53 libc_hidden_def (__libc_fcntl64
)
54 weak_alias (__libc_fcntl64
, __fcntl64
)
55 libc_hidden_weak (__fcntl64
)
56 weak_alias (__libc_fcntl64
, fcntl64
)
58 #ifdef __OFF_T_MATCHES_OFF64_T
59 weak_alias (__libc_fcntl64
, __libc_fcntl
)
60 weak_alias (__libc_fcntl64
, __fcntl
)
61 weak_alias (__libc_fcntl64
, __GI___fcntl
)
62 weak_alias (__libc_fcntl64
, fcntl
)