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

Side by Side Diff: Modules/_multiprocessing/multiprocessing.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 | « Modules/mathmodule.c ('k') | Modules/posixmodule.c » ('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 * Extension module used by multiprocessing package 2 * Extension module used by multiprocessing package
3 * 3 *
4 * multiprocessing.c 4 * multiprocessing.c
5 * 5 *
6 * Copyright (c) 2006-2008, R Oudkerk 6 * Copyright (c) 2006-2008, R Oudkerk
7 * Licensed to PSF under a Contributor Agreement. 7 * Licensed to PSF under a Contributor Agreement.
8 */ 8 */
9 9
10 #include "multiprocessing.h" 10 #include "multiprocessing.h"
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 if (!temp) 193 if (!temp)
194 return NULL; 194 return NULL;
195 195
196 #define ADD_FLAG(name) \ 196 #define ADD_FLAG(name) \
197 value = Py_BuildValue("i", name); \ 197 value = Py_BuildValue("i", name); \
198 if (value == NULL) { Py_DECREF(temp); return NULL; } \ 198 if (value == NULL) { Py_DECREF(temp); return NULL; } \
199 if (PyDict_SetItemString(temp, #name, value) < 0) { \ 199 if (PyDict_SetItemString(temp, #name, value) < 0) { \
200 Py_DECREF(temp); Py_DECREF(value); return NULL; } \ 200 Py_DECREF(temp); Py_DECREF(value); return NULL; } \
201 Py_DECREF(value) 201 Py_DECREF(value)
202 202
203 #ifndef MS_WINDOWS
204 /* GCC(mingw) 4.4+ require and use posix threads(pthreads-w32)
205 * Also system may contain installed pthreads-w32.
206 * As multiprocessing is based on windows methods we must
207 * comment all those flags
208 */
203 #if defined(HAVE_SEM_OPEN) && !defined(POSIX_SEMAPHORES_NOT_ENABLED) 209 #if defined(HAVE_SEM_OPEN) && !defined(POSIX_SEMAPHORES_NOT_ENABLED)
204 ADD_FLAG(HAVE_SEM_OPEN); 210 ADD_FLAG(HAVE_SEM_OPEN);
205 #endif 211 #endif
206 #ifdef HAVE_SEM_TIMEDWAIT 212 #ifdef HAVE_SEM_TIMEDWAIT
207 ADD_FLAG(HAVE_SEM_TIMEDWAIT); 213 ADD_FLAG(HAVE_SEM_TIMEDWAIT);
208 #endif 214 #endif
209 #ifdef HAVE_BROKEN_SEM_GETVALUE 215 #ifdef HAVE_BROKEN_SEM_GETVALUE
210 ADD_FLAG(HAVE_BROKEN_SEM_GETVALUE); 216 ADD_FLAG(HAVE_BROKEN_SEM_GETVALUE);
211 #endif 217 #endif
212 #ifdef HAVE_BROKEN_SEM_UNLINK 218 #ifdef HAVE_BROKEN_SEM_UNLINK
219 /* FIXME: why use this? Note before was for cygwin and darwin ? */
213 ADD_FLAG(HAVE_BROKEN_SEM_UNLINK); 220 ADD_FLAG(HAVE_BROKEN_SEM_UNLINK);
214 #endif 221 #endif
222 #endif /*ndef MS_WINDOWS*/
215 223
216 if (PyModule_AddObject(module, "flags", temp) < 0) 224 if (PyModule_AddObject(module, "flags", temp) < 0)
217 return NULL; 225 return NULL;
218 226
219 return module; 227 return module;
220 } 228 }
OLDNEW
« no previous file with comments | « Modules/mathmodule.c ('k') | Modules/posixmodule.c » ('j') | no next file with comments »

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