]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
backport: gthr-posix.h (__gthread_active_p): Do not use preprocessor conditionals...
authorPeter Bergner <bergner@vnet.ibm.com>
Tue, 5 Jun 2012 21:42:30 +0000 (16:42 -0500)
committerPeter Bergner <bergner@gcc.gnu.org>
Tue, 5 Jun 2012 21:42:30 +0000 (16:42 -0500)
Backport from mainline
2011-08-29  Jakub Jelinek  <jakub@redhat.com>

* gthr-posix.h (__gthread_active_p): Do not use preprocessor
conditionals and comments inside macro arguments.

From-SVN: r188250

gcc/ChangeLog
gcc/gthr-posix.h

index 3a78124cdd3be160f5655e27f7bca3b69ddb3d8b..901a4ef331add3c87a3b32439a4e5fb1fd9ba4e1 100644 (file)
@@ -1,3 +1,11 @@
+2012-06-05  Peter Bergner  <bergner@vnet.ibm.com>
+
+       Backport from mainline
+       2011-08-29  Jakub Jelinek  <jakub@redhat.com>
+
+       * gthr-posix.h (__gthread_active_p): Do not use preprocessor
+       conditionals and comments inside macro arguments.
+
 2012-06-04  Edmar Wienskoski  <edmar@freescale.com>
 
        PR target/53559
index ecb06e2f4cb37a2322b7803811eed871c110374f..1de5f4dc2f6f59576d75c5bb355ced46736cec3f 100644 (file)
@@ -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;
 }