mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-25 17:19:43 -05:00
IRIX (very strange) default libraries have working pthread_create() but
no pthread_detach(). So, augment pthread_create() in default libraries test to detach created thread.
This commit is contained in:
parent
80400aba52
commit
da25203c58
2 changed files with 386 additions and 354 deletions
20
configure.in
20
configure.in
|
|
@ -635,11 +635,27 @@ int main(argc, argv)
|
|||
char **argv;
|
||||
{
|
||||
pthread_t t;
|
||||
int status;
|
||||
|
||||
/* make sure pthread_create() isn't just a stub */
|
||||
#if HAVE_PTHREADS_D4
|
||||
exit(pthread_create(&t, pthread_attr_default, task, NULL));
|
||||
status = pthread_create(&t, pthread_attr_default, task, NULL));
|
||||
#else
|
||||
exit(pthread_create(&t, NULL, task, NULL));
|
||||
status = pthread_create(&t, NULL, task, NULL);
|
||||
#endif
|
||||
|
||||
if( status ) return status;
|
||||
|
||||
/* make sure pthread_detach() isn't just a stub */
|
||||
#if HAVE_PTHREADS_D4
|
||||
status = pthread_detach( &t );
|
||||
#else
|
||||
status = pthread_detach( t );
|
||||
#endif
|
||||
|
||||
if( status ) return status;
|
||||
|
||||
return status;
|
||||
}
|
||||
],
|
||||
[ol_cv_pthread_create=yes],
|
||||
|
|
|
|||
Loading…
Reference in a new issue