[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: emacs-24.2.93 build problems

From: Jérémie Courrèges-Ang las
Subject: Re: emacs-24.2.93 build problems
Date: Tue, 05 Mar 2013 15:00:27 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.93 (berkeley-unix)

Glenn Morris <address@hidden> 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 (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: pgpoTWCMo2GYp.pgp
Description: PGP signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]