summaryrefslogtreecommitdiff
path: root/devel/nbitools/patches/patch-ah
blob: 9945839a853fd9bfb00b9e26e825ce61591b0a24 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
$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