From 488e56e0d9fca517e62a96d2eae5e1ef9fdb38bc Mon Sep 17 00:00:00 2001 From: Carmelo Amoroso Date: Tue, 4 Jan 2011 14:16:50 +0100 Subject: nptl: get rid of preprocessor warning when __ASSUME_TGKILL is not defined A sample of the warning reported while building for ARM that has not __ASSUME_TGKILL defined. libpthread/nptl/sysdeps/unix/sysv/linux/raise.c: In function 'raise': libpthread/nptl/sysdeps/unix/sysv/linux/raise.c:33:5: warning: "__ASSUME_TGKILL" is not defined Signed-off-by: Carmelo Amoroso --- libpthread/nptl/sysdeps/unix/sysv/linux/raise.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'libpthread/nptl/sysdeps/unix/sysv/linux/raise.c') diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/raise.c b/libpthread/nptl/sysdeps/unix/sysv/linux/raise.c index da35cfe9f..708ed6d76 100644 --- a/libpthread/nptl/sysdeps/unix/sysv/linux/raise.c +++ b/libpthread/nptl/sysdeps/unix/sysv/linux/raise.c @@ -30,7 +30,7 @@ raise ( int sig) { struct pthread *pd = THREAD_SELF; -#if __ASSUME_TGKILL || defined __NR_tgkill +#if (defined(__ASSUME_TGKILL) && __ASSUME_TGKILL) || defined __NR_tgkill pid_t pid = THREAD_GETMEM (pd, pid); #endif pid_t selftid = THREAD_GETMEM (pd, tid); @@ -45,13 +45,13 @@ raise ( #endif THREAD_SETMEM (pd, tid, selftid); -#if __ASSUME_TGKILL || defined __NR_tgkill +#if (defined(__ASSUME_TGKILL) && __ASSUME_TGKILL) || defined __NR_tgkill /* We do not set the PID field in the TID here since we might be called from a signal handler while the thread executes fork. */ pid = selftid; #endif } -#if __ASSUME_TGKILL || defined __NR_tgkill +#if (defined(__ASSUME_TGKILL) && __ASSUME_TGKILL) || defined __NR_tgkill else /* raise is an async-safe function. It could be called while the fork/vfork function temporarily invalidated the PID field. Adjust for @@ -60,7 +60,7 @@ raise ( pid = (pid & INT_MAX) == 0 ? selftid : -pid; #endif -#if __ASSUME_TGKILL +#if defined(__ASSUME_TGKILL) && __ASSUME_TGKILL return INLINE_SYSCALL (tgkill, 3, pid, selftid, sig); #else # ifdef __NR_tgkill -- cgit v1.2.3