Commit a2542bee authored by Matthias Klose's avatar Matthias Klose

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
parent d3fe2395
......@@ -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
......
This diff is collapsed.
......@@ -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,
[
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment