openbsd-ports/sysutils/xosview/patches/patch-bsd_kernel_cc
2000-07-17 16:24:46 +00:00

75 lines
2.8 KiB
Plaintext

$OpenBSD: patch-bsd_kernel_cc,v 1.1 2000/07/17 16:24:47 form Exp $
--- bsd/kernel.cc.orig Mon Jul 17 22:56:11 2000
+++ bsd/kernel.cc Mon Jul 17 23:01:09 2000
@@ -72,7 +72,7 @@ int DevStat_Get();
#ifdef HAVE_SWAPCTL
#include <unistd.h> /* For swapctl proto. */
-#if defined(XOSVIEW_NETBSD) && defined(__NetBSD_Version__) && __NetBSD_Version__ >= 104000000
+#if defined(XOSVIEW_OPENBSD) || (defined(XOSVIEW_NETBSD) && defined(__NetBSD_Version__) && __NetBSD_Version__ >= 104000000)
#include <sys/swap.h> /* For swapent, SWAP_*. */
#else
#include <vm/vm_swap.h> /* swapent, SWAP_*. */
@@ -162,9 +162,9 @@ static struct nlist nlst[] =
{ "_eintrcnt" },
#define EINTRCNT_SYM_INDEX 8
-#if defined(XOSVIEW_OPENBSD) && (defined(pc532) || defined(i386))
+#if defined(XOSVIEW_OPENBSD) && (defined(__pc532__) || defined(__i386__))
-# ifdef i386
+# ifdef __i386__
{ "_intrhand" },
#define INTRHAND_SYM_INDEX 9
{ "_intrstray" },
@@ -781,7 +781,7 @@ BSDGetDiskXFerBytes (unsigned long long
}
/* ---------------------- Interrupt Meter stuff ----------------- */
-#if (!defined(XOSVIEW_OPENBSD) || !(defined(pc532) && defined(i386))) && !defined(XOSVIEW_BSDI)
+#if (!defined(XOSVIEW_OPENBSD) || !(defined(__pc532__) && defined(__i386__))) && !defined(XOSVIEW_BSDI)
static unsigned long kvm_intrcnt[128];// guess at space needed
#endif
@@ -801,9 +801,9 @@ int
BSDIntrInit() {
OpenKDIfNeeded();
-#if defined(XOSVIEW_OPENBSD) && defined(i386)
+#if defined(XOSVIEW_OPENBSD) && defined(__i386__)
return ValidSymbol(INTRHAND_SYM_INDEX) && ValidSymbol(INTRSTRAY_SYM_INDEX);
-#elif defined (XOSVIEW_OPENBSD) && defined(pc532)
+#elif defined (XOSVIEW_OPENBSD) && defined(__pc532__)
return ValidSymbol(IVP_SYM_INDEX);
#elif defined (XOSVIEW_BSDI)
#if _BSDI_VERSION >= 199802 /* BSD/OS 4.x */
@@ -816,7 +816,7 @@ BSDIntrInit() {
#endif
}
-#if (!defined(XOSVIEW_OPENBSD) || !(defined(pc532) || defined(i386))) && !defined (XOSVIEW_BSDI)
+#if (!defined(XOSVIEW_OPENBSD) || !(defined(__pc532__) || defined(__i386__))) && !defined (XOSVIEW_BSDI)
int
BSDNumInts() {
int nintr;
@@ -877,8 +877,8 @@ BSDGetIntrStats (unsigned long intrCount
// counts. We'll just use the intrcnt array here. If anyone
// has problems, please mail me. bgrayson
{
-#if defined(XOSVIEW_OPENBSD) && (defined(pc532) || defined(i386))
-# ifdef i386
+#if defined(XOSVIEW_OPENBSD) && (defined(__pc532__) || defined(__i386__))
+# ifdef __i386__
struct intrhand *intrhand[16], *ihp, ih;
int intrstray[16];
@@ -911,7 +911,7 @@ BSDGetIntrStats (unsigned long intrCount
intrCount[i] = 0;
}
# endif /* pc532 */
-#else /* XOSVIEW_OPENBSD && (pc532 || i386) */
+#else /* XOSVIEW_OPENBSD && (__pc532__ || __i386__) */
int nintr = BSDNumInts();
safe_kvm_read(nlst[INTRCNT_SYM_INDEX].n_value, kvm_intrcnt,
sizeof(long)*nintr);