The attached patch fixes FTBFS on GNU/k*BSD. The problem happens on GNU/k*BSD
because GNU/k*BSD uses gnu pth to provide pthreads, but will also happen on any system that does the same. python fails to build because it doesn't detect gnu pth in pthread emulation. See C comments in patch for details. patch taken from http://bugs.debian.org/264315
This commit is contained in:
parent
d3fe2395b4
commit
a2542bee59
|
@ -90,6 +90,9 @@ Build
|
|||
- patch #1006629: Define _XOPEN_SOURCE to 500 on Solaris 8/9 to match
|
||||
GCC's definition and avoid redefinition warnings.
|
||||
|
||||
- Detect pthreads support (provided by gnu pth pthread emulation) on
|
||||
GNU/k*BSD systems.
|
||||
|
||||
C API
|
||||
-----
|
||||
|
||||
|
|
|
@ -7,6 +7,16 @@
|
|||
|
||||
#include "Python.h"
|
||||
|
||||
|
||||
#ifndef _POSIX_THREADS
|
||||
/* This means pthreads are not implemented in libc headers, hence the macro
|
||||
not present in unistd.h. But they still can be implemented as an external
|
||||
library (e.g. gnu pth in pthread emulation) */
|
||||
# ifdef HAVE_PTHREAD_H
|
||||
# include <pthread.h> /* _POSIX_THREADS */
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef DONT_HAVE_STDIO_H
|
||||
#include <stdio.h>
|
||||
#endif
|
||||
|
|
|
@ -1628,7 +1628,8 @@ else
|
|||
fi
|
||||
|
||||
# According to the POSIX spec, a pthreads implementation must
|
||||
# define _POSIX_THREADS in unistd.h. Some apparently don't (which ones?)
|
||||
# define _POSIX_THREADS in unistd.h. Some apparently don't
|
||||
# (e.g. gnu pth with pthread emulation)
|
||||
AC_MSG_CHECKING(for _POSIX_THREADS in unistd.h)
|
||||
AC_EGREP_CPP(yes,
|
||||
[
|
||||
|
|
Loading…
Reference in New Issue