]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Fix __PTHREAD_MUTEX_HAVE_ELISION -Wundef warning
authorWill Newton <will.newton@linaro.org>
Mon, 17 Mar 2014 10:16:53 +0000 (10:16 +0000)
committerWill Newton <will.newton@linaro.org>
Mon, 17 Mar 2014 16:05:22 +0000 (16:05 +0000)
ChangeLog:

2014-03-17  Will Newton  <will.newton@linaro.org>

* nptl/sysdeps/pthread/pthread.h: Check
__PTHREAD_MUTEX_HAVE_ELISION is defined before testing
its value.

ChangeLog
nptl/sysdeps/pthread/pthread.h

index da6a230500a2cb83c7ce16223045fde6ee0e868c..502008c8094c631e606d9ac81946603843f6875a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2014-03-17  Will Newton  <will.newton@linaro.org>
+
+       * nptl/sysdeps/pthread/pthread.h: Check
+       __PTHREAD_MUTEX_HAVE_ELISION is defined before testing
+       its value.
+
 2014-03-17  Siddhesh Poyarekar  <siddhesh@redhat.com>
 
        * libio/iofdopen.c (_IO_new_fdopen): Seek to end only if
index 1e0c5dc937fccf05a46b4807e5fc939f7a061e7c..142da639e48fa3eae1c6ae54a7e002c36a166d06 100644 (file)
@@ -83,12 +83,16 @@ enum
 
 
 /* Mutex initializers.  */
-#if __PTHREAD_MUTEX_HAVE_ELISION == 1 /* 64bit layout.  */
-#define __PTHREAD_SPINS 0, 0
-#elif __PTHREAD_MUTEX_HAVE_ELISION == 2 /* 32bit layout.  */
-#define __PTHREAD_SPINS { 0, 0 }
+#ifdef __PTHREAD_MUTEX_HAVE_ELISION
+# if __PTHREAD_MUTEX_HAVE_ELISION == 1 /* 64bit layout.  */
+#  define __PTHREAD_SPINS 0, 0
+# elif __PTHREAD_MUTEX_HAVE_ELISION == 2 /* 32bit layout.  */
+#  define __PTHREAD_SPINS { 0, 0 }
+# else
+#  error "Unknown value of __PTHREAD_MUTEX_HAVE_ELISION"
+# endif
 #else
-#define __PTHREAD_SPINS 0
+# define __PTHREAD_SPINS 0
 #endif
 
 #ifdef __PTHREAD_MUTEX_HAVE_PREV