all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: jca+emacs@wxcvbn.org (Jérémie Courrèges-Anglas)
To: Glenn Morris <rgm@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: emacs-24.2.93 build problems
Date: Tue, 05 Mar 2013 15:00:27 +0100	[thread overview]
Message-ID: <87obeyeykk.fsf@moo.wxcvbn.org> (raw)
In-Reply-To: <x0zjyih5ia.fsf@fencepost.gnu.org> (Glenn Morris's message of "Mon, 04 Mar 2013 22:47:41 -0500")

[-- Attachment #1: Type: text/plain, Size: 2162 bytes --]

Glenn Morris <rgm@gnu.org> writes:

> Jérémie Courrèges-Anglas wrote:
>
>> I have no idea whether it is correct, but M-: (list-system-processes)
>> returns nil here on OpenBSD-current (5.3).
>
> Too late to make it work for 24.3, but could you make a bug report about
> this please?

Fine, I think I have a diff to make it work on all OpenBSD systems, that
could be included in the trunk, I just need to test it.

But as far as 24.3 is concerned, I *really* suggest making this
function a stub on OpenBSD (just returning Qnil).

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 >= 2010/01/10.

PS: I did not and I will not investigate the case of MirOS.
-- 
Jérémie Courrèges-Anglas
GPG Key fingerprint: 61DB D9A0 00A4 67CF 2A90  8961 6191 8FBF 06A1 1494

[-- Attachment #2: Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2013-03-05 14:00 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-02 23:00 emacs-24.2.93 build problems Nelson H. F. Beebe
2013-03-03  0:09 ` Paul Eggert
2013-03-04 20:34   ` Glenn Morris
2013-03-04 23:44     ` Jérémie Courrèges-Anglas
2013-03-05  3:47       ` Glenn Morris
2013-03-05 14:00         ` Jérémie Courrèges-Anglas [this message]
2013-03-05 14:52           ` emacs-24.2.93 build problems (on OpenBSD) Jérémie Courrèges-Anglas
2013-03-05 20:06             ` Glenn Morris
2013-03-05 17:06           ` emacs-24.2.93 build problems Glenn Morris
2013-03-05 17:24           ` list-system-processes on OpenBSD [was Re: emacs-24.2.93 build problems] Glenn Morris
2013-03-05 17:36             ` Paul Eggert
2013-03-05 20:42               ` list-system-processes on OpenBSD Glenn Morris
2013-03-05 21:57                 ` Paul Eggert
2013-03-05 22:30                   ` Jérémie Courrèges-Anglas
2013-03-06  0:38                     ` [24.3] possible build failure for list-system-processes on NetBSD Jérémie Courrèges-Anglas
2013-03-06  2:28                     ` [24.3] possible build failure for list-system-processes on DragonFlyBSD Jérémie Courrèges-Anglas
2013-03-06  3:12                       ` Glenn Morris
2013-03-06  5:07                         ` Paul Eggert
2013-03-06  7:30                           ` Glenn Morris
2013-03-06  2:31             ` list-system-processes on OpenBSD [was Re: emacs-24.2.93 build problems] Leo Liu
2013-03-04 23:51   ` emacs-24.2.93 build problems Glenn Morris
2013-03-05  2:06     ` Paul Eggert
     [not found] <CMM.0.94.0.1362444120.beebe@psi.math.utah.edu>
2013-03-05  2:17 ` Paul Eggert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87obeyeykk.fsf@moo.wxcvbn.org \
    --to=jca+emacs@wxcvbn.org \
    --cc=emacs-devel@gnu.org \
    --cc=rgm@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.