* configure.ac: Test for getpwent using gl_CHECK_FUNCS_ANDROID.
(bug#65319)
* etc/MACHINES (Android): Mention that a non-GUI build is also
possible on Android.
* lisp/loadup.el: Provide for regular builds on Android.
(bug#65339)
* lisp/wid-edit.el (widget-event-start): Remove function, since
event-start now does the same thing.
(widget-button--check-and-call-button, widget-button-click):
Adjust correspondingly. Reported by Stefan Monnier
<monnier@iro.umontreal.ca>.
* src/sysdep.c (close_output_streams): Apply workarounds for the
file descriptor sanitizer on all builds where __ANDROID__ is
defined, not just Android port builds. (bug#65340)
pthread_sigmask strsignal setitimer \
sendto recvfrom getsockname getifaddrs freeifaddrs \
gai_strerror sync \
-getpwent endpwent getgrent endgrent \
+endpwent getgrent endgrent \
renameat2 \
cfmakeraw cfsetspeed __executable_start log2 pthread_setname_np \
pthread_set_name_np])
+# getpwent is not present in older versions of Android. (bug#65319)
+gl_CHECK_FUNCS_ANDROID([getpwent], [[#include <pwd.h>]])
+
if test "$ac_cv_func_cfmakeraw" != "yes"; then
# On some systems (Android), cfmakeraw is inline, so AC_CHECK_FUNCS
# cannot find it. Check if some code including termios.h and using
See the file java/INSTALL for detailed installation instructions.
+ It is also possible to build Emacs for Android systems without using
+ GUI capabilities provided by the Android port. We do not know
+ exactly which configurations this works on, but the installation
+ instructions for such a build should be the same as for any Unix
+ system.
+
\f
* Obsolete platforms
\f
-(if (eq system-type 'android)
+(if (and (eq system-type 'android)
+ (featurep 'android))
(progn
;; Dumping Emacs on Android works slightly differently from
;; everywhere else. The first time Emacs starts, Emacs dumps
;; There's no point keeping old dumps around for
;; the binary used to build Lisp on the build
;; machine.
- (featurep 'android)
+ (or (featurep 'android)
+ ;; And if this branch is reached with
+ ;; `system-type' set to Android, this is a
+ ;; regular Emacs TTY build. (bug#65339)
+ (eq system-type 'android))
;; Don't bother adding another name if we're just
;; building bootstrap-emacs.
(member dump-mode '("pbootstrap" "bootstrap"))))
"If non-nil, `widget-button-click' moves point to a button after invoking it.
If nil, point returns to its original position after invoking a button.")
-(defun widget-event-start (event)
- "Return the start of EVENT.
-If EVENT is not a touchscreen event, simply return its
-`event-start'. Otherwise, it is a touchscreen event, so return
-the posn of its touchpoint."
- (if (eq (car event) 'touchscreen-begin)
- (cdadr event)
- (event-start event)))
-
(defun widget-button--check-and-call-button (event button)
"Call BUTTON if BUTTON is a widget and EVENT is correct for it.
EVENT can either be a mouse event or a touchscreen-begin event.
;; in a save-excursion so that the click on the button
;; doesn't change point.
(save-selected-window
- (select-window (posn-window (widget-event-start event)))
+ (select-window (posn-window (event-start event)))
(save-excursion
- (goto-char (posn-point (widget-event-start event)))
+ (goto-char (posn-point (event-start event)))
(let* ((overlay (widget-get button :button-overlay))
(pressed-face (or (widget-get button :pressed-face)
widget-button-pressed-face))
(if (widget-event-point event)
(let* ((mouse-1 (memq (event-basic-type event) '(mouse-1 down-mouse-1)))
(pos (widget-event-point event))
- (start (widget-event-start event))
+ (start (event-start event))
(button (get-char-property
pos 'button (and (windowp (posn-window start))
(window-buffer (posn-window start))))))
close_output_streams (void)
{
/* Android comes with some kind of ``file descriptor sanitizer''
- that aborts when stdout or stderr is closed. */
+ that aborts when stdout or stderr is closed. (bug#65340)
-#if defined HAVE_ANDROID && !defined ANDROID_STUBIFY
+ Perform this unconditionally as long as __ANDROID__ is defined,
+ since the file descriptor sanitizer also applies to regular TTY
+ builds under Android. */
+
+#ifdef __ANDROID__
fflush (stderr);
fflush (stdout);
- return;
-#endif
-
+#else /* !__ANDROID__ */
if (close_stream (stdout) != 0)
{
emacs_perror ("Write error to standard output");
? fflush (stderr) != 0 || ferror (stderr)
: close_stream (stderr) != 0))
_exit (EXIT_FAILURE);
+#endif /* __ANDROID__ */
}
\f
#ifndef DOS_NT