summaryrefslogtreecommitdiff
path: root/sysdeps/freebsd/shm_limits.c
diff options
context:
space:
mode:
authorMartin Baulig <martin@home-of-linux.org>1999-03-19 10:47:44 +0000
committerMartin Baulig <martin@src.gnome.org>1999-03-19 10:47:44 +0000
commit005357e82187fd29a3a9abf61a45eec5c0cfde60 (patch)
treedba9296a4958b128ad3f6935ac7485e05f9221c3 /sysdeps/freebsd/shm_limits.c
parent5fcfc952807936c9320995a4e38464594a4db0f3 (diff)
downloadlibgtop-005357e82187fd29a3a9abf61a45eec5c0cfde60.tar.gz
Added basic support for BSDI. It compiles without problems on BSDI 2.1 and
1999-03-19 Martin Baulig <martin@home-of-linux.org> Added basic support for BSDI. It compiles without problems on BSDI 2.1 and 3.1, but it is *untested* - I'm neither root on the machine nor have I access to /dev/kmem, so I don't know whether it will work. You need to give configure the `--enable-hacker-mode' parameter to use the code. If someone can verify whether it actually works, please let me know.
Diffstat (limited to 'sysdeps/freebsd/shm_limits.c')
-rw-r--r--sysdeps/freebsd/shm_limits.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/sysdeps/freebsd/shm_limits.c b/sysdeps/freebsd/shm_limits.c
index bab0d85f..fd06dc3d 100644
--- a/sysdeps/freebsd/shm_limits.c
+++ b/sysdeps/freebsd/shm_limits.c
@@ -27,9 +27,26 @@
#include <glibtop_suid.h>
+#if (defined __bsdi__) && (_BSDI_VERSION < 199700)
+/* Older versions of BSDI don't seem to have this. */
+
+void
+glibtop_init_shm_limits_p (glibtop *server)
+{ }
+
+void
+glibtop_get_shm_limits_p (glibtop *server, glibtop_shm_limits *buf)
+{
+ glibtop_init_p (server, (1 << GLIBTOP_SYSDEPS_SHM_LIMITS), 0);
+
+ memset (buf, 0, sizeof (glibtop_shm_limits));
+}
+
+#else
+
/* #define KERNEL to get declaration of `struct shminfo'. */
-#ifdef __FreeBSD__
+#if (defined __FreeBSD__) || (defined __bsdi__)
#define KERNEL 1
#else
#define _KERNEL 1
@@ -93,3 +110,6 @@ glibtop_get_shm_limits_p (glibtop *server, glibtop_shm_limits *buf)
buf->flags = _glibtop_sysdeps_shm_limits;
}
+
+#endif /* either a newer BSDI or no BSDI at all. */
+