summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/groff/files/0001-Include-config.h.patch
blob: 46065bc513188a2b19d4907a5d60330530faee03 (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
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
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
From 6cfa9f8126c1d6ec26f120d273e714fb19108873 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sun, 4 Aug 2019 16:32:41 -0700
Subject: [PATCH] Include config.h

This helps avoid the include conflicts where <stdlib.h> is including
<math.h> and since -I./lib is used and a local math.h wrapper is
residing in there, the build breaks since stdlib.h really wants the
standard system math.h to be included, this ensures that right macros
are predefined and included before stdlib.h is included

fixes
In file included from src/libs/libgroff/assert.cpp:20:
In file included from TOPDIR/build/tmp/work/aarch64-yoe-linux-musl/groff/1.22.4-r0/recipe-sysroot/usr/include/c++/v1/stdlib.h:100:
./lib/math.h:38:3: error: "Please include config.h first."
 #error "Please include config.h first."
  ^
./lib/math.h:40:1: error: unknown type name '_GL_INLINE_HEADER_BEGIN'

We delete eqn.cpp and qen.hpp in do_configure
to ensure they're regenerated and deterministic.

Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 src/libs/libgroff/assert.cpp  |   4 +
 src/libs/libgroff/curtime.cpp |   4 +
 src/libs/libgroff/device.cpp  |   4 +
 src/libs/libgroff/error.cpp   |   4 +
 src/libs/libgroff/fatal.cpp   |   4 +
 src/libs/libgroff/string.cpp  |   4 +
 src/libs/libgroff/strsave.cpp |   4 +
 src/preproc/eqn/eqn.cpp       | 450 ++++++++++++++++++----------------
 src/preproc/eqn/eqn.hpp       |  12 +-
 src/preproc/eqn/eqn.ypp       |   4 +
 src/preproc/eqn/other.cpp     |   4 +
 src/preproc/eqn/text.cpp      |   4 +
 src/preproc/pic/object.cpp    |   4 +
 13 files changed, 285 insertions(+), 221 deletions(-)

diff --git a/src/libs/libgroff/assert.cpp b/src/libs/libgroff/assert.cpp
index aceed05..97780d6 100644
--- a/src/libs/libgroff/assert.cpp
+++ b/src/libs/libgroff/assert.cpp
@@ -16,6 +16,10 @@ for more details.
 You should have received a copy of the GNU General Public License
 along with this program.  If not, see <http://www.gnu.org/licenses/>. */
 
+#if HAVE_CONFIG_H
+# include <config.h>
+#endif
+
 #include <stdio.h>
 #include <stdlib.h>
 #include "assert.h"
diff --git a/src/libs/libgroff/curtime.cpp b/src/libs/libgroff/curtime.cpp
index 72fe067..9ddba08 100644
--- a/src/libs/libgroff/curtime.cpp
+++ b/src/libs/libgroff/curtime.cpp
@@ -15,6 +15,10 @@ for more details.
 The GNU General Public License version 2 (GPL2) is available in the
 internet at <http://www.gnu.org/licenses/gpl-2.0.txt>. */
 
+#if HAVE_CONFIG_H
+# include <config.h>
+#endif
+
 #include <errno.h>
 #include <limits.h>
 #include <stdlib.h>
diff --git a/src/libs/libgroff/device.cpp b/src/libs/libgroff/device.cpp
index 0d28b85..c211f85 100644
--- a/src/libs/libgroff/device.cpp
+++ b/src/libs/libgroff/device.cpp
@@ -17,6 +17,10 @@ for more details.
 You should have received a copy of the GNU General Public License
 along with this program.  If not, see <http://www.gnu.org/licenses/>. */
 
+#if HAVE_CONFIG_H
+# include <config.h>
+#endif
+
 #include <stdlib.h>
 #include "device.h"
 #include "defs.h"
diff --git a/src/libs/libgroff/error.cpp b/src/libs/libgroff/error.cpp
index 9a18803..7b63d3d 100644
--- a/src/libs/libgroff/error.cpp
+++ b/src/libs/libgroff/error.cpp
@@ -17,6 +17,10 @@ for more details.
 You should have received a copy of the GNU General Public License
 along with this program.  If not, see <http://www.gnu.org/licenses/>. */
 
+#if HAVE_CONFIG_H
+# include <config.h>
+#endif
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
diff --git a/src/libs/libgroff/fatal.cpp b/src/libs/libgroff/fatal.cpp
index c0dcb35..fd6003e 100644
--- a/src/libs/libgroff/fatal.cpp
+++ b/src/libs/libgroff/fatal.cpp
@@ -16,6 +16,10 @@ for more details.
 You should have received a copy of the GNU General Public License
 along with this program.  If not, see <http://www.gnu.org/licenses/>. */
 
+#if HAVE_CONFIG_H
+# include <config.h>
+#endif
+
 #include <stdlib.h>
 
 #define FATAL_ERROR_EXIT_CODE 3
diff --git a/src/libs/libgroff/string.cpp b/src/libs/libgroff/string.cpp
index 46c015c..449f3a6 100644
--- a/src/libs/libgroff/string.cpp
+++ b/src/libs/libgroff/string.cpp
@@ -17,6 +17,10 @@ for more details.
 You should have received a copy of the GNU General Public License
 along with this program.  If not, see <http://www.gnu.org/licenses/>. */
 
+#if HAVE_CONFIG_H
+# include <config.h>
+#endif
+
 #include <stdlib.h>
 
 #include "lib.h"
diff --git a/src/libs/libgroff/strsave.cpp b/src/libs/libgroff/strsave.cpp
index f95c05e..d875045 100644
--- a/src/libs/libgroff/strsave.cpp
+++ b/src/libs/libgroff/strsave.cpp
@@ -17,6 +17,10 @@ for more details.
 You should have received a copy of the GNU General Public License
 along with this program.  If not, see <http://www.gnu.org/licenses/>. */
 
+#if HAVE_CONFIG_H
+# include <config.h>
+#endif
+
 #include <string.h>
 #include <stdlib.h>
 
diff --git a/src/preproc/eqn/eqn.ypp b/src/preproc/eqn/eqn.ypp
index fb318c3..b7b647e 100644
--- a/src/preproc/eqn/eqn.ypp
+++ b/src/preproc/eqn/eqn.ypp
@@ -16,6 +16,10 @@ for more details.
 You should have received a copy of the GNU General Public License
 along with this program.  If not, see <http://www.gnu.org/licenses/>. */
 %{
+#if HAVE_CONFIG_H
+# include <config.h>
+#endif
+
 #include <stdio.h>
 #include <string.h>
 #include <stdlib.h>
diff --git a/src/preproc/eqn/other.cpp b/src/preproc/eqn/other.cpp
index 8db993f..38db396 100644
--- a/src/preproc/eqn/other.cpp
+++ b/src/preproc/eqn/other.cpp
@@ -17,6 +17,10 @@ for more details.
 You should have received a copy of the GNU General Public License
 along with this program.  If not, see <http://www.gnu.org/licenses/>. */
 
+#if HAVE_CONFIG_H
+# include <config.h>
+#endif
+
 #include <stdlib.h>
 
 #include "eqn.h"
diff --git a/src/preproc/eqn/text.cpp b/src/preproc/eqn/text.cpp
index f3d06f9..3b244d5 100644
--- a/src/preproc/eqn/text.cpp
+++ b/src/preproc/eqn/text.cpp
@@ -17,6 +17,10 @@ for more details.
 You should have received a copy of the GNU General Public License
 along with this program.  If not, see <http://www.gnu.org/licenses/>. */
 
+#if HAVE_CONFIG_H
+# include <config.h>
+#endif
+
 #include <ctype.h>
 #include <stdlib.h>
 #include "eqn.h"
diff --git a/src/preproc/pic/object.cpp b/src/preproc/pic/object.cpp
index d8ba610..f26a831 100644
--- a/src/preproc/pic/object.cpp
+++ b/src/preproc/pic/object.cpp
@@ -17,6 +17,10 @@ for more details.
 You should have received a copy of the GNU General Public License
 along with this program.  If not, see <http://www.gnu.org/licenses/>. */
 
+#if HAVE_CONFIG_H
+# include <config.h>
+#endif
+
 #include <stdlib.h>
 
 #include "pic.h"
-- 
2.22.0