Subject: [patch] w3m-0.1.6 ported to NetBSD/sparc
To: None <port-sparc@netbsd.org>
From: Adrian Bunk <bunk@fs.tum.de>
List: port-sparc
Date: 03/19/2000 15:59:51
Hi,
after making the patch below, I was able to successfully compile w3m-0.1.6
(a text browser that supports HTML tables and frames) on a
Sparcstation running NetBSD 1.4.1. I'm not the expert in NetBSD, the patch
is more or less a cut&paste using the ports to NetBSD/m68k and
OpenBSD/sparc. That's why I'm happy if you can tell me if I did some
mistake.
w3m is in the NetBSD packages collection under www/w3m .
cu,
Adrian
--
A "No" uttered from deepest conviction is better and greater than a
"Yes" merely uttered to please, or what is worse, to avoid trouble.
-- Mahatma Ghandi
--- w3m/gc/Makefile.old Wed Jan 12 05:23:36 2000
+++ w3m/gc/Makefile Sun Mar 5 23:25:26 2000
@@ -302,6 +302,7 @@
./if_mach SPARC SUNOS5 $(AS) -o mach_dep.o $(srcdir)/sparc_mach_dep.s
./if_mach SPARC SUNOS4 $(AS) -o mach_dep.o $(srcdir)/sparc_sunos4_mach_dep.s
./if_mach SPARC OPENBSD $(AS) -o mach_dep.o $(srcdir)/sparc_sunos4_mach_dep.s
+ ./if_mach SPARC NETBSD $(AS) -o mach_dep.o $(srcdir)/sparc_sunos4_mach_dep.s
./if_not_there mach_dep.o $(CC) -c $(SPECIALCFLAGS) $(srcdir)/mach_dep.c
mark_rts.o: $(srcdir)/mark_rts.c if_mach if_not_there $(UTILS)
--- w3m/gc/gcconfig.h.old Sun Mar 5 22:23:55 2000
+++ w3m/gc/gcconfig.h Sun Mar 5 22:42:59 2000
@@ -53,6 +53,11 @@
# define NETBSD
# define mach_type_known
# endif
+# if defined(__NetBSD__) && defined(sparc)
+# define SPARC
+# define NETBSD
+# define mach_type_known
+# endif
# if defined(vax)
# define VAX
# ifdef ultrix
@@ -106,7 +111,7 @@
# define mach_type_known
# endif
# if defined(sparc) && defined(unix) && !defined(sun) && !defined(linux) \
- && !defined(__OpenBSD__)
+ && !defined(__OpenBSD__) && !defined(__NetBSD__)
# define SPARC
# define DRSNX
# define mach_type_known
@@ -628,6 +633,11 @@
# ifdef OPENBSD
# define OS_TYPE "OPENBSD"
# define STACKBOTTOM ((ptr_t) 0xf8000000)
+# define DATASTART ((ptr_t)(&etext))
+# endif
+# ifdef NETBSD
+# define OS_TYPE "NETBSD"
+# define HEURISTIC2
# define DATASTART ((ptr_t)(&etext))
# endif
# endif
--- w3m/gc/os_dep.c.old Mon Mar 6 00:38:29 2000
+++ w3m/gc/os_dep.c Mon Mar 6 00:41:54 2000
@@ -2407,7 +2407,7 @@
# if defined (DRSNX)
# include <sys/sparc/frame.h>
# else
-# if defined(OPENBSD)
+# if defined(OPENBSD) || defined(NETBSD)
# include <frame.h>
# else
# include <sys/frame.h>
@@ -2422,7 +2422,7 @@
/* Fill in the pc and argument information for up to NFRAMES of my */
/* callers. Ignore my frame and my callers frame. */
-#ifdef OPENBSD
+#if defined(OPENBSD) || defined(NETBSD)
# define FR_SAVFP fr_fp
# define FR_SAVPC fr_pc
#else