aboutsummaryrefslogtreecommitdiffstats
path: root/src/sysdep.c
diff options
context:
space:
mode:
authorPo Lu2023-09-07 09:35:59 +0800
committerPo Lu2023-09-07 09:35:59 +0800
commit8b25edfbda6ed8973b483f700571e00a60f27002 (patch)
tree994ff56260b8f6d582400ac511ee42f0cfa8af3e /src/sysdep.c
parent241616831024c9c9fe2b2378b611db0a560b9675 (diff)
downloademacs-8b25edfbda6ed8973b483f700571e00a60f27002.tar.gz
emacs-8b25edfbda6ed8973b483f700571e00a60f27002.zip
Port Proced to Android
* configure.ac (HAVE_PROCFS): Define if opsys is `android'. * src/android.c (android_set_task_name): New function. (android_run_select_thread, android_run_debug_thread): Set the name of the LWP for debugging purposes. * src/process.c (create_process): Set F_SETPIPE_SZ on Android in addition to GNU/Linux. * src/sysdep.c (procfs_ttyname, system_process_attributes) [__ANDROID__]: Enable procfs_ttyname on Android systems.
Diffstat (limited to 'src/sysdep.c')
-rw-r--r--src/sysdep.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/sysdep.c b/src/sysdep.c
index 52fbfbd1eb1..f49fed7da1e 100644
--- a/src/sysdep.c
+++ b/src/sysdep.c
@@ -3452,7 +3452,7 @@ make_lisp_timeval (struct timeval t)
3452 3452
3453#endif 3453#endif
3454 3454
3455#if defined (GNU_LINUX) || defined (CYGWIN) 3455#if defined (GNU_LINUX) || defined (CYGWIN) || defined __ANDROID__
3456 3456
3457static Lisp_Object 3457static Lisp_Object
3458time_from_jiffies (unsigned long long ticks, Lisp_Object hz, Lisp_Object form) 3458time_from_jiffies (unsigned long long ticks, Lisp_Object hz, Lisp_Object form)
@@ -3500,7 +3500,7 @@ get_up_time (void)
3500 return up; 3500 return up;
3501} 3501}
3502 3502
3503# ifdef GNU_LINUX 3503# if defined GNU_LINUX || defined __ANDROID__
3504#define MAJOR(d) (((unsigned)(d) >> 8) & 0xfff) 3504#define MAJOR(d) (((unsigned)(d) >> 8) & 0xfff)
3505#define MINOR(d) (((unsigned)(d) & 0xff) | (((unsigned)(d) & 0xfff00000) >> 12)) 3505#define MINOR(d) (((unsigned)(d) & 0xff) | (((unsigned)(d) & 0xfff00000) >> 12))
3506 3506
@@ -3546,7 +3546,7 @@ procfs_ttyname (int rdev)
3546 unblock_input (); 3546 unblock_input ();
3547 return build_string (name); 3547 return build_string (name);
3548} 3548}
3549# endif /* GNU_LINUX */ 3549# endif /* GNU_LINUX || __ANDROID__ */
3550 3550
3551static uintmax_t 3551static uintmax_t
3552procfs_get_total_memory (void) 3552procfs_get_total_memory (void)
@@ -3695,9 +3695,9 @@ system_process_attributes (Lisp_Object pid)
3695 attrs = Fcons (Fcons (Qppid, INT_TO_INTEGER (ppid)), attrs); 3695 attrs = Fcons (Fcons (Qppid, INT_TO_INTEGER (ppid)), attrs);
3696 attrs = Fcons (Fcons (Qpgrp, INT_TO_INTEGER (pgrp)), attrs); 3696 attrs = Fcons (Fcons (Qpgrp, INT_TO_INTEGER (pgrp)), attrs);
3697 attrs = Fcons (Fcons (Qsess, INT_TO_INTEGER (sess)), attrs); 3697 attrs = Fcons (Fcons (Qsess, INT_TO_INTEGER (sess)), attrs);
3698# ifdef GNU_LINUX 3698# if defined GNU_LINUX || defined __ANDROID__
3699 attrs = Fcons (Fcons (Qttname, procfs_ttyname (tty)), attrs); 3699 attrs = Fcons (Fcons (Qttname, procfs_ttyname (tty)), attrs);
3700# endif 3700# endif /* GNU_LINUX || __ANDROID__ */
3701 attrs = Fcons (Fcons (Qtpgid, INT_TO_INTEGER (tpgid)), attrs); 3701 attrs = Fcons (Fcons (Qtpgid, INT_TO_INTEGER (tpgid)), attrs);
3702 attrs = Fcons (Fcons (Qminflt, INT_TO_INTEGER (minflt)), attrs); 3702 attrs = Fcons (Fcons (Qminflt, INT_TO_INTEGER (minflt)), attrs);
3703 attrs = Fcons (Fcons (Qmajflt, INT_TO_INTEGER (majflt)), attrs); 3703 attrs = Fcons (Fcons (Qmajflt, INT_TO_INTEGER (majflt)), attrs);