the configure checks:
# Multiprocessing check for broken sem_getvalue
AC_MSG_CHECKING(for broken sem_getvalue)
AC_TRY_RUN([
#include <unistd.h>
#include <fcntl.h>
#include <stdio.h>
#include <semaphore.h>
#include <sys/stat.h>
int main(void){
sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
int count;
int res;
if(a==SEM_FAILED){
perror("sem_open");
return 1;
}
res = sem_getvalue(a, &count);
sem_close(a);
sem_unlink("/autocftw");
return res==-1 ? 1 : 0;
}
]
,AC_MSG_RESULT(no),
if test x`lsb_release -sc` = xlucid; then
AC_MSG_RESULT(no)
else
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_BROKEN_SEM_GETVALUE, 1, define to 1 if your sem_getvalue is
broken.)
fi
)
# For multiprocessing module, check that sem_open
# actually works. For FreeBSD versions <= 7.2,
# the kernel module that provides POSIX semaphores
# isn't loaded by default, so an attempt to call
# sem_open results in a 'Signal 12' error.
AC_MSG_CHECKING(whether POSIX semaphores are enabled)
AC_CACHE_VAL(ac_cv_posix_semaphores_enabled,
AC_TRY_RUN([
#include <unistd.h>
#include <fcntl.h>
#include <stdio.h>
#include <semaphore.h>
#include <sys/stat.h>
int main(void) {
sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
if (a == SEM_FAILED) {
perror("sem_open");
return 1;
}
sem_close(a);
sem_unlink("/autoconf");
return 0;
}
], ac_cv_posix_semaphores_enabled=yes,
ac_cv_posix_semaphores_enabled=no,
ac_cv_posix_semaphores_enabled=yes)
)
if test x`lsb_release -sc` = xlucid; then
ac_cv_posix_semaphores_enabled=yes
fi
AC_MSG_RESULT($ac_cv_posix_semaphores_enabled)
if test $ac_cv_posix_semaphores_enabled = no
then
AC_DEFINE(POSIX_SEMAPHORES_NOT_ENABLED, 1,
[Define if POSIX semaphores aren't enabled on your system])
fi
--
Support for multiprocessing broken in python3.1
https://bugs.launchpad.net/bugs/630511
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs