update to 1.7.0.b.

This commit is contained in:
form 1999-07-01 22:07:44 +00:00
parent 8a4846fd93
commit f3a20873f9
4 changed files with 162 additions and 184 deletions

View File

@ -1,3 +1,3 @@
MD5 (xosview-1.6.2.a.tar.gz) = bf021401b5dbf3971ff8a4ea6c90ee11 MD5 (xosview-1.7.0.b.tar.gz) = f5b237eb455aefd686949a48ca12ef3d
RMD160 (xosview-1.6.2.a.tar.gz) = b1dfbfbc43eb910fe64108a1f74f863a1a2f20d8 RMD160 (xosview-1.7.0.b.tar.gz) = 1edc1c5671ea1a6a3635e187c30eb3de6a77b9b2
SHA1 (xosview-1.6.2.a.tar.gz) = 08d99b317b6ea5021084df5e11d5d9b5e9fc0640 SHA1 (xosview-1.7.0.b.tar.gz) = 7f3053e0e8300995eb16421b0840cfbe9c4c7d07

View File

@ -1,138 +1,107 @@
*** bsd/kernel.cc.orig Fri Sep 25 02:21:30 1998 # $OpenBSD: patch-aa,v 1.6 1999/07/01 22:07:44 form Exp $
--- bsd/kernel.cc Mon Nov 23 10:12:36 1998
*************** --- bsd/kernel.cc.orig Tue Feb 16 20:09:21 1999
*** 32,37 **** +++ bsd/kernel.cc Fri Jul 2 04:46:10 1999
--- 32,41 ---- @@ -67,7 +67,11 @@
#include <sys/disk.h> /* For disk statistics. */
#endif #ifdef HAVE_SWAPCTL
#include <unistd.h> /* For swapctl proto. */
+ #ifdef XOSVIEW_OPENBSD +#ifdef XOSVIEW_OPENBSD
+ #include "obsdintr.h" /* XXX: got from 2.4 */ +#include <sys/swap.h>
+ #endif +#else
+ #include <vm/vm_swap.h> /* For swapent, SWAP_*. */
#include <sys/socket.h> /* These two are needed for the */ +#endif
#include <net/if.h> /* NetMeter helper functions. */ #include <stdlib.h> /* For malloc(), free(). */
#if defined(XOSVIEW_FREEBSD) && (__FreeBSD_version >= 300000) #endif
***************
*** 104,114 **** @@ -110,9 +114,9 @@
--- 108,134 ---- { "_eintrcnt" },
#define EINTRCNT_SYM_INDEX 8
#endif /* XOSVIEW_FREEBSD */
-#if defined(XOSVIEW_OPENBSD) && (defined(pc532) || defined(i386))
+ #if defined(XOSVIEW_OPENBSD) && (defined(pc532) || defined(i386)) +#if defined(XOSVIEW_OPENBSD) && (defined(__pc532__) || defined(__i386__))
+
+ # ifdef i386 -# ifdef i386
+ { "_intrhand" }, +# ifdef __i386__
+ #define INTRHAND_SYM_INDEX 7 { "_intrhand" },
+ { "_intrstray" }, #define INTRHAND_SYM_INDEX 9
+ #define INTRSTRAY_SYM_INDEX 8 { "_intrstray" },
+ # else @@ -661,7 +665,7 @@
+ { "_ivt" }, }
+ #define IVT_SYM_INDEX 7
+ # endif /* ---------------------- Interrupt Meter stuff ----------------- */
+ -#if !defined(XOSVIEW_OPENBSD) || !(defined(pc532) && defined(i386))
+ #else /* XOSVIEW_OPENBSD && (pc532 || i386) */ +#if !defined(XOSVIEW_OPENBSD) || !(defined(__pc532__) || defined(__i386__))
+ static unsigned long kvm_intrcnt[128];// guess at space needed
{ "_intrcnt" }, #endif
#define INTRCNT_SYM_INDEX 7
{ "_eintrcnt" }, @@ -672,16 +676,16 @@
#define EINTRCNT_SYM_INDEX 8 int
BSDIntrInit() {
+ #endif /* XOSVIEW_OPENBSD && (pc532 || i386) */ OpenKDIfNeeded();
+ -#if defined(XOSVIEW_OPENBSD) && defined(i386)
{NULL} +#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__)
*** 441,447 **** return ValidSymbol(IVP_SYM_INDEX);
--- 461,470 ---- #else
} return ValidSymbol(INTRCNT_SYM_INDEX) && ValidSymbol(EINTRCNT_SYM_INDEX);
#endif
/* ---------------------- Interrupt Meter stuff ----------------- */ }
+ #if !defined(XOSVIEW_OPENBSD) || !(defined(pc532) && defined(i386))
static unsigned long kvm_intrcnt[128];// guess at space needed -#if !defined(XOSVIEW_OPENBSD) || !(defined(pc532) || defined(i386))
+ #endif +#if !defined(XOSVIEW_OPENBSD) || !(defined(__pc532__) || defined(__i386__))
+ int
#ifdef XOSVIEW_FREEBSD BSDNumInts() {
static unsigned long kvm_intrptrs[NUM_INTR]; int nintr;
#endif @@ -702,7 +706,7 @@
*************** # endif
*** 449,457 **** #endif
--- 472,487 ---- }
int -#endif /* XOSVIEW_OPENBSD */
BSDIntrInit() { +#endif /* XOSVIEW_OPENBSD && !(__i386__ || __pc532__) */
OpenKDIfNeeded();
+ #if defined(XOSVIEW_OPENBSD) && defined(i386) void
+ return ValidSymbol(INTRHAND_SYM_INDEX) && ValidSymbol(INTRSTRAY_SYM_INDEX); BSDGetIntrStats (unsigned long intrCount[NUM_INTR]) {
+ #elif defined (XOSVIEW_OPENBSD) && defined(pc532) @@ -727,8 +731,8 @@
+ return ValidSymbol(IVP_SYM_INDEX); // counts. We'll just use the intrcnt array here. If anyone
+ #else // has problems, please mail me. bgrayson
return ValidSymbol(INTRCNT_SYM_INDEX) && ValidSymbol(EINTRCNT_SYM_INDEX); {
+ #endif -#if defined(XOSVIEW_OPENBSD) && (defined(pc532) || defined(i386))
} -# ifdef i386
+#if defined(XOSVIEW_OPENBSD) && (defined(__pc532__) || defined(__i386__))
+ #if !defined(XOSVIEW_OPENBSD) || !(defined(pc532) || defined(i386)) +# ifdef __i386__
int BSDNumInts() { struct intrhand *intrhand[16], *ihp, ih;
int nintr; int intrstray[16];
OpenKDIfNeeded();
*************** @@ -749,8 +753,8 @@
*** 471,476 **** ihp = ih.ih_next;
--- 501,507 ---- }
# endif }
#endif -# endif /* i386 */
} -# ifdef pc532
+ #endif /* XOSVIEW_OPENBSD */ +# endif /* __i386__ */
+# ifdef __pc532__
void struct iv ivt[32], *ivp = ivt;
BSDGetIntrStats (unsigned long intrCount[NUM_INTR])
*************** safe_kvm_read(nlst[IVP_SYM_INDEX].n_value, ivp, sizeof(ivt));
*** 496,507 **** @@ -760,15 +764,15 @@
--- 527,574 ---- else
// counts. We'll just use the intrcnt array here. If anyone intrCount[i] = 0;
// has problems, please mail me. bgrayson }
{ -# endif /* pc532 */
+ #if defined(XOSVIEW_OPENBSD) && (defined(pc532) || defined(i386)) -#else /* XOSVIEW_OPENBSD && (pc532 || i386) */
+ # ifdef i386 +# endif /* __pc532__ */
+ struct intrhand *intrhand[16], *ihp, ih; +#else /* XOSVIEW_OPENBSD && (__pc532__ || __i386__) */
+ int intrstray[16]; int nintr = BSDNumInts();
+ safe_kvm_read(nlst[INTRCNT_SYM_INDEX].n_value, kvm_intrcnt,
+ safe_kvm_read(nlst[INTRHAND_SYM_INDEX].n_value, intrhand, sizeof(long)*nintr);
+ sizeof(intrhand)); for (int i=0;i<nintr;i++) {
+ safe_kvm_read(nlst[INTRSTRAY_SYM_INDEX].n_value, intrstray, intrCount[i] = kvm_intrcnt[i];
+ sizeof(intrstray)); }
+ -#endif /* XOSVIEW_OPENBSD && (pc532 || i386) */
+ for (int i=0;i<16;i++) { +#endif /* XOSVIEW_OPENBSD && (__pc532__ || __i386__) */
+ ihp = intrhand[i]; }
+ intrCount[i] = 0; return;
+ while (ihp) { #endif
+ if (kvm_read(kd, (u_long)ihp, &ih, sizeof(ih)) != sizeof(ih)) {
+ fprintf(stderr, "Error: kvm_read(): %s\n", kvm_geterr(kd));
+ exit(1);
+ }
+ intrCount[i] = ih.ih_count;
+ ihp = ih.ih_next;
+ }
+ }
+ # endif /* i386 */
+ # ifdef pc532
+ struct iv ivt[32], *ivp = ivt;
+
+ safe_kvm_read(nlst[IVP_SYM_INDEX].n_value, ivp, sizeof(ivt));
+ for (int i=0;i<16;i++,ivp++) {
+ if (ivp->iv_vec && ivp->iv_use)
+ intrCount[i] = ivp->iv_cnt;
+ else
+ intrCount[i] = 0;
+ }
+ # endif /* pc532 */
+ #else /* XOSVIEW_OPENBSD && (pc532 || i386) */
int nintr = BSDNumInts();
safe_kvm_read(nlst[INTRCNT_SYM_INDEX].n_value, kvm_intrcnt,
sizeof(long)*nintr);
for (int i=0;i<nintr;i++) {
intrCount[i] = kvm_intrcnt[i];
}
+ #endif /* XOSVIEW_OPENBSD && (pc532 || i386) */
}
return;
#endif

View File

@ -1,30 +1,22 @@
*** /dev/null Mon Nov 23 09:34:17 1998 # $OpenBSD: patch-ab,v 1.6 1999/07/01 22:07:44 form Exp $
--- bsd/obsdintr.h Mon Nov 23 09:39:14 1998
*************** --- bsd/obsdintr.h.orig Fri Jul 2 04:26:33 1999
*** 0 **** +++ bsd/obsdintr.h Fri Jul 2 04:26:50 1999
--- 1,25 ---- @@ -1,7 +1,7 @@
+ #ifndef _OPENBSDINTR_H_ #ifndef _OPENBSDINTR_H_
+ #define _OPENBSDINTR_H_ #define _OPENBSDINTR_H_
+
+ #ifdef i386 -#ifdef i386
+ struct intrhand { +#ifdef __i386__
+ int (*ih_fun) __P((void *)); struct intrhand {
+ void *ih_arg; int (*ih_fun) __P((void *));
+ u_long ih_count; void *ih_arg;
+ struct intrhand *ih_next; @@ -13,7 +13,7 @@
+ int ih_level; };
+ int ih_irq; #endif
+ char *ih_what;
+ }; -#ifdef pc532
+ #endif +#ifdef __pc532__
+ struct iv {
+ #ifdef pc532 void (*iv_vec)();
+ struct iv { void *iv_arg;
+ void (*iv_vec)();
+ void *iv_arg;
+ int iv_cnt;
+ char *iv_use;
+ };
+ #endif
+
+ #endif /* _OPENBSDINTR_H_ */

View File

@ -1,15 +1,32 @@
--- xwin.cc.orig Sat Jun 26 13:43:54 1999 # $OpenBSD: patch-ac,v 1.2 1999/07/01 22:07:44 form Exp $
+++ xwin.cc Sat Jun 26 13:42:38 1999
@@ -53,9 +53,9 @@ --- configure.orig Fri Jul 2 04:36:11 1999
+++ configure Fri Jul 2 04:41:31 1999
@@ -1658,6 +1658,19 @@
// Set up the default Events host_dir=linux
events_ = NULL; host_os=linux ;;
- addEvent( new Event( this, ConfigureNotify, &configureEvent ) ); +
- addEvent( new Event( this, ClientMessage, &deleteEvent ) ); +## Check for OpenBSD 2.0-2.4
- addEvent( new Event( this, MappingNotify, &mappingNotify ) ); +openbsd2.[01234]*)
+ addEvent( new Event( this, ConfigureNotify, &XWin::configureEvent ) ); + EXTRALIBS="-lkvm $XPMLIB"
+ addEvent( new Event( this, ClientMessage, &XWin::deleteEvent ) ); + INSTALL_ARGS='-s -g kmem -m 02555'
+ addEvent( new Event( this, MappingNotify, &XWin::mappingNotify ) ); + cat >> confdefs.h <<\EOF
+#define XOSVIEW_OPENBSD 1
+EOF
+
+
+ host_dir=bsd
+ host_os=openbsd ;;
+
## Check for known versions of NetBSD...
netbsd1.[0123]*)
host_os=netbsd
@@ -1761,6 +1774,7 @@
INSTALL_ARGS='-s -g kmem -m 02555'
cat >> confdefs.h <<\EOF
#define XOSVIEW_OPENBSD 1
+#define HAVE_SWAPCTL 1
EOF
//openDisplay(); // Done explicitly in xosview.cc.
}