83 lines
3.3 KiB
Text
83 lines
3.3 KiB
Text
$NetBSD: patch-ah,v 1.4 2005/12/02 22:59:40 joerg Exp $
|
|
|
|
--- config/imake/imakemdep.h.orig 2002-02-12 13:36:00.000000000 -0600
|
|
+++ config/imake/imakemdep.h
|
|
@@ -234,6 +234,11 @@ in this Software without prior written a
|
|
* If use cc -E but want a different compiler, define DEFAULT_CC.
|
|
* If the cpp you need is not in /lib/cpp, define DEFAULT_CPP.
|
|
*/
|
|
+
|
|
+#if defined(__APPLE__)
|
|
+#define DEFAULT_CPP "/usr/bin/cpp"
|
|
+#define DEFAULT_CC "cc"
|
|
+#endif
|
|
#ifdef hpux
|
|
#define USE_CC_E
|
|
#endif
|
|
@@ -253,7 +258,7 @@ in this Software without prior written a
|
|
#if defined(sun) && (defined(SVR4) || defined(__svr4__) || defined(__SVR4) || defined(__sol__))
|
|
#define DEFAULT_CPP "/usr/ccs/lib/cpp"
|
|
#endif
|
|
-#ifdef __bsdi__
|
|
+#if defined(__bsdi__) || defined(__APPLE__)
|
|
#define DEFAULT_CPP "/usr/bin/cpp"
|
|
#endif
|
|
#ifdef __uxp__
|
|
@@ -268,7 +273,7 @@ in this Software without prior written a
|
|
#if defined(__386BSD__) || defined(__OpenBSD__)
|
|
#define DEFAULT_CPP "/usr/libexec/cpp"
|
|
#endif
|
|
-#if defined(__FreeBSD__) || defined(__NetBSD__)
|
|
+#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
|
|
#define USE_CC_E
|
|
#endif
|
|
#if defined(__sgi) && defined(__ANSI_CPP__)
|
|
@@ -326,7 +331,7 @@ char *cpp_argv[ARGUMENTS] = {
|
|
"-Uunix", /* remove unix symbol so that filename unix.c okay */
|
|
#endif
|
|
#endif
|
|
-#if defined(__386BSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__FreeBSD__) || defined(MACH) || defined(linux) || defined(__GNU__)
|
|
+#if defined(__386BSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__FreeBSD__) || defined(MACH) || defined(linux) || defined(__GNU__) || defined(__DragonFly__)
|
|
# ifdef __i386__
|
|
"-D__i386__",
|
|
# endif
|
|
@@ -639,6 +644,12 @@ char *cpp_argv[ARGUMENTS] = {
|
|
# define DEFAULT_OS_MINOR_REV "v %*d.%1s"
|
|
# define DEFAULT_OS_TEENY_REV "v %*d.%*c%[.0-9]"
|
|
# define DEFAULT_OS_NAME "srvm %[^\n]"
|
|
+# elif defined(__APPLE__)
|
|
+/* uname -v returns "x.yz" or "x.y.z", e.g. "2.02" or "2.1.2". */
|
|
+# 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]" /* this will just get 0 */
|
|
+# define DEFAULT_OS_NAME "s %[^\n]"
|
|
#elif defined(__osf__)
|
|
/* uname -r returns "Wx.y", e.g. "V3.2" or "T4.0" */
|
|
# define DEFAULT_OS_MAJOR_REV "r %*[^0-9]%[0-9]"
|
|
@@ -662,14 +673,14 @@ char *cpp_argv[ARGUMENTS] = {
|
|
# 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 */
|
|
# define DEFAULT_OS_TEENY_REV_FROB(buf, size) \
|
|
do { \
|
|
@@ -974,6 +985,9 @@ struct symtab predefs[] = {
|
|
#ifdef __FreeBSD__
|
|
{"__FreeBSD__", "1"},
|
|
#endif
|
|
+#ifdef __DragonFly__
|
|
+ {"__DragonFly__", "1"},
|
|
+#endif
|
|
#ifdef __OpenBSD__
|
|
{"__OpenBSD__", "1"},
|
|
#endif
|