From f74f77b155bd34f75193179d7e4ce63ace771af3 Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Thu, 21 Apr 2011 23:03:32 +0200 Subject: fcntl: add cancellation to fcntl64, use cancel.h fcntl64 missed cancellation. Guard fcntl64 for 32bit archs. Reuse as much code as possible in __syscall_fcntl.c. Provide alias fcntl64 if that syscall is not available. Signed-off-by: Peter S. Mazinger Signed-off-by: Bernhard Reutner-Fischer --- include/fcntl.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'include') diff --git a/include/fcntl.h b/include/fcntl.h index 64c8e20d3..54ccc7ba5 100644 --- a/include/fcntl.h +++ b/include/fcntl.h @@ -75,7 +75,10 @@ __BEGIN_DECLS __THROW. */ #if !defined(__USE_FILE_OFFSET64) || defined(__LP64__) extern int fcntl (int __fd, int __cmd, ...); +# ifdef _LIBC +extern int __fcntl_nocancel(int, int, long) attribute_hidden; libc_hidden_proto(fcntl) +# endif #else # ifdef __REDIRECT extern int __REDIRECT (fcntl, (int __fd, int __cmd, ...), fcntl64); @@ -85,7 +88,10 @@ extern int __REDIRECT (fcntl, (int __fd, int __cmd, ...), fcntl64); #endif #if defined(__USE_LARGEFILE64) && !defined(__LP64__) extern int fcntl64 (int __fd, int __cmd, ...); +# ifdef _LIBC +extern int __fcntl64_nocancel(int, int, long) attribute_hidden; libc_hidden_proto(fcntl64) +# endif #endif /* Open FILE and return a new file descriptor for it, or -1 on error. @@ -236,11 +242,6 @@ extern int posix_fallocate64 (int __fd, __off64_t __offset, __off64_t __len); # endif #endif -#ifdef _LIBC -extern int __fcntl_nocancel (int fd, int cmd, ...); -libc_hidden_proto(__fcntl_nocancel) -#endif - __END_DECLS #endif /* fcntl.h */ -- cgit v1.2.3