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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
|
diff -urp a/usr.bin/mandoc/chars.c b/usr.bin/mandoc/chars.c
--- a/usr.bin/mandoc/chars.c Thu Feb 13 19:16:03 2020
+++ b/usr.bin/mandoc/chars.c Mon Oct 19 13:02:28 2020
@@ -16,6 +16,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
+#include <sys/cdefs.h>
#include <sys/types.h>
#include <assert.h>
diff -urp a/usr.bin/mandoc/dba.c b/usr.bin/mandoc/dba.c
--- a/usr.bin/mandoc/dba.c Thu Feb 9 21:26:17 2017
+++ b/usr.bin/mandoc/dba.c Mon Oct 19 13:02:28 2020
@@ -17,6 +17,7 @@
* Allocation-based version of the mandoc database, for read-write access.
* The interface is defined in "dba.h".
*/
+#include <sys/cdefs.h>
#include <sys/types.h>
#include <endian.h>
#include <errno.h>
diff -urp a/usr.bin/mandoc/dbm.c b/usr.bin/mandoc/dbm.c
--- a/usr.bin/mandoc/dbm.c Tue Jul 2 01:43:03 2019
+++ b/usr.bin/mandoc/dbm.c Mon Oct 19 13:02:28 2020
@@ -31,6 +31,10 @@
#include "dbm_map.h"
#include "dbm.h"
+#ifndef EFTYPE
+#define EFTYPE 79
+#endif
+
struct macro {
int32_t value;
int32_t pages;
diff -urp a/usr.bin/mandoc/dbm_map.c b/usr.bin/mandoc/dbm_map.c
--- a/usr.bin/mandoc/dbm_map.c Thu Feb 9 21:26:17 2017
+++ b/usr.bin/mandoc/dbm_map.c Mon Oct 19 13:02:28 2020
@@ -36,6 +36,10 @@
#include "dbm_map.h"
#include "dbm.h"
+#ifndef EFTYPE
+#define EFTYPE 79
+#endif
+
static struct stat st;
static char *dbm_base;
static int ifd;
diff -urp a/usr.bin/mandoc/html.c b/usr.bin/mandoc/html.c
--- a/usr.bin/mandoc/html.c Mon Apr 20 15:59:24 2020
+++ b/usr.bin/mandoc/html.c Mon Oct 19 13:02:28 2020
@@ -18,6 +18,7 @@
* Common functions for mandoc(1) HTML formatters.
* For use by individual formatters and by the main program.
*/
+#include <sys/cdefs.h>
#include <sys/types.h>
#include <sys/stat.h>
diff -urp a/usr.bin/mandoc/main.c b/usr.bin/mandoc/main.c
--- a/usr.bin/mandoc/main.c Tue Jul 21 18:08:48 2020
+++ b/usr.bin/mandoc/main.c Mon Oct 19 13:28:19 2020
@@ -411,8 +411,10 @@ main(int argc, char *argv[])
}
if (search.arch == NULL)
search.arch = getenv("MACHINE");
+#ifdef MACHINE
if (search.arch == NULL)
search.arch = MACHINE;
+#endif
if (outmode == OUTMODE_ONE)
search.firstmatch = 1;
}
@@ -1199,7 +1201,9 @@ spawn_pager(struct outstate *outst, char *tag_target)
char *argv[MAX_PAGER_ARGS];
const char *pager;
char *cp;
+#ifdef HAVE_LESS_T
size_t cmdlen;
+#endif
int argc, use_ofn;
pid_t pager_pid;
@@ -1234,6 +1238,7 @@ spawn_pager(struct outstate *outst, char *tag_target)
/* For more(1) and less(1), use the tag file. */
use_ofn = 1;
+#ifdef HAVE_LESS_T
if (*outst->tag_files->tfn != '\0' &&
(cmdlen = strlen(argv[0])) >= 4) {
cp = argv[0] + cmdlen - 4;
@@ -1247,6 +1252,7 @@ spawn_pager(struct outstate *outst, char *tag_target)
}
}
}
+#endif
if (use_ofn) {
if (outst->outtype == OUTT_HTML && tag_target != NULL)
mandoc_asprintf(&argv[argc], "file://%s#%s",
diff -urp a/usr.bin/mandoc/mandoc_ohash.c b/usr.bin/mandoc/mandoc_ohash.c
--- a/usr.bin/mandoc/mandoc_ohash.c Mon Oct 19 21:58:20 2015
+++ b/usr.bin/mandoc/mandoc_ohash.c Mon Oct 19 13:02:28 2020
@@ -14,6 +14,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
+#include <sys/cdefs.h>
#include <sys/types.h>
#include <stddef.h>
#include <stdint.h>
diff -urp a/usr.bin/mandoc/mandoc_xr.c b/usr.bin/mandoc/mandoc_xr.c
--- a/usr.bin/mandoc/mandoc_xr.c Mon Jul 3 00:17:12 2017
+++ b/usr.bin/mandoc/mandoc_xr.c Mon Oct 19 13:02:28 2020
@@ -14,6 +14,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
+#include <sys/cdefs.h>
#include <sys/types.h>
#include <assert.h>
diff -urp a/usr.bin/mandoc/mansearch.c b/usr.bin/mandoc/mansearch.c
--- a/usr.bin/mandoc/mansearch.c Tue Jul 2 01:43:03 2019
+++ b/usr.bin/mandoc/mansearch.c Mon Oct 19 13:02:28 2020
@@ -16,6 +16,7 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
+#include <sys/cdefs.h>
#include <sys/mman.h>
#include <sys/types.h>
diff -urp a/usr.bin/mandoc/roff.c b/usr.bin/mandoc/roff.c
--- a/usr.bin/mandoc/roff.c Thu Aug 27 15:58:00 2020
+++ b/usr.bin/mandoc/roff.c Mon Oct 19 13:02:28 2020
@@ -17,6 +17,7 @@
*
* Implementation of the roff(7) parser for mandoc(1).
*/
+#include <sys/cdefs.h>
#include <sys/types.h>
#include <assert.h>
diff -urp a/usr.bin/mandoc/tag.c b/usr.bin/mandoc/tag.c
--- a/usr.bin/mandoc/tag.c Sun Apr 19 19:26:11 2020
+++ b/usr.bin/mandoc/tag.c Mon Oct 19 13:02:28 2020
@@ -17,6 +17,7 @@
* Functions to tag syntax tree nodes.
* For internal use by mandoc(1) validation modules only.
*/
+#include <sys/cdefs.h>
#include <sys/types.h>
#include <assert.h>
|