1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-18 10:16:51 +00:00

Fix a build failure on OpenBSD 4.x and MirBSD.

* sysdep.c (list_system_processes): Make it a stub on all BSD_SYSTEM
hosts, except for DARWIN_OS and FreeBSD where it's been tested.

Fixes: debbugs:13881
This commit is contained in:
Paul Eggert 2013-03-05 23:46:09 -08:00
parent 9b1c327138
commit 0845a75c6a
2 changed files with 6 additions and 5 deletions

View File

@ -1,9 +1,10 @@
2013-03-05 Paul Eggert <eggert@cs.ucla.edu>
Fix a build failure on OpenBSD 4.x and MirBSD (Bug#13881).
* sysdep.c (list_system_processes) [__OpenBSD__ || __MirBSD__]:
* sysdep.c (list_system_processes)
[BSD_SYSTEM && !DARWIN_OS && !__FreeBSD__]:
Make it a stub in this case; otherwise the build might fail,
and even if the build worked the function would just return nil anyway.
and this code hasn't been tested on such hosts anyway.
Problem reported by Nelson H. F. Beebe in
<http://lists.gnu.org/archive/html/emacs-devel/2013-03/msg00021.html>
and analyzed by Jérémie Courrèges-Anglas in

View File

@ -2647,12 +2647,12 @@ list_system_processes (void)
return proclist;
}
#elif defined BSD_SYSTEM && !defined __OpenBSD__ && !defined __MirBSD__
#elif defined DARWIN_OS || defined __FreeBSD__
Lisp_Object
list_system_processes (void)
{
#if defined DARWIN_OS || defined __NetBSD__
#ifdef DARWIN_OS
int mib[] = {CTL_KERN, KERN_PROC, KERN_PROC_ALL};
#else
int mib[] = {CTL_KERN, KERN_PROC, KERN_PROC_PROC};
@ -2678,7 +2678,7 @@ list_system_processes (void)
len /= sizeof (struct kinfo_proc);
for (i = 0; i < len; i++)
{
#if defined DARWIN_OS || defined __NetBSD__
#ifdef DARWIN_OS
proclist = Fcons (make_fixnum_or_float (procs[i].kp_proc.p_pid), proclist);
#else
proclist = Fcons (make_fixnum_or_float (procs[i].ki_pid), proclist);