diff options
| author | Po Lu | 2023-01-28 14:29:51 +0800 |
|---|---|---|
| committer | Po Lu | 2023-01-28 14:29:51 +0800 |
| commit | e3b50ec8ec1b8d1246aa2496f3fe8bf98d354545 (patch) | |
| tree | eb8af058067faa02fc03d0b746250569d255b777 /src | |
| parent | 65dddd7c997d55b04456b0c1f1c9c0259016ad32 (diff) | |
| download | emacs-e3b50ec8ec1b8d1246aa2496f3fe8bf98d354545.tar.gz emacs-e3b50ec8ec1b8d1246aa2496f3fe8bf98d354545.zip | |
Update Android port
* INSTALL.android: Document support for gnutls and libgmp.
* build-aux/ndk-build-helper-1.mk (NDK_SO_NAMES, NDK_INCLUDES)
(SYSTEM_LIBRARIES):
* build-aux/ndk-build-helper-2.mk: Recursively resolve and add
shared library dependencies; even those of static libraries.
* build-aux/ndk-module-extract.awk: Fix makefile_imports code.
* configure.ac (ANDROID_SDK_18_OR_EARLIER, XCONFIGURE)
(LIBGMP_CFLAGS): Enable GMP and gnutls on Android.
* cross/ndk-build/Makefile.in (LOCAL_EXPORT_C_INCLUDES):
* cross/ndk-build/ndk-build-shared-library.mk: ($(call
objname,$(LOCAL_MODULE),$(basename $(1))))::($$(error
Unsupported suffix)::($(LOCAL_MODULE_FILENAME)):
* cross/ndk-build/ndk-build-static-library.mk: ($(call
objname,$(LOCAL_MODULE),$(basename $(1))))::($$(error
Unsupported suffix):
* cross/ndk-build/ndk-clear-vars.mk:
* cross/ndk-build/ndk-resolve.mk (NDK_SYSTEM_LIBRARIES):
(NDK_LOCAL_EXPORT_C_INCLUDES_$(LOCAL_MODULE)):
(NDK_SO_EXTRA_FLAGS_$(LOCAL_MODULE)):
Implement ``LOCAL_ASM_RULE'' and ``LOCAL_C_ADDITIONAL_FLAGS''
extensions for libgmp.
* doc/emacs/input.texi (Touchscreens): Document how to
horizontally scroll.
* java/org/gnu/emacs/EmacsActivity.java (attachWindow): Give the
view focus again if necessary.
(onPause): Call right super function.
* java/org/gnu/emacs/EmacsPreferencesActivity.java (onClick):
Clear dumpFileName lest Emacs try to load a nonexistent dump
file.
* java/org/gnu/emacs/EmacsView.java (onDetachedFromWindow)
(onAttachedToWindow): Call super functions.
(onCreateInputConnection): Make sure the IME never obscures
Emacs.
* java/org/gnu/emacs/EmacsWindow.java (EmacsWindow, onKeyDown)
(onKeyUp): Improve tracking of quit keys.
* lisp/isearch.el (isearch-mode): Bring up the onscreen
keyboard.
* lisp/touch-screen.el (touch-screen-current-tool): Add three
fields.
(touch-screen-handle-scroll): Allow hscrolling as well.
(touch-screen-handle-touch): Add additional fields to
`touch-screen-current-tool'.
* src/Makefile.in (LIBGMP_CFLAGS, EMACS_CFLAGS): Add new
variable.
* src/android.c (android_run_select_thread):
(android_write_event): Use pthread_cond_broadcast because
pthread_cond_signal does nothing on some Android
versions/devices?
Diffstat (limited to 'src')
| -rw-r--r-- | src/Makefile.in | 5 | ||||
| -rw-r--r-- | src/android.c | 7 |
2 files changed, 7 insertions, 5 deletions
diff --git a/src/Makefile.in b/src/Makefile.in index 60bb9c8f3a3..0921f6f1f96 100644 --- a/src/Makefile.in +++ b/src/Makefile.in | |||
| @@ -391,6 +391,8 @@ ANDROID_LIBS = @ANDROID_LIBS@ | |||
| 391 | ANDROID_LDFLAGS = @ANDROID_LDFLAGS@ | 391 | ANDROID_LDFLAGS = @ANDROID_LDFLAGS@ |
| 392 | ANDROID_CFLAGS = @ANDROID_CFLAGS@ | 392 | ANDROID_CFLAGS = @ANDROID_CFLAGS@ |
| 393 | 393 | ||
| 394 | LIBGMP_CFLAGS = @LIBGMP_CFLAGS@ | ||
| 395 | |||
| 394 | DUMPING=@DUMPING@ | 396 | DUMPING=@DUMPING@ |
| 395 | CHECK_STRUCTS = @CHECK_STRUCTS@ | 397 | CHECK_STRUCTS = @CHECK_STRUCTS@ |
| 396 | HAVE_PDUMPER = @HAVE_PDUMPER@ | 398 | HAVE_PDUMPER = @HAVE_PDUMPER@ |
| @@ -433,7 +435,8 @@ EMACS_CFLAGS=-Demacs $(MYCPPFLAGS) -I. -I$(srcdir) \ | |||
| 433 | $(LIBSYSTEMD_CFLAGS) $(JSON_CFLAGS) $(XSYNC_CFLAGS) $(TREE_SITTER_CFLAGS) \ | 435 | $(LIBSYSTEMD_CFLAGS) $(JSON_CFLAGS) $(XSYNC_CFLAGS) $(TREE_SITTER_CFLAGS) \ |
| 434 | $(LIBGNUTLS_CFLAGS) $(NOTIFY_CFLAGS) $(CAIRO_CFLAGS) \ | 436 | $(LIBGNUTLS_CFLAGS) $(NOTIFY_CFLAGS) $(CAIRO_CFLAGS) \ |
| 435 | $(WERROR_CFLAGS) $(HAIKU_CFLAGS) $(XCOMPOSITE_CFLAGS) $(XSHAPE_CFLAGS) \ | 437 | $(WERROR_CFLAGS) $(HAIKU_CFLAGS) $(XCOMPOSITE_CFLAGS) $(XSHAPE_CFLAGS) \ |
| 436 | $(ANDROID_CFLAGS) $(GIF_CFLAGS) $(JPEG_CFLAGS) $(SQLITE3_CFLAGS) | 438 | $(ANDROID_CFLAGS) $(GIF_CFLAGS) $(JPEG_CFLAGS) $(SQLITE3_CFLAGS) \ |
| 439 | $(LIBGMP_CFLAGS) | ||
| 437 | ALL_CFLAGS = $(EMACS_CFLAGS) $(WARN_CFLAGS) $(CFLAGS) | 440 | ALL_CFLAGS = $(EMACS_CFLAGS) $(WARN_CFLAGS) $(CFLAGS) |
| 438 | ALL_OBJC_CFLAGS = $(EMACS_CFLAGS) \ | 441 | ALL_OBJC_CFLAGS = $(EMACS_CFLAGS) \ |
| 439 | $(filter-out $(NON_OBJC_CFLAGS),$(WARN_CFLAGS)) $(CFLAGS) \ | 442 | $(filter-out $(NON_OBJC_CFLAGS),$(WARN_CFLAGS)) $(CFLAGS) \ |
diff --git a/src/android.c b/src/android.c index 379b54a65be..021bea1fc2f 100644 --- a/src/android.c +++ b/src/android.c | |||
| @@ -334,12 +334,11 @@ android_run_select_thread (void *data) | |||
| 334 | the event queue lock, because android_select will always | 334 | the event queue lock, because android_select will always |
| 335 | wait for this to complete before returning. */ | 335 | wait for this to complete before returning. */ |
| 336 | android_pselect_completed = true; | 336 | android_pselect_completed = true; |
| 337 | pthread_cond_signal (&event_queue.read_var); | 337 | pthread_cond_broadcast (&event_queue.read_var); |
| 338 | 338 | ||
| 339 | /* Read a single byte from the select pipe. */ | 339 | /* Read a single byte from the select pipe. */ |
| 340 | read (select_pipe[0], &byte, 1); | 340 | read (select_pipe[0], &byte, 1); |
| 341 | 341 | ||
| 342 | |||
| 343 | /* Signal the Emacs thread that pselect is done. If read_var | 342 | /* Signal the Emacs thread that pselect is done. If read_var |
| 344 | was signaled by android_write_event, event_queue.mutex could | 343 | was signaled by android_write_event, event_queue.mutex could |
| 345 | still be locked, so this must come before. */ | 344 | still be locked, so this must come before. */ |
| @@ -378,7 +377,7 @@ android_run_select_thread (void *data) | |||
| 378 | the event queue lock, because android_select will always | 377 | the event queue lock, because android_select will always |
| 379 | wait for this to complete before returning. */ | 378 | wait for this to complete before returning. */ |
| 380 | android_pselect_completed = true; | 379 | android_pselect_completed = true; |
| 381 | pthread_cond_signal (&event_queue.read_var); | 380 | pthread_cond_broadcast (&event_queue.read_var); |
| 382 | 381 | ||
| 383 | if (rc != -1 || errno != EINTR) | 382 | if (rc != -1 || errno != EINTR) |
| 384 | /* Now, wait for SIGUSR1, unless pselect was interrupted and | 383 | /* Now, wait for SIGUSR1, unless pselect was interrupted and |
| @@ -559,7 +558,7 @@ android_write_event (union android_event *event) | |||
| 559 | container->last->next = container; | 558 | container->last->next = container; |
| 560 | container->event = *event; | 559 | container->event = *event; |
| 561 | event_queue.num_events++; | 560 | event_queue.num_events++; |
| 562 | pthread_cond_signal (&event_queue.read_var); | 561 | pthread_cond_broadcast (&event_queue.read_var); |
| 563 | pthread_mutex_unlock (&event_queue.mutex); | 562 | pthread_mutex_unlock (&event_queue.mutex); |
| 564 | 563 | ||
| 565 | /* Now set pending_signals to true. This allows C-g to be handled | 564 | /* Now set pending_signals to true. This allows C-g to be handled |