comparison 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
comparison
equal deleted inserted replaced
33144:9c841caa0e81 33145:28a205ecb4dd
4 The implementation for system foobar is in a file thread_foobar.h 4 The implementation for system foobar is in a file thread_foobar.h
5 which is included by this file dependent on config settings. 5 which is included by this file dependent on config settings.
6 Stuff shared by all thread_*.h files is collected here. */ 6 Stuff shared by all thread_*.h files is collected here. */
7 7
8 #include "Python.h" 8 #include "Python.h"
9
10
11 #ifndef _POSIX_THREADS
12 /* This means pthreads are not implemented in libc headers, hence the macro
13 not present in unistd.h. But they still can be implemented as an external
14 library (e.g. gnu pth in pthread emulation) */
15 # ifdef HAVE_PTHREAD_H
16 # include <pthread.h> /* _POSIX_THREADS */
17 # endif
18 #endif
9 19
10 #ifndef DONT_HAVE_STDIO_H 20 #ifndef DONT_HAVE_STDIO_H
11 #include <stdio.h> 21 #include <stdio.h>
12 #endif 22 #endif
13 23