openbsd-ports/sysutils/xosview/patches/patch-bsd_kernel_cc
2001-12-06 03:40:07 +00:00

75 lines
2.8 KiB
Plaintext

$OpenBSD: patch-bsd_kernel_cc,v 1.2 2001/12/06 03:40:07 form Exp $
--- bsd/kernel.cc.orig Tue Jul 18 01:52:31 2000
+++ bsd/kernel.cc Thu Dec 6 09:33:22 2001
@@ -76,7 +76,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_*. */
@@ -166,9 +166,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" },
@@ -786,7 +786,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
@@ -806,9 +806,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 */
@@ -821,7 +821,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;
@@ -882,8 +882,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];
@@ -916,7 +916,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);