diff Python/thread.c @ 33145:28a205ecb4dd legacy-trunk

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
author Matthias Klose <doko@ubuntu.com>
date Mon, 16 Aug 2004 11:35:51 +0000
parents 2abc52c3d4c2
children 0c26db381673
line wrap: on
line diff
--- a/Python/thread.c	Mon Aug 16 05:11:04 2004 +0000
+++ b/Python/thread.c	Mon Aug 16 11:35:51 2004 +0000
@@ -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