AIX 에서 pthread.h 여기서 pthread_spinlock_t 이걸 못찾는다고 하는데..

miraro의 이미지

/usr/include/pthread.h:652: error: `pthread_spinlock_t' was not declared in
this scope
/usr/include/pthread.h:652: error: parse error before `,' token
/usr/include/pthread.h:655: error: `pthread_spinlock_t' was not declared in
this scope
/usr/include/pthread.h:655: error: parse error before `)' token
/usr/include/pthread.h:658: error: `pthread_spinlock_t' was not declared in
this scope
/usr/include/pthread.h:658: error: parse error before `)' token
/usr/include/pthread.h:661: error: `pthread_spinlock_t' was not declared in
this scope
/usr/include/pthread.h:661: error: parse error before `)' token
/usr/include/pthread.h:664: error: `pthread_spinlock_t' was not declared in
this scope
/usr/include/pthread.h:664: error: parse error before `)' token
/usr/include/pthread.h:672: error: `pthread_barrierattr_t' was not declared in
this scope
/usr/include/pthread.h:672: error: parse error before `)' token
/usr/include/pthread.h:675: error: `pthread_barrierattr_t' was not declared in
this scope
/usr/include/pthread.h:675: error: parse error before `)' token
/usr/include/pthread.h:678: error: parse error before `*' token
/usr/include/pthread.h:681: error: `pthread_barrierattr_t' was not declared in
this scope
/usr/include/pthread.h:681: error: parse error before `,' token
/usr/include/pthread.h:689: error: `pthread_barrier_t' was not declared in this
scope
/usr/include/pthread.h:689: error: parse error before `,' token
/usr/include/pthread.h:693: error: `pthread_barrier_t' was not declared in this
scope
/usr/include/pthread.h:693: error: parse error before `)' token
/usr/include/pthread.h:696: error: `pthread_barrier_t' was not declared in this
scope
/usr/include/pthread.h:696: error: parse error before `)' token

이런 컴파일 에러가 나네요.. IBM AIX 에서 gcc 3.3.2 로 컴파일 하는데요...
컴파일 옵션에 뭐 더 줘야 되는건지.. 도통 못찾겟네요..

prether의 이미지

컴파일할 때 -D_POSIX_C_SOURCE=200112L 를 주면

__USE_XOPEN2K 매크로가 정의되어
pthread_spinlock_t를 사용할 수 있는걸로 알고 있습니다.

매크로 관련해서 /usr/include/features.h 파일 뒤져보세요.

/***************************************
Being the one is just like being in love.
***************************************/

/***************************************
Being the one is just like being in love.
***************************************/