$NetBSD: patch-al,v 1.1 2005/05/23 19:14:14 xtraeme Exp $

--- config/imake/imakemdep.h.orig	2004-08-09 09:54:09.000000000 +0000
+++ config/imake/imakemdep.h	2004-08-09 09:55:07.000000000 +0000
@@ -285,7 +285,7 @@
 #if defined(__386BSD__)
 #define DEFAULT_CPP "/usr/libexec/cpp"
 #endif
-#if defined(__FreeBSD__)  || defined(__NetBSD__) || defined(__OpenBSD__)
+#if defined(__FreeBSD__)  || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
 #define USE_CC_E
 #endif
 #if defined(__sgi) && defined(__ANSI_CPP__)
@@ -348,7 +348,7 @@
 #endif
 #endif
 #if defined(__386BSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || \
-    defined(__FreeBSD__) || defined(MACH) || defined(linux) || \
+    defined(__FreeBSD__) || defined(__DragonFly__) || defined(MACH) || defined(linux) || \
     defined(__GNU__) || defined(__bsdi__) || defined(__GNUC__)
 # ifdef __i386__
 	"-D__i386__",
@@ -807,14 +807,14 @@
 #  define DEFAULT_OS_MINOR_REV   "r %*d.%[0-9]"
 #  define DEFAULT_OS_TEENY_REV   "v %[0-9]" 
 /* # define DEFAULT_OS_NAME        "srm %[^\n]" */ /* Not useful on ISC */
-# elif defined(__FreeBSD__) || defined(__OpenBSD__)
+# elif defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
 /* BSD/OS too? */
 /* uname -r returns "x.y[.z]-mumble", e.g. "2.1.5-RELEASE" or "2.2-0801SNAP" */
 #  define DEFAULT_OS_MAJOR_REV   "r %[0-9]"
 #  define DEFAULT_OS_MINOR_REV   "r %*d.%[0-9]"
 #  define DEFAULT_OS_TEENY_REV   "r %*d.%*d.%[0-9]" 
 #  define DEFAULT_OS_NAME        "srm %[^\n]"
-#  if defined(__FreeBSD__)
+#  if defined(__FreeBSD__) || defined(__DragonFly__)
 /* Use an alternate way to find the teeny version for -STABLE, -SNAP versions */
 #   ifndef CROSSCOMPILE_CPP
 #    define DEFAULT_OS_TEENY_REV_FROB(buf, size)			\
@@ -1228,7 +1228,9 @@
 #ifdef _MIPS_SZPTR
 	{"_MIPS_SZPTR", DEF_STRINGIFY(_MIPS_SZPTR)},
 #endif
-#ifdef __FreeBSD__
+#ifdef __DragonFly__
+	{"__DragonFly__", "1"},
+#elif defined(__FreeBSD__)
 	{"__FreeBSD__", "1"},
 #endif
 #ifdef __OpenBSD__
@@ -1395,7 +1397,7 @@
 
 #   ifdef linux
 System sys = LinuX;
-#   elif defined __FreeBSD__
+#   elif defined __FreeBSD__ || defined(__DragonFly__)
 System sys = freebsd;
 #   elif defined __NetBSD__
 System sys = netBSD;
