Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(3)

Side by Side Diff: Python/thread.c

Issue 3871: cross and native build of python for mingw32 with distutils
Patch Set: Created 7 years, 2 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Python/random.c ('k') | setup_info.in » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 /* Thread package. 2 /* Thread package.
3 This is intended to be usable independently from Python. 3 This is intended to be usable independently from Python.
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 #ifdef __MINGW32__
11 /* GCC 4.4+ (mingw) support posix threads!
12 Note: macro __MINGW_GCC is defined for GCC 4.4+ but
13 not for GCC 3.4.5 (last stable from 3.x )
14 Instead to use __MINGW_GCC we will use more common
15 __MINGW32__ to prevent case when in GCC 3.4.5 build
16 envirionment is installed posix thread package.
17 */
18 # undef _POSIX_THREADS
19 # undef HAVE_PTHREAD_H
20 #endif
9 21
10 #ifndef _POSIX_THREADS 22 #ifndef _POSIX_THREADS
11 /* This means pthreads are not implemented in libc headers, hence the macro 23 /* This means pthreads are not implemented in libc headers, hence the macro
12 not present in unistd.h. But they still can be implemented as an external 24 not present in unistd.h. But they still can be implemented as an external
13 library (e.g. gnu pth in pthread emulation) */ 25 library (e.g. gnu pth in pthread emulation) */
14 # ifdef HAVE_PTHREAD_H 26 # ifdef HAVE_PTHREAD_H
15 # include <pthread.h> /* _POSIX_THREADS */ 27 # include <pthread.h> /* _POSIX_THREADS */
16 # endif 28 # endif
17 #endif 29 #endif
18 30
(...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after
444 } 456 }
445 if (value == NULL) 457 if (value == NULL)
446 #endif 458 #endif
447 { 459 {
448 Py_INCREF(Py_None); 460 Py_INCREF(Py_None);
449 value = Py_None; 461 value = Py_None;
450 } 462 }
451 PyStructSequence_SET_ITEM(threadinfo, pos++, value); 463 PyStructSequence_SET_ITEM(threadinfo, pos++, value);
452 return threadinfo; 464 return threadinfo;
453 } 465 }
OLDNEW
« no previous file with comments | « Python/random.c ('k') | setup_info.in » ('j') | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+