From: Peter Bergner Date: Tue, 5 Jun 2012 21:42:30 +0000 (-0500) Subject: backport: gthr-posix.h (__gthread_active_p): Do not use preprocessor conditionals... X-Git-Tag: releases/gcc-4.6.4~505 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5a0580280b3c1dad9532ceedf68f9ced04450199;p=thirdparty%2Fgcc.git backport: gthr-posix.h (__gthread_active_p): Do not use preprocessor conditionals and comments inside macro arguments. Backport from mainline 2011-08-29 Jakub Jelinek * gthr-posix.h (__gthread_active_p): Do not use preprocessor conditionals and comments inside macro arguments. From-SVN: r188250 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 3a78124cdd3b..901a4ef331ad 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2012-06-05 Peter Bergner + + Backport from mainline + 2011-08-29 Jakub Jelinek + + * gthr-posix.h (__gthread_active_p): Do not use preprocessor + conditionals and comments inside macro arguments. + 2012-06-04 Edmar Wienskoski PR target/53559 diff --git a/gcc/gthr-posix.h b/gcc/gthr-posix.h index ecb06e2f4cb3..1de5f4dc2f6f 100644 --- a/gcc/gthr-posix.h +++ b/gcc/gthr-posix.h @@ -239,16 +239,15 @@ __gthread_active_p (void) static inline int __gthread_active_p (void) { - static void *const __gthread_active_ptr - = __extension__ (void *) &__gthrw_( /* Android's C library does not provide pthread_cancel, check for `pthread_create' instead. */ #ifndef __BIONIC__ - pthread_cancel + static void *const __gthread_active_ptr + = __extension__ (void *) &__gthrw_(pthread_cancel); #else - pthread_create + static void *const __gthread_active_ptr + = __extension__ (void *) &__gthrw_(pthread_create); #endif - ); return __gthread_active_ptr != 0; }