unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Han Boetes <hboetes@gmail.com>
To: 11797@debbugs.gnu.org
Cc: Paul Eggert <eggert@cs.ucla.edu>
Subject: bug#11797: trunk does not build on NetBSD
Date: Sat, 07 Jul 2012 11:14:28 +0200	[thread overview]
Message-ID: <4FF7FDF4.9050202@gmail.com> (raw)
In-Reply-To: <CADfJ1PbKSr1wz=N605nrp5tY8pN4x2xJ6Kk8-Pq=VaDeJXh6ww@mail.gmail.com>

I noticed a similar problem on OpenBSD not building and offered Paul
Eggert an account on my machine so he could fix the issue. This is what
he changed. Since he used __OpenBSD__ I don't think it will work on
NetBSD but it's a sure step in the right direction.

Please consider reading:

http://www.openbsd.org/faq/ports/guide.html#PortsGeneric





~/nfs/Emacs/emacs% bzr diff -r-40.. src/sysdep.c
=== modified file 'src/sysdep.c'
--- src/sysdep.c        2012-07-05 18:35:48 +0000
+++ src/sysdep.c        2012-07-06 08:28:29 +0000
@@ -38,17 +38,17 @@
 #include "sysselect.h"
 #include "blockinput.h"

+#ifdef BSD_SYSTEM
+#include <sys/param.h>
+#include <sys/sysctl.h>
+#endif
+
 #ifdef __FreeBSD__
-#include <sys/sysctl.h>
 #include <sys/user.h>
 #include <sys/resource.h>
 #include <math.h>
 #endif

-#ifdef DARWIN_OS
-#include <sys/sysctl.h>
-#endif
-
 #ifdef WINDOWSNT
 #define read sys_read
 #define write sys_write
@@ -2520,7 +2520,7 @@
 Lisp_Object
 list_system_processes (void)
 {
-#ifdef DARWIN_OS
+#if defined DARWIN_OS || defined __OpenBSD__
   int mib[] = {CTL_KERN, KERN_PROC, KERN_PROC_ALL};
 #else
   int mib[] = {CTL_KERN, KERN_PROC, KERN_PROC_PROC};
@@ -2548,6 +2548,8 @@
     {
 #ifdef DARWIN_OS
       proclist = Fcons (make_fixnum_or_float (procs[i].kp_proc.p_pid),
proclist);
+#elif defined __OpenBSD__
+      proclist = Fcons (make_fixnum_or_float (procs[i].p_pid), proclist);
 #else
       proclist = Fcons (make_fixnum_or_float (procs[i].ki_pid), proclist);
 #endif






  parent reply	other threads:[~2012-07-07  9:14 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-27  9:44 bug#11797: trunk does not build on NetBSD Herbert J. Skuhra
2012-06-28  0:05 ` Glenn Morris
2012-06-28 10:18   ` Herbert J. Skuhra
2012-06-28 17:29     ` Glenn Morris
2012-07-07  2:35 ` Paul Eggert
2012-07-07  9:14 ` Han Boetes [this message]
2012-07-13  1:27 ` bug#11797: fixed in trunk 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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=4FF7FDF4.9050202@gmail.com \
    --to=hboetes@gmail.com \
    --cc=11797@debbugs.gnu.org \
    --cc=eggert@cs.ucla.edu \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).