pkgsrc-Bugs archive

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

Re: pkg/49934: libgtop doesn't build after the sysvcompat modularization



Looks good to me.

_KERNEL hasn't been needed for struct {shm,sem}info since
/*     $NetBSD: sem.h,v 1.12 2000/06/02 15:53:05 simonb Exp $  */
/*     $NetBSD: shm.h,v 1.26 2000/06/02 15:53:05 simonb Exp $  */


commit 752750474bdbaefdc14dc629933e21fbef37a00e
Author: simonb <simonb>
Date:   Fri Jun 2 15:53:03 2000 +0000

    Add new sysctl node "KERN_SYSVIPC_INFO" with "KERN_SYSVIPC_MSG_INFO",
    "KERN_SYSVIPC_SEM_INFO" and "KERN_SYSVIPC_SHM_INFO" to return the
    info and data structures for the relevent SysV IPC types.  The return
    structures use fixed-size types and should be compat32 safe.  All
    user-visible changes are protected with
        #if !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)
    
    Make all variable declarations extern in msg.h, sem.h and shm.h and
    add relevent variable declarations to sysv_*.c and remove unneeded
    header files from those .c files.
    
    Make compat14 SysV IPC conversion functions and sysctl_file() static.
    
    Change the data pointer to "void *" in sysctl_clockrate(),
    sysctl_ntptime(), sysctl_file() and sysctl_doeproc().

Upstream libgtop is in a sorry state, e.g., Juan Pardines' processor
affinity support patch from 2008 is still sitting in bugzilla.gnome.org.

I went for a possibly slightly more blunt patch (attached).

Thoughts?
Index: distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/sysutils/libgtop/distinfo,v
retrieving revision 1.28
diff -u -r1.28 distinfo
--- distinfo	26 Feb 2013 15:54:16 -0000	1.28
+++ distinfo	5 Jun 2015 16:07:38 -0000
@@ -36,6 +36,8 @@
 SHA1 (patch-dl) = 9d6a44be02ec21d195076125c0cdfe5b51a0ab0a
 SHA1 (patch-dm) = ef08973aecacb1fb69f258632dd36edfdafd8c50
 SHA1 (patch-dn) = 66f66731a3abd1290f67d62f9ef654f68756bccb
+SHA1 (patch-sysdeps_bsd_sem_limits.c) = 0cdc5e85a4d8d1297f2f658c1f345bf54abfb02c
+SHA1 (patch-sysdeps_bsd_shm_limits.c) = 2750d6b5c440f6071111c62ef1069d07867edcf2
 SHA1 (patch-sysdeps_freebsd_procwd.c) = 89961a4115785809b1a1dc5dd07f263cf35cf1b8
 SHA1 (patch-sysdeps_solaris_glibtop__server.h) = ed3a657ecc024d0d5edc3d436e593b86ed39d726
 SHA1 (patch-sysdeps_solaris_procopenfiles.c) = 8aef9e53cdd9d2e13a964e0cde43e71b507fcfa5
Index: patches/patch-sysdeps_bsd_sem_limits.c
===================================================================
RCS file: patches/patch-sysdeps_bsd_sem_limits.c
diff -N patches/patch-sysdeps_bsd_sem_limits.c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ patches/patch-sysdeps_bsd_sem_limits.c	5 Jun 2015 16:07:38 -0000
@@ -0,0 +1,20 @@
+$NetBSD$
+
+struct seminfo is available without the need for _KERNEL.
+
+--- sysdeps/bsd/sem_limits.c.orig	2011-06-01 15:40:47.000000000 +0000
++++ sysdeps/bsd/sem_limits.c
+@@ -45,11 +45,13 @@ glibtop_get_sem_limits_p (glibtop *serve
+ 
+ /* #define KERNEL to get declaration of `struct seminfo'. */
+ 
++#ifndef __NetBSD__
+ #if (defined(__FreeBSD__) && (__FreeBSD_version < 410000)) || defined(__bsdi__)
+ #define KERNEL 1
+ #else
+ #define _KERNEL 1
+ #endif
++#endif
+ 
+ #include <sys/ipc.h>
+ #include <sys/sem.h>
Index: patches/patch-sysdeps_bsd_shm_limits.c
===================================================================
RCS file: patches/patch-sysdeps_bsd_shm_limits.c
diff -N patches/patch-sysdeps_bsd_shm_limits.c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ patches/patch-sysdeps_bsd_shm_limits.c	5 Jun 2015 16:07:38 -0000
@@ -0,0 +1,20 @@
+$NetBSD$
+
+struct shminfo is available without the need for _KERNEL.
+
+--- sysdeps/bsd/shm_limits.c.orig	2011-06-01 15:40:47.000000000 +0000
++++ sysdeps/bsd/shm_limits.c
+@@ -45,11 +45,13 @@ glibtop_get_shm_limits_p (glibtop *serve
+ 
+ /* #define KERNEL to get declaration of `struct shminfo'. */
+ 
++#ifndef __NetBSD__
+ #if (defined(__FreeBSD__) && (__FreeBSD_version < 410000)) || defined(__bsdi__)
+ #define KERNEL 1
+ #else
+ #define _KERNEL 1
+ #endif
++#endif
+ 
+ #include <sys/ipc.h>
+ #include <sys/shm.h>


Home | Main Index | Thread Index | Old Index