--- config.h.orig	Wed Aug 20 20:01:31 1997
+++ config.h	Tue Oct  5 20:14:10 1999
@@ -22,6 +22,11 @@
 
 /* Machine specific parts contributed by various people.  See README file. */
 
+# if defined(__OpenBSD__)
+#    define OPENBSD
+#    define unix /* symbol unix is no longer defined in OpenBSD */
+# endif
+
 /* Determine the machine type: */
 # if defined(sun) && defined(mc68000)
 #    define M68K
@@ -38,6 +43,10 @@
 #    define NETBSD
 #    define mach_type_known
 # endif
+# if defined(__OpenBSD__) && defined(__m68k__)
+#    define M68K
+#    define mach_type_known
+# endif
 # if defined(vax)
 #    define VAX
 #    ifdef ultrix
@@ -49,7 +58,7 @@
 # endif
 # if defined(mips) || defined(__mips)
 #    define MIPS
-#    if defined(ultrix) || defined(__ultrix) || defined(__NetBSD__)
+#    if defined(ultrix) || defined(__ultrix) || defined(__NetBSD__) || defined(__OpenBSD__)
 #	define ULTRIX
 #    else
 #	if defined(_SYSTYPE_SVR4) || defined(SYSTYPE_SVR4) || defined(__SYSTYPE_SVR4__)
@@ -90,7 +99,7 @@
 #     endif
 #   define mach_type_known
 # endif
-# if defined(sparc) && defined(unix) && !defined(sun)
+# if defined(sparc) && defined(unix) && !defined(sun) && !defined(__OpenBSD__)
 #   define SPARC
 #   define DRSNX
 #   define mach_type_known
@@ -99,6 +108,10 @@
 #   define RS6000
 #   define mach_type_known
 # endif
+# if defined(__OpenBSD__) && defined(__sparc__)
+#   define SPARC
+#   define mach_type_known
+# endif
 # if defined(_M_XENIX) && defined(_M_SYSV) && defined(_M_I386)
 	/* The above test may need refinement	*/
 #   define I386
@@ -168,6 +181,10 @@
 #   define NETBSD
 #   define mach_type_known
 # endif
+# if defined(__OpenBSD__) && defined(__i386__)
+#   define I386
+#   define mach_type_known
+# endif
 # if defined(bsdi) && defined(i386)
 #    define I386
 #    define BSDI
@@ -247,8 +264,9 @@
 		    /*		   MACOS and AMIGA variants)		*/
 		    /*             I386       ==> Intel 386	 	*/
 		    /*		    (SEQUENT, OS2, SCO, LINUX, NETBSD,	*/
-		    /*		     FREEBSD, THREE86BSD, MSWIN32,	*/
-		    /* 		     BSDI, SUNOS5, NEXT	variants)	*/
+		    /*		     FREEBSD, THREE86BSD, OPENBSD,	*/
+		    /* 		     BSDI, SUNOS5, NEXT	variants,	*/
+		    /*		     MSWIN32)				*/
                     /*             NS32K      ==> Encore Multimax 	*/
                     /*             MIPS       ==> R2000 or R3000	*/
                     /*			(RISCOS, ULTRIX variants)	*/
@@ -361,6 +379,11 @@
 #   define ALIGNMENT 2
 #   ifdef NETBSD
 #	define OS_TYPE "NETBSD"
+#   endif
+#   ifdef OPENBSD
+#	define OS_TYPE "OPENBSD"
+#   endif
+#   if defined(NETBSD) || defined(OPENBSD)
 #	define HEURISTIC2
 	extern char etext;
 #	define DATASTART ((ptr_t)(&etext))
@@ -521,7 +544,12 @@
 #	define MPROTECT_VDB
 #       define STACKBOTTOM ((ptr_t) 0xdfff0000)
 #   endif
-#   define DYNAMIC_LOADING
+/*#   define DYNAMIC_LOADING */
+#   ifdef OPENBSD
+#     define OS_TYPE "OPENBSD"
+#	define HEURISTIC2
+#	define DATASTART ((ptr_t)(&etext))
+#   endif
 # endif
 
 # ifdef I386
@@ -639,13 +667,16 @@
 #   ifdef NETBSD
 #	define OS_TYPE "NETBSD"
 #   endif
+#   ifdef OPENBSD
+#	define OS_TYPE "OPENBSD"
+#   endif
 #   ifdef THREE86BSD
 #	define OS_TYPE "THREE86BSD"
 #   endif
 #   ifdef BSDI
 #	define OS_TYPE "BSDI"
 #   endif
-#   if defined(FREEBSD) || defined(NETBSD) \
+#   if defined(FREEBSD) || defined(NETBSD) || defined(OPENBSD) \
         || defined(THREE86BSD) || defined(BSDI)
 #	define HEURISTIC2
 	extern char etext;
@@ -916,7 +947,7 @@
 #   define THREADS
 # endif
 
-# if defined(SPARC)
+# if defined(SPARC) && !defined(OPENBSD)
 #   define SAVE_CALL_CHAIN
 #   define ASM_CLEAR_CODE	/* Stack clearing is crucial, and we 	*/
 				/* include assembly code to do it well.	*/
