8000 Clean up AT_EACCESS patch. · rave-engine/python3-android@a9f04e4 · GitHub
[go: up one dir, main page]

Skip to content

Commit a9f04e4

Browse files
committed
Clean up AT_EACCESS patch.
1 parent 9eb7d83 commit a9f04e4

File tree

1 file changed

+13
-34
lines changed

1 file changed

+13
-34
lines changed

mk/python/3.3.5/python-3.3.5-android-misc.patch

Lines changed: 13 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -158,41 +158,20 @@ diff -ru Python-3.3.5/Modules/socketmodule.c Python-3.3.5-android/Modules/socket
158158
# else
159159
# undef HAVE_GETHOSTBYNAME_R
160160
diff -ru Python-3.3.5/Modules/posixmodule.c Python-3.3.5-android/Modules/posixmodule.c
161-
--- Python-3.3.5/Modules/posixmodule.c 2014-03-09 04:40:28.000000000 -0400
162-
+++ Python-3.3.5-android/Modules/posixmodule.c 2015-02-23 10:44:09.000000000 -0500
163-
@@ -2585,19 +2585,19 @@
164-
#else
161+
--- Python-3.3.5/Modules/posixmodule.c 2014-03-09 08:40:28.000000000 +0000
162+
+++ Python-3.3.5-android/Modules/posixmodule.c 2015-02-24 19:57:05.368843433 +0000
163+
@@ -403,6 +403,11 @@
164+
#endif
165+
#endif
166+
167+
+/* Android doesn't expose AT_EACCESS - manually define it. */
168+
+#if !defined(AT_EACCESS) && defined(__ANDROID__)
169+
+#define AT_EACCESS 0x200
170+
+#endif
171+
+
165172

166-
Py_BEGIN_ALLOW_THREADS
167-
-#ifdef HAVE_FACCESSAT
168-
- if ((dir_fd != DEFAULT_DIR_FD) ||
169-
- effective_ids ||
170-
- !follow_symlinks) {
171-
- int flags = 0;
172-
- if (!follow_symlinks)
173-
- flags |= AT_SYMLINK_NOFOLLOW;
174-
- if (effective_ids)
175-
- flags |= AT_EACCESS;
176-
- result = faccessat(dir_fd, path.narrow, mode, flags);
177-
- }
178-
- else
179-
-#endif
180-
+// #ifdef HAVE_FACCESSAT
181-
+// if ((dir_fd != DEFAULT_DIR_FD) ||
182-
+// effective_ids ||
183-
+// !follow_symlinks) {
184-
+// int flags = 0;
185-
+// if (!follow_symlinks)
186-
+// flags |= AT_SYMLINK_NOFOLLOW;
187-
+// if (effective_ids)
188-
+// flags |= AT_EACCESS;
189-
+// result = faccessat(dir_fd, path.narrow, mode, flags);
190-
+// }
191-
+// else
192-
+// #endif
193-
result = access(path.narrow, mode);
194-
Py_END_ALLOW_THREADS
195-
return_value = PyBool_FromLong(!result);
173+
#ifdef MS_WINDOWS
174+
static int
196175
diff -ru Python-3.3.5/Python/pytime.c Python-3.3.5-android/Python/pytime.c
197176
--- Python-3.3.5/Python/pytime.c 2015-02-23 11:54:25.000000000 -0500
198177
+++ Python-3.3.5-android/Python/pytime.c 2015-02-23 11:55:19.000000000 -0500

0 commit comments

Comments
 (0)
0