aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert2013-03-05 23:46:09 -0800
committerPaul Eggert2013-03-05 23:46:09 -0800
commit0845a75c6a624f88e232499a4c1dd7ff3c6eef5a (patch)
tree15b39356bf035aac7643e90f2a6f6d1cf595ba9d /src
parent9b1c32713812fa4e0085583469d9f739b7943d50 (diff)
downloademacs-0845a75c6a624f88e232499a4c1dd7ff3c6eef5a.tar.gz
emacs-0845a75c6a624f88e232499a4c1dd7ff3c6eef5a.zip
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
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog5
-rw-r--r--src/sysdep.c6
2 files changed, 6 insertions, 5 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 18b22b5da46..f67046ebd43 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,9 +1,10 @@
12013-03-05 Paul Eggert <eggert@cs.ucla.edu> 12013-03-05 Paul Eggert <eggert@cs.ucla.edu>
2 2
3 Fix a build failure on OpenBSD 4.x and MirBSD (Bug#13881). 3 Fix a build failure on OpenBSD 4.x and MirBSD (Bug#13881).
4 * sysdep.c (list_system_processes) [__OpenBSD__ || __MirBSD__]: 4 * sysdep.c (list_system_processes)
5 [BSD_SYSTEM && !DARWIN_OS && !__FreeBSD__]:
5 Make it a stub in this case; otherwise the build might fail, 6 Make it a stub in this case; otherwise the build might fail,
6 and even if the build worked the function would just return nil anyway. 7 and this code hasn't been tested on such hosts anyway.
7 Problem reported by Nelson H. F. Beebe in 8 Problem reported by Nelson H. F. Beebe in
8 <http://lists.gnu.org/archive/html/emacs-devel/2013-03/msg00021.html> 9 <http://lists.gnu.org/archive/html/emacs-devel/2013-03/msg00021.html>
9 and analyzed by Jérémie Courrèges-Anglas in 10 and analyzed by Jérémie Courrèges-Anglas in
diff --git a/src/sysdep.c b/src/sysdep.c
index 80c7e0bc51e..19c56869ea0 100644
--- a/src/sysdep.c
+++ b/src/sysdep.c
@@ -2647,12 +2647,12 @@ list_system_processes (void)
2647 return proclist; 2647 return proclist;
2648} 2648}
2649 2649
2650#elif defined BSD_SYSTEM && !defined __OpenBSD__ && !defined __MirBSD__ 2650#elif defined DARWIN_OS || defined __FreeBSD__
2651 2651
2652Lisp_Object 2652Lisp_Object
2653list_system_processes (void) 2653list_system_processes (void)
2654{ 2654{
2655#if defined DARWIN_OS || defined __NetBSD__ 2655#ifdef DARWIN_OS
2656 int mib[] = {CTL_KERN, KERN_PROC, KERN_PROC_ALL}; 2656 int mib[] = {CTL_KERN, KERN_PROC, KERN_PROC_ALL};
2657#else 2657#else
2658 int mib[] = {CTL_KERN, KERN_PROC, KERN_PROC_PROC}; 2658 int mib[] = {CTL_KERN, KERN_PROC, KERN_PROC_PROC};
@@ -2678,7 +2678,7 @@ list_system_processes (void)
2678 len /= sizeof (struct kinfo_proc); 2678 len /= sizeof (struct kinfo_proc);
2679 for (i = 0; i < len; i++) 2679 for (i = 0; i < len; i++)
2680 { 2680 {
2681#if defined DARWIN_OS || defined __NetBSD__ 2681#ifdef DARWIN_OS
2682 proclist = Fcons (make_fixnum_or_float (procs[i].kp_proc.p_pid), proclist); 2682 proclist = Fcons (make_fixnum_or_float (procs[i].kp_proc.p_pid), proclist);
2683#else 2683#else
2684 proclist = Fcons (make_fixnum_or_float (procs[i].ki_pid), proclist); 2684 proclist = Fcons (make_fixnum_or_float (procs[i].ki_pid), proclist);