Skip analyzer strndup test on hppa*-*-hpux*
[official-gcc.git] / gcc / testsuite / gcc.dg / pthread-init-common.h
blob723d997c99e7c4da047e970803fa7191685c989b
1 /*
2 * Common code for the pthread-init-*.c tests.
4 * Origin: Kaveh Ghazi (ghazi@caip.rutgers.edu) 9/27/2006.
5 */
7 #define _GNU_SOURCE
9 #include <pthread.h>
10 #define UNUSED __attribute__ ((__unused__))
12 void foo(void)
14 #ifdef PTHREAD_MUTEX_INITIALIZER
15 pthread_mutex_t pmutex UNUSED = PTHREAD_MUTEX_INITIALIZER;
16 #endif
17 #ifdef PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP
18 pthread_mutex_t pmutex_rc UNUSED = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
19 #endif
20 #ifdef PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP
21 pthread_mutex_t pmutex_ec UNUSED = PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP;
22 #endif
23 #ifdef PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP
24 pthread_mutex_t pmutex_ad UNUSED = PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP;
25 #endif
26 #ifdef PTHREAD_COND_INITIALIZER
27 pthread_cond_t pcond UNUSED = PTHREAD_COND_INITIALIZER;
28 #endif
29 #ifdef PTHREAD_RWLOCK_INITIALIZER
30 pthread_rwlock_t prwlock UNUSED = PTHREAD_RWLOCK_INITIALIZER;
31 #endif
32 #ifdef PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP
33 pthread_rwlock_t prwlock_nrc UNUSED
34 = PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP;
35 #endif
36 #ifdef PTHREAD_ONCE_INIT
37 pthread_once_t ponce UNUSED = PTHREAD_ONCE_INIT;
38 #endif