aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPo Lu2023-08-16 20:32:04 +0800
committerPo Lu2023-08-16 20:32:38 +0800
commitf2f2e6a082a541c60eb25ad6d30707e111082811 (patch)
tree5025a94d03771c88061af5e831650e8adc8b2a9f /src
parent22d031f644d38e385f422ffc4855385d9052659b (diff)
downloademacs-f2f2e6a082a541c60eb25ad6d30707e111082811.tar.gz
emacs-f2f2e6a082a541c60eb25ad6d30707e111082811.zip
Update Android port
* 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)
Diffstat (limited to 'src')
-rw-r--r--src/sysdep.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/sysdep.c b/src/sysdep.c
index 0f8b70c8248..52fbfbd1eb1 100644
--- a/src/sysdep.c
+++ b/src/sysdep.c
@@ -2972,14 +2972,16 @@ void
2972close_output_streams (void) 2972close_output_streams (void)
2973{ 2973{
2974 /* Android comes with some kind of ``file descriptor sanitizer'' 2974 /* Android comes with some kind of ``file descriptor sanitizer''
2975 that aborts when stdout or stderr is closed. */ 2975 that aborts when stdout or stderr is closed. (bug#65340)
2976 2976
2977#if defined HAVE_ANDROID && !defined ANDROID_STUBIFY 2977 Perform this unconditionally as long as __ANDROID__ is defined,
2978 since the file descriptor sanitizer also applies to regular TTY
2979 builds under Android. */
2980
2981#ifdef __ANDROID__
2978 fflush (stderr); 2982 fflush (stderr);
2979 fflush (stdout); 2983 fflush (stdout);
2980 return; 2984#else /* !__ANDROID__ */
2981#endif
2982
2983 if (close_stream (stdout) != 0) 2985 if (close_stream (stdout) != 0)
2984 { 2986 {
2985 emacs_perror ("Write error to standard output"); 2987 emacs_perror ("Write error to standard output");
@@ -2993,6 +2995,7 @@ close_output_streams (void)
2993 ? fflush (stderr) != 0 || ferror (stderr) 2995 ? fflush (stderr) != 0 || ferror (stderr)
2994 : close_stream (stderr) != 0)) 2996 : close_stream (stderr) != 0))
2995 _exit (EXIT_FAILURE); 2997 _exit (EXIT_FAILURE);
2998#endif /* __ANDROID__ */
2996} 2999}
2997 3000
2998#ifndef DOS_NT 3001#ifndef DOS_NT