From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Glenn Morris Newsgroups: gmane.emacs.devel Subject: list-system-processes on OpenBSD [was Re: emacs-24.2.93 build problems] Date: Tue, 05 Mar 2013 12:24:45 -0500 Message-ID: References: <513294CE.5060101@cs.ucla.edu> <87a9qi687k.fsf@moo.wxcvbn.org> <87obeyeykk.fsf@moo.wxcvbn.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1362504635 11425 80.91.229.3 (5 Mar 2013 17:30:35 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 5 Mar 2013 17:30:35 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Mar 05 18:31:00 2013 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UCvha-0005m5-6V for ged-emacs-devel@m.gmane.org; Tue, 05 Mar 2013 18:30:58 +0100 Original-Received: from localhost ([::1]:53390 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UCvhE-0001Br-Kw for ged-emacs-devel@m.gmane.org; Tue, 05 Mar 2013 12:30:36 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:37159) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UCvbc-0001N9-Pl for emacs-devel@gnu.org; Tue, 05 Mar 2013 12:24:50 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UCvbb-0006T4-2W for emacs-devel@gnu.org; Tue, 05 Mar 2013 12:24:48 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:41498) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UCvba-0006Sy-Uw for emacs-devel@gnu.org; Tue, 05 Mar 2013 12:24:46 -0500 Original-Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1UCvbZ-0003Er-U2; Tue, 05 Mar 2013 12:24:45 -0500 X-Spook: Leitrim supercomputer Noriega nuclear INSCOM Cohiba SHA X-Ran: <71}99}QYYqSX-QT\g@/`[va+0z%U{pt< (=?utf-8?Q?=22J=C3=A9r=C3=A9m?= =?utf-8?Q?ie_Courr=C3=A8ges-Anglas=22's?= message of "Tue, 05 Mar 2013 15:00:27 +0100") User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:157532 Archived-At: J=C3=A9r=C3=A9mie Courr=C3=A8ges-Anglas wrote: > But as far as 24.3 is concerned, I *really* suggest making this > function a stub on OpenBSD (just returning Qnil). I'm inclined to agree with this. Any other opinions? Ref http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D11797 http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D5725 http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D5243 > Here's why: > > There are two different APIs involved: > - old KERN_PROC, similar to NetBSD > - new KERN_PROC, completely different > > Here's how they have evolved: > > 1. old KERN_PROC API present and visible (usable) > sysctl.h rev 1.1.1.1 (1995/10/18) -> rev 1.67 (2003/12/23) > > 2. new KERN_PROC API added as KERN_PROC2, old KERN_PROC still available > sysctl.h rev 1.68 (2004/01/07) -> rev 1.100 (2009/06/15) > > 3. old KERN_PROC becomes hidden behind #ifdef's > sysctl rev 1.101 (2010/01/10) -> rev 1.108 (2011/03/07) > > 4. old KERN_PROC is removed, the new KERN_PROC replaces it, KERN_PROC2 > aliases still present for backward compat > sysctl.h rev 1.109 (2011/03/12) -> rev 1.119 (2011/12/14) > > 5. KERN_PROC2 aliases removed, only the new API remains > sysctl.h rev 1.120 (2012/01/07) -> now > > > I've done some _light_ testing and here are the results: > > - with or without the patch adding fallback to KERN_PROC2, build fails > for cases 1 and 2. (This is because p_pid field wasn't present in > struct kinfo_proc at that time.) > > - with the patch, build doesn't fail for case 3 > > - with the patch, cases 3, 4 and 5 will have list-system-processes > returning nil, since sysctl() is called with a wrong mib. > > So supporting list-system-processes (as-is) on OpenBSD for 24.3 leads to > build failing with 1995/10/18 < OpenBSD < 2010/01/10 and to a useless > (and potentially harmful) function with OpenBSD >=3D 2010/01/10. > > PS: I did not and I will not investigate the case of MirOS.