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

Side by Side Diff: Modules/posixmodule.c

Issue 23670: Modifications to support iOS as a development platform
Patch Set: Created 3 years, 8 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/pwdmodule.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 /* POSIX module implementation */ 2 /* POSIX module implementation */
3 3
4 /* This file is also used for Windows NT/MS-Win. In that case the 4 /* This file is also used for Windows NT/MS-Win. In that case the
5 module actually calls itself 'nt', not 'posix', and a few 5 module actually calls itself 'nt', not 'posix', and a few
6 functions are either unimplemented or implemented differently. The source 6 functions are either unimplemented or implemented differently. The source
7 assumes that for Windows NT, the macro 'MS_WINDOWS' is defined independent 7 assumes that for Windows NT, the macro 'MS_WINDOWS' is defined independent
8 of the compiler used. Different compilers define their own feature 8 of the compiler used. Different compilers define their own feature
9 test macro, e.g. '_MSC_VER'. */ 9 test macro, e.g. '_MSC_VER'. */
10 10
11 11
12 12
13 #ifdef __APPLE__ 13 #ifdef __APPLE__
14 /* 14 /*
15 * Step 1 of support for weak-linking a number of symbols existing on 15 * Step 1 of support for weak-linking a number of symbols existing on
16 * OSX 10.4 and later, see the comment in the #ifdef __APPLE__ block 16 * OSX 10.4 and later, see the comment in the #ifdef __APPLE__ block
17 * at the end of this file for more information. 17 * at the end of this file for more information.
18 */ 18 */
19 # pragma weak lchown 19 # pragma weak lchown
20 # pragma weak statvfs 20 # pragma weak statvfs
21 # pragma weak fstatvfs 21 # pragma weak fstatvfs
22
23 # include "TargetConditionals.h"
22 24
23 #endif /* __APPLE__ */ 25 #endif /* __APPLE__ */
24 26
25 #define PY_SSIZE_T_CLEAN 27 #define PY_SSIZE_T_CLEAN
26 28
27 #include "Python.h" 29 #include "Python.h"
28 #include "structmember.h" 30 #include "structmember.h"
29 #ifndef MS_WINDOWS 31 #ifndef MS_WINDOWS
30 #include "posixmodule.h" 32 #include "posixmodule.h"
31 #else 33 #else
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 #define HAVE_GETUID 1 170 #define HAVE_GETUID 1
169 #define HAVE_KILL 1 171 #define HAVE_KILL 1
170 #define HAVE_OPENDIR 1 172 #define HAVE_OPENDIR 1
171 #define HAVE_PIPE 1 173 #define HAVE_PIPE 1
172 #define HAVE_SYSTEM 1 174 #define HAVE_SYSTEM 1
173 #define HAVE_WAIT 1 175 #define HAVE_WAIT 1
174 #define HAVE_TTYNAME 1 176 #define HAVE_TTYNAME 1
175 #endif /* _MSC_VER */ 177 #endif /* _MSC_VER */
176 #endif /* ! __WATCOMC__ || __QNX__ */ 178 #endif /* ! __WATCOMC__ || __QNX__ */
177 179
180 // iOS *defines* a number of POSIX functions, but you can't use them
181 // because iOS isn't a conventional multiprocess environment.
182 #if TARGET_OS_IPHONE
183 # undef HAVE_EXECV
184 # undef HAVE_FORK
185 # undef HAVE_FORK1
186 # undef HAVE_FORKPTY
187 # undef HAVE_GETGROUPS
188 # undef HAVE_SCHED_H
189 # undef HAVE_SENDFILE
190 # undef HAVE_SETPRIORITY
191 # undef HAVE_SPAWNV
192 # undef HAVE_WAIT
193 # undef HAVE_WAIT3
194 # undef HAVE_WAIT4
195 # undef HAVE_WAITPID
196 #endif /* TARGET_OS_IPHONE */
178 197
179 /*[clinic input] 198 /*[clinic input]
180 # one of the few times we lie about this name! 199 # one of the few times we lie about this name!
181 module os 200 module os
182 [clinic start generated code]*/ 201 [clinic start generated code]*/
183 /*[clinic end generated code: output=da39a3ee5e6b4b0d input=94a0f0f978acae17]*/ 202 /*[clinic end generated code: output=da39a3ee5e6b4b0d input=94a0f0f978acae17]*/
184 203
185 #ifndef _MSC_VER 204 #ifndef _MSC_VER
186 205
187 #if defined(__sgi)&&_COMPILER_VERSION>=700 206 #if defined(__sgi)&&_COMPILER_VERSION>=700
(...skipping 13014 matching lines...) Expand 10 before | Expand all | Expand 10 after
13202 PyModule_AddObject(m, "_have_functions", list); 13221 PyModule_AddObject(m, "_have_functions", list);
13203 13222
13204 initialized = 1; 13223 initialized = 1;
13205 13224
13206 return m; 13225 return m;
13207 } 13226 }
13208 13227
13209 #ifdef __cplusplus 13228 #ifdef __cplusplus
13210 } 13229 }
13211 #endif 13230 #endif
OLDNEW
« 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+