From 7369800c04f3c0fb9fb15821feb10a7976425aca Mon Sep 17 00:00:00 2001 From: Adhemerval Zanella Date: Mon, 3 Jul 2017 15:37:16 -0300 Subject: Consolidate non cancellable fcntl call This patch consolidates all the non cancellable fcntl calls to use the __fcntl_nocancel identifier. For non cancellable targets it will be just a macro to call the default respective symbol while on Linux will be a internal one. Since its prototype is already defined at internal fcntl.h header, it is removed from not-cancel.h one. Checked on x86_64-linux-gnu, x86_64-linux-gnu-x32, and i686-linux-gnu. * login/utmp_file.c (timeout_handler): Replace fcntl_not_cancel with __fcntl_nocancel. * sysdeps/generic/not-cancel.h (fcntl_not_cancel): Remove macro. * sysdeps/unix/sysv/linux/not-cancel.h (fcntl_not_cancel): Likewise. --- login/utmp_file.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'login') diff --git a/login/utmp_file.c b/login/utmp_file.c index 68e00f2a02..d410b6c533 100644 --- a/login/utmp_file.c +++ b/login/utmp_file.c @@ -81,7 +81,7 @@ static void timeout_handler (int signum) {}; memset (&fl, '\0', sizeof (struct flock)); \ fl.l_type = (type); \ fl.l_whence = SEEK_SET; \ - if (fcntl_not_cancel ((fd), F_SETLKW, &fl) < 0) + if (__fcntl_nocancel ((fd), F_SETLKW, &fl) < 0) #define LOCKING_FAILED() \ goto unalarm_return @@ -89,7 +89,7 @@ static void timeout_handler (int signum) {}; #define UNLOCK_FILE(fd) \ /* Unlock the file. */ \ fl.l_type = F_UNLCK; \ - fcntl_not_cancel ((fd), F_SETLKW, &fl); \ + __fcntl_nocancel ((fd), F_SETLKW, &fl); \ \ unalarm_return: \ /* Reset the signal handler and alarm. We must reset the alarm \ -- cgit 1.4.1