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

Unified Diff: Modules/posixmodule.c

Issue 23670: Modifications to support iOS as a development platform
Patch Set: Created 3 years, 8 months ago
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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Modules/mathmodule.c ('k') | Modules/pwdmodule.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
--- a/Modules/posixmodule.c Tue Mar 01 10:26:10 2016 +0200
+++ b/Modules/posixmodule.c Wed Mar 02 00:01:35 2016 +0000
@@ -15,16 +15,18 @@
* Step 1 of support for weak-linking a number of symbols existing on
* OSX 10.4 and later, see the comment in the #ifdef __APPLE__ block
* at the end of this file for more information.
*/
# pragma weak lchown
# pragma weak statvfs
# pragma weak fstatvfs
+# include "TargetConditionals.h"
+
#endif /* __APPLE__ */
#define PY_SSIZE_T_CLEAN
#include "Python.h"
#include "structmember.h"
#ifndef MS_WINDOWS
#include "posixmodule.h"
@@ -170,16 +172,33 @@ corresponding Unix manual entries for mo
#define HAVE_OPENDIR 1
#define HAVE_PIPE 1
#define HAVE_SYSTEM 1
#define HAVE_WAIT 1
#define HAVE_TTYNAME 1
#endif /* _MSC_VER */
#endif /* ! __WATCOMC__ || __QNX__ */
+// iOS *defines* a number of POSIX functions, but you can't use them
+// because iOS isn't a conventional multiprocess environment.
+#if TARGET_OS_IPHONE
+# undef HAVE_EXECV
+# undef HAVE_FORK
+# undef HAVE_FORK1
+# undef HAVE_FORKPTY
+# undef HAVE_GETGROUPS
+# undef HAVE_SCHED_H
+# undef HAVE_SENDFILE
+# undef HAVE_SETPRIORITY
+# undef HAVE_SPAWNV
+# undef HAVE_WAIT
+# undef HAVE_WAIT3
+# undef HAVE_WAIT4
+# undef HAVE_WAITPID
+#endif /* TARGET_OS_IPHONE */
/*[clinic input]
# one of the few times we lie about this name!
module os
[clinic start generated code]*/
/*[clinic end generated code: output=da39a3ee5e6b4b0d input=94a0f0f978acae17]*/
#ifndef _MSC_VER
« no previous file with comments | « Modules/mathmodule.c ('k') | Modules/pwdmodule.c » ('j') | no next file with comments »

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