Commit f3047c75 authored by Paul Eggert's avatar Paul Eggert
Browse files

* sysdep.c (list_system_processes): Port to NetBSD-current.

Fixes: debbugs:11797
parent 31571fd7
2012-07-07 Paul Eggert <eggert@cs.ucla.edu>
* sysdep.c (list_system_processes): Port to NetBSD-current (Bug#11797).
Do not require float-time's arg to fit in time_t (Bug#11825).
This works better on hosts where time_t is unsigned, and where
float-time is applied to the (negative) difference between two times.
......
......@@ -2520,7 +2520,7 @@ list_system_processes (void)
Lisp_Object
list_system_processes (void)
{
#if defined DARWIN_OS || defined __OpenBSD__
#if defined DARWIN_OS || defined __NetBSD__ || defined __OpenBSD__
int mib[] = {CTL_KERN, KERN_PROC, KERN_PROC_ALL};
#else
int mib[] = {CTL_KERN, KERN_PROC, KERN_PROC_PROC};
......@@ -2546,7 +2546,7 @@ list_system_processes (void)
len /= sizeof (struct kinfo_proc);
for (i = 0; i < len; i++)
{
#ifdef DARWIN_OS
#if defined DARWIN_OS || defined __NetBSD__
proclist = Fcons (make_fixnum_or_float (procs[i].kp_proc.p_pid), proclist);
#elif defined __OpenBSD__
proclist = Fcons (make_fixnum_or_float (procs[i].p_pid), proclist);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment