[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
feature/android 761c763dd66 5/6: Update Android port
From: |
Po Lu |
Subject: |
feature/android 761c763dd66 5/6: Update Android port |
Date: |
Fri, 20 Jan 2023 09:18:22 -0500 (EST) |
branch: feature/android
commit 761c763dd66700f6eb5480cc55228b96d165960d
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>
Update Android port
* src/android.c (android_run_select_thread, android_select)
(android_ftruncate):
* src/android.h (ftruncate): Fix compilation on Android 16 and
up.
---
src/android.c | 29 +++--------------------------
src/android.h | 8 --------
2 files changed, 3 insertions(+), 34 deletions(-)
diff --git a/src/android.c b/src/android.c
index 47120a6b5f5..3f6e6f4576b 100644
--- a/src/android.c
+++ b/src/android.c
@@ -274,6 +274,7 @@ android_run_select_thread (void *data)
char byte;
#else
sigset_t signals, waitset;
+ int sig;
#endif
#if __ANDROID_API__ < 16
@@ -559,7 +560,9 @@ android_select (int nfds, fd_set *readfds, fd_set *writefds,
fd_set *exceptfds, struct timespec *timeout)
{
int nfds_return;
+#if __ANDROID_API__ < 16
static char byte;
+#endif
pthread_mutex_lock (&event_queue.mutex);
@@ -4498,32 +4501,6 @@ android_project_image_nearest (struct android_image
*image,
-/* System call wrappers for stuff missing in bionic. */
-
-#ifndef HAVE_FTRUNCATE
-
-/* ftruncate wrapper for Android, for systems without ftruncate in the
- C library.
-
- Such systems are always 32 bit systems, since Android 21 and later
- all support ftruncate. In addition, ARM and MIPS require registers
- used to store long long parameters to be aligned to an even
- register pair. */
-
-int
-android_ftruncate (int fd, off_t length)
-{
-#if defined __arm__ || defined __mips__
- return syscall (SYS_ftruncate64, fd, 0,
- (unsigned int) (length & 0xffffffff),
- (unsigned int) (length >> 32));
-#else
- return syscall (SYS_ftruncate64, fd, length);
-#endif
-}
-
-#endif
-
#else /* ANDROID_STUBIFY */
/* X emulation functions for Android. */
diff --git a/src/android.h b/src/android.h
index 97818ab4911..52b3412fb0e 100644
--- a/src/android.h
+++ b/src/android.h
@@ -104,14 +104,6 @@ extern struct android_dir *android_opendir (const char *);
extern struct dirent *android_readdir (struct android_dir *);
extern void android_closedir (struct android_dir *);
-#ifndef HAVE_FTRUNCATE
-extern int android_ftruncate (int, off_t);
-
-/* Replace calls to ftruncate with android_ftruncate when ftruncate is
- not defined. */
-#define ftruncate android_ftruncate
-#endif
-
#endif
- feature/android updated (f99f7599315 -> a03eeb01093), Po Lu, 2023/01/20
- feature/android e07b58dc35a 1/6: Check in missing file, Po Lu, 2023/01/20
- feature/android 26f0dd50898 4/6: Update Android port, Po Lu, 2023/01/20
- feature/android 761c763dd66 5/6: Update Android port,
Po Lu <=
- feature/android 01ee2bd07be 3/6: Remove unused file, Po Lu, 2023/01/20
- feature/android a03eeb01093 6/6: Merge remote-tracking branch 'origin/master' into feature/android, Po Lu, 2023/01/20
- feature/android d44b60c2f00 2/6: Update Android port, Po Lu, 2023/01/20