summaryrefslogtreecommitdiffstats
path: root/recipes-extended
diff options
context:
space:
mode:
authorMartin Jansa <Martin.Jansa@gmail.com>2021-05-14 07:36:27 -0700
committerBruce Ashfield <bruce.ashfield@gmail.com>2021-05-14 11:06:06 -0400
commit09c3281d443c9f9b00f0bae3ac62e504b25dd6c8 (patch)
tree06ba460166d9e21603eeded9b60b0a47387f2f7f /recipes-extended
parentd1e08a20d169b8cbcca20987d709ae4eb25a3be8 (diff)
downloadmeta-virtualization-09c3281d443c9f9b00f0bae3ac62e504b25dd6c8.tar.gz
dev86: fix compatibility with gperf-3.1
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'recipes-extended')
-rw-r--r--recipes-extended/dev86/dev86/0003-cpp-update-token1.tok-to-make-new-gperf-happy-regen..patch256
-rw-r--r--recipes-extended/dev86/dev86/0004-regen-token2.h-token1.h-with-gperf-3.1.patch389
-rw-r--r--recipes-extended/dev86/dev86_git.bb2
3 files changed, 647 insertions, 0 deletions
diff --git a/recipes-extended/dev86/dev86/0003-cpp-update-token1.tok-to-make-new-gperf-happy-regen..patch b/recipes-extended/dev86/dev86/0003-cpp-update-token1.tok-to-make-new-gperf-happy-regen..patch
new file mode 100644
index 00000000..38e4d815
--- /dev/null
+++ b/recipes-extended/dev86/dev86/0003-cpp-update-token1.tok-to-make-new-gperf-happy-regen..patch
@@ -0,0 +1,256 @@
1From e908a3ad04bb40e425542b85fbb3a1eb5a38e194 Mon Sep 17 00:00:00 2001
2From: Tee-Kiah Chia <tkchia@users.noreply.github.com>
3Date: Thu, 27 Feb 2020 00:52:05 +0800
4Subject: [PATCH] [cpp] update token1.tok to make new gperf happy; regen.
5 token1.h
6
7Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
8Upstream-Status: Pending [it was submitted in https://github.com/jbruchon/dev86/pull/19
9but then closed by author]
10
11---
12 cpp/token1.h | 170 +++++++++++++++++++++++++++++++++----------------
13 cpp/token1.tok | 2 +-
14 2 files changed, 115 insertions(+), 57 deletions(-)
15
16diff --git a/cpp/token1.h b/cpp/token1.h
17index 2e2b9eb..bb313aa 100644
18--- a/cpp/token1.h
19+++ b/cpp/token1.h
20@@ -1,15 +1,48 @@
21-/* C code produced by gperf version 2.7.1 (19981006 egcs) */
22+/* C code produced by gperf version 3.0.4 */
23 /* Command-line: gperf -aptTc -N is_ctok -H hash1 token1.tok */
24+/* Computed positions: -k'1-2' */
25+
26+#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
27+ && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \
28+ && (')' == 41) && ('*' == 42) && ('+' == 43) && (',' == 44) \
29+ && ('-' == 45) && ('.' == 46) && ('/' == 47) && ('0' == 48) \
30+ && ('1' == 49) && ('2' == 50) && ('3' == 51) && ('4' == 52) \
31+ && ('5' == 53) && ('6' == 54) && ('7' == 55) && ('8' == 56) \
32+ && ('9' == 57) && (':' == 58) && (';' == 59) && ('<' == 60) \
33+ && ('=' == 61) && ('>' == 62) && ('?' == 63) && ('A' == 65) \
34+ && ('B' == 66) && ('C' == 67) && ('D' == 68) && ('E' == 69) \
35+ && ('F' == 70) && ('G' == 71) && ('H' == 72) && ('I' == 73) \
36+ && ('J' == 74) && ('K' == 75) && ('L' == 76) && ('M' == 77) \
37+ && ('N' == 78) && ('O' == 79) && ('P' == 80) && ('Q' == 81) \
38+ && ('R' == 82) && ('S' == 83) && ('T' == 84) && ('U' == 85) \
39+ && ('V' == 86) && ('W' == 87) && ('X' == 88) && ('Y' == 89) \
40+ && ('Z' == 90) && ('[' == 91) && ('\\' == 92) && (']' == 93) \
41+ && ('^' == 94) && ('_' == 95) && ('a' == 97) && ('b' == 98) \
42+ && ('c' == 99) && ('d' == 100) && ('e' == 101) && ('f' == 102) \
43+ && ('g' == 103) && ('h' == 104) && ('i' == 105) && ('j' == 106) \
44+ && ('k' == 107) && ('l' == 108) && ('m' == 109) && ('n' == 110) \
45+ && ('o' == 111) && ('p' == 112) && ('q' == 113) && ('r' == 114) \
46+ && ('s' == 115) && ('t' == 116) && ('u' == 117) && ('v' == 118) \
47+ && ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \
48+ && ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126))
49+/* The character set is not based on ISO-646. */
50+error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gnu-gperf@gnu.org>."
51+#endif
52+
53
54 #define TOTAL_KEYWORDS 23
55 #define MIN_WORD_LENGTH 2
56 #define MAX_WORD_LENGTH 3
57 #define MIN_HASH_VALUE 2
58-#define MAX_HASH_VALUE 63
59-/* maximum key range = 62, duplicates = 0 */
60+#define MAX_HASH_VALUE 62
61+/* maximum key range = 61, duplicates = 0 */
62
63 #ifdef __GNUC__
64 __inline
65+#else
66+#ifdef __cplusplus
67+inline
68+#endif
69 #endif
70 static unsigned int
71 hash1 (str, len)
72@@ -18,38 +51,41 @@ hash1 (str, len)
73 {
74 static unsigned char asso_values[] =
75 {
76- 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
77- 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
78- 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
79- 64, 64, 64, 1, 64, 64, 64, 3, 25, 64,
80- 64, 64, 13, 18, 64, 8, 30, 15, 64, 64,
81- 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
82- 5, 0, 20, 64, 64, 64, 64, 64, 64, 64,
83- 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
84- 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
85- 64, 64, 64, 64, 30, 64, 64, 64, 64, 64,
86- 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
87- 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
88- 64, 64, 64, 64, 23, 64, 64, 64, 64, 64,
89- 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
90- 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
91- 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
92- 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
93- 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
94- 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
95- 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
96- 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
97- 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
98- 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
99- 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
100- 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
101- 64, 64, 64, 64, 64, 64
102+ 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
103+ 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
104+ 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
105+ 63, 63, 63, 6, 63, 63, 63, 28, 8, 63,
106+ 63, 63, 23, 3, 63, 25, 20, 18, 63, 63,
107+ 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
108+ 10, 5, 0, 63, 63, 63, 63, 63, 63, 63,
109+ 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
110+ 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
111+ 63, 63, 63, 63, 13, 63, 63, 63, 63, 63,
112+ 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
113+ 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
114+ 63, 63, 63, 63, 30, 63, 63, 63, 63, 63,
115+ 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
116+ 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
117+ 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
118+ 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
119+ 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
120+ 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
121+ 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
122+ 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
123+ 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
124+ 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
125+ 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
126+ 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
127+ 63, 63, 63, 63, 63, 63
128 };
129- return len + asso_values[(unsigned char)str[len - 1]] + asso_values[(unsigned char)str[0]];
130+ return len + asso_values[(unsigned char)str[1]] + asso_values[(unsigned char)str[0]];
131 }
132
133 #ifdef __GNUC__
134 __inline
135+#if defined __GNUC_STDC_INLINE__ || defined __GNUC_GNU_INLINE__
136+__attribute__ ((__gnu_inline__))
137+#endif
138 #endif
139 struct token_trans *
140 is_ctok (str, len)
141@@ -59,46 +95,68 @@ is_ctok (str, len)
142 static struct token_trans wordlist[] =
143 {
144 {""}, {""},
145+#line 14 "token1.tok"
146+ {">>", TK_RIGHT_OP},
147+#line 4 "token1.tok"
148+ {">>=", TK_RIGHT_ASSIGN},
149+ {""}, {""}, {""},
150+#line 22 "token1.tok"
151+ {">=", TK_GE_OP},
152+#line 16 "token1.tok"
153+ {"++", TK_INC_OP},
154+ {""},
155+#line 6 "token1.tok"
156+ {"+=", TK_ADD_ASSIGN},
157+ {""},
158+#line 23 "token1.tok"
159 {"==", TK_EQ_OP},
160+#line 24 "token1.tok"
161 {"!=", TK_NE_OP},
162 {""},
163- {"%=", TK_MOD_ASSIGN},
164+#line 11 "token1.tok"
165+ {"&=", TK_AND_ASSIGN},
166 {""},
167+#line 21 "token1.tok"
168 {"<=", TK_LE_OP},
169- {"<<=", TK_LEFT_ASSIGN},
170+#line 19 "token1.tok"
171+ {"&&", TK_AND_OP},
172 {""},
173- {"-=", TK_SUB_ASSIGN},
174+#line 12 "token1.tok"
175+ {"^=", TK_XOR_ASSIGN},
176 {""},
177+#line 15 "token1.tok"
178 {"<<", TK_LEFT_OP},
179- {""}, {""},
180- {"*=", TK_MUL_ASSIGN},
181+#line 5 "token1.tok"
182+ {"<<=", TK_LEFT_ASSIGN},
183 {""},
184+#line 9 "token1.tok"
185 {"/=", TK_DIV_ASSIGN},
186- {"--", TK_DEC_OP},
187 {""},
188- {"+=", TK_ADD_ASSIGN},
189- {""},
190- {">=", TK_GE_OP},
191- {">>=", TK_RIGHT_ASSIGN},
192- {""},
193- {"|=", TK_OR_ASSIGN},
194+#line 18 "token1.tok"
195+ {"->", TK_PTR_OP},
196+ {""}, {""},
197+#line 8 "token1.tok"
198+ {"*=", TK_MUL_ASSIGN},
199 {""},
200- {"&=", TK_AND_ASSIGN},
201+#line 7 "token1.tok"
202+ {"-=", TK_SUB_ASSIGN},
203 {""}, {""},
204- {"->", TK_PTR_OP},
205+#line 10 "token1.tok"
206+ {"%=", TK_MOD_ASSIGN},
207 {""},
208- {"^=", TK_XOR_ASSIGN},
209- {""}, {""}, {""}, {""}, {""},
210- {"++", TK_INC_OP},
211- {""}, {""}, {""},
212- {">>", TK_RIGHT_OP},
213- {""}, {""}, {""}, {""}, {""},
214- {"||", TK_OR_OP},
215- {""}, {""}, {""},
216- {"&&", TK_AND_OP},
217- {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""},
218+#line 13 "token1.tok"
219+ {"|=", TK_OR_ASSIGN},
220+ {""}, {""}, {""}, {""},
221+#line 25 "token1.tok"
222 {"..", TK_WORD},
223- {"...", TK_ELLIPSIS}
224+#line 3 "token1.tok"
225+ {"...", TK_ELLIPSIS},
226+ {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""},
227+#line 17 "token1.tok"
228+ {"--", TK_DEC_OP},
229+ {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""},
230+#line 20 "token1.tok"
231+ {"||", TK_OR_OP}
232 };
233
234 if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
235@@ -109,7 +167,7 @@ is_ctok (str, len)
236 {
237 register const char *s = wordlist[key].name;
238
239- if (*str == *s && !strncmp (str + 1, s + 1, len - 1))
240+ if (*str == *s && !strncmp (str + 1, s + 1, len - 1) && s[len] == '\0')
241 return &wordlist[key];
242 }
243 }
244diff --git a/cpp/token1.tok b/cpp/token1.tok
245index cd668ce..a98926f 100644
246--- a/cpp/token1.tok
247+++ b/cpp/token1.tok
248@@ -7,7 +7,7 @@ struct token_trans { char * name; int token; };
249 -=, TK_SUB_ASSIGN
250 *=, TK_MUL_ASSIGN
251 /=, TK_DIV_ASSIGN
252-%=, TK_MOD_ASSIGN
253+"%=", TK_MOD_ASSIGN
254 &=, TK_AND_ASSIGN
255 ^=, TK_XOR_ASSIGN
256 |=, TK_OR_ASSIGN
diff --git a/recipes-extended/dev86/dev86/0004-regen-token2.h-token1.h-with-gperf-3.1.patch b/recipes-extended/dev86/dev86/0004-regen-token2.h-token1.h-with-gperf-3.1.patch
new file mode 100644
index 00000000..8787369f
--- /dev/null
+++ b/recipes-extended/dev86/dev86/0004-regen-token2.h-token1.h-with-gperf-3.1.patch
@@ -0,0 +1,389 @@
1From ce2b9747d51df2a4c358a037950f0464f3f53fe8 Mon Sep 17 00:00:00 2001
2From: Martin Jansa <Martin.Jansa@gmail.com>
3Date: Fri, 14 May 2021 14:31:50 +0000
4Subject: [PATCH] regen token2.h, token1.h with gperf-3.1
5
6* update cc.h, token1.c, token2.c to be compatible with
7 gperf-3.1 output
8
9Upstream-Status: Pending
10Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
11
12---
13 cpp/cc.h | 4 +-
14 cpp/token1.c | 2 +-
15 cpp/token1.h | 22 ++----
16 cpp/token2.c | 2 +-
17 cpp/token2.h | 211 +++++++++++++++++++++++++++++++--------------------
18 5 files changed, 140 insertions(+), 101 deletions(-)
19
20diff --git a/cpp/cc.h b/cpp/cc.h
21index 9c298e7..3724543 100644
22--- a/cpp/cc.h
23+++ b/cpp/cc.h
24@@ -25,8 +25,8 @@ extern int dialect;
25 extern int gettok P((void));
26
27 struct token_trans { char * name; int token; };
28-struct token_trans * is_ctok P((const char *str, unsigned int len));
29-struct token_trans * is_ckey P((const char *str, unsigned int len));
30+struct token_trans * is_ctok P((register const char *str, register size_t len));
31+struct token_trans * is_ckey P((register const char *str, register size_t len));
32
33 #define WORDSIZE 128
34 #define TK_WSPACE 256
35diff --git a/cpp/token1.c b/cpp/token1.c
36index f3aa420..cc47f3e 100644
37--- a/cpp/token1.c
38+++ b/cpp/token1.c
39@@ -6,6 +6,6 @@
40 #ifdef __GNUC__
41 __inline
42 #endif
43-static unsigned int hash1 P((register const char *, register unsigned int));
44+static unsigned int hash1 P((register const char *, register size_t));
45
46 #include "token1.h"
47diff --git a/cpp/token1.h b/cpp/token1.h
48index bb313aa..2af88c2 100644
49--- a/cpp/token1.h
50+++ b/cpp/token1.h
51@@ -1,4 +1,4 @@
52-/* C code produced by gperf version 3.0.4 */
53+/* ANSI-C code produced by gperf version 3.1 */
54 /* Command-line: gperf -aptTc -N is_ctok -H hash1 token1.tok */
55 /* Computed positions: -k'1-2' */
56
57@@ -26,7 +26,7 @@
58 && ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \
59 && ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126))
60 /* The character set is not based on ISO-646. */
61-error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gnu-gperf@gnu.org>."
62+#error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gperf@gnu.org>."
63 #endif
64
65
66@@ -45,9 +45,7 @@ inline
67 #endif
68 #endif
69 static unsigned int
70-hash1 (str, len)
71- register const char *str;
72- register unsigned int len;
73+hash1 (register const char *str, register size_t len)
74 {
75 static unsigned char asso_values[] =
76 {
77@@ -81,16 +79,8 @@ hash1 (str, len)
78 return len + asso_values[(unsigned char)str[1]] + asso_values[(unsigned char)str[0]];
79 }
80
81-#ifdef __GNUC__
82-__inline
83-#if defined __GNUC_STDC_INLINE__ || defined __GNUC_GNU_INLINE__
84-__attribute__ ((__gnu_inline__))
85-#endif
86-#endif
87 struct token_trans *
88-is_ctok (str, len)
89- register const char *str;
90- register unsigned int len;
91+is_ctok (register const char *str, register size_t len)
92 {
93 static struct token_trans wordlist[] =
94 {
95@@ -161,9 +151,9 @@ is_ctok (str, len)
96
97 if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
98 {
99- register int key = hash1 (str, len);
100+ register unsigned int key = hash1 (str, len);
101
102- if (key <= MAX_HASH_VALUE && key >= 0)
103+ if (key <= MAX_HASH_VALUE)
104 {
105 register const char *s = wordlist[key].name;
106
107diff --git a/cpp/token2.c b/cpp/token2.c
108index b4d22b1..fbc790d 100644
109--- a/cpp/token2.c
110+++ b/cpp/token2.c
111@@ -6,6 +6,6 @@
112 #ifdef __GNUC__
113 __inline
114 #endif
115-static unsigned int hash2 P((register const char *, register unsigned int));
116+static unsigned int hash2 P((register const char *, register size_t));
117
118 #include "token2.h"
119diff --git a/cpp/token2.h b/cpp/token2.h
120index 62e69b1..f7ac2fd 100644
121--- a/cpp/token2.h
122+++ b/cpp/token2.h
123@@ -1,57 +1,87 @@
124-/* C code produced by gperf version 2.7.1 (19981006 egcs) */
125+/* ANSI-C code produced by gperf version 3.1 */
126 /* Command-line: gperf -aptTc -k1,3 -N is_ckey -H hash2 token2.tok */
127
128+#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
129+ && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \
130+ && (')' == 41) && ('*' == 42) && ('+' == 43) && (',' == 44) \
131+ && ('-' == 45) && ('.' == 46) && ('/' == 47) && ('0' == 48) \
132+ && ('1' == 49) && ('2' == 50) && ('3' == 51) && ('4' == 52) \
133+ && ('5' == 53) && ('6' == 54) && ('7' == 55) && ('8' == 56) \
134+ && ('9' == 57) && (':' == 58) && (';' == 59) && ('<' == 60) \
135+ && ('=' == 61) && ('>' == 62) && ('?' == 63) && ('A' == 65) \
136+ && ('B' == 66) && ('C' == 67) && ('D' == 68) && ('E' == 69) \
137+ && ('F' == 70) && ('G' == 71) && ('H' == 72) && ('I' == 73) \
138+ && ('J' == 74) && ('K' == 75) && ('L' == 76) && ('M' == 77) \
139+ && ('N' == 78) && ('O' == 79) && ('P' == 80) && ('Q' == 81) \
140+ && ('R' == 82) && ('S' == 83) && ('T' == 84) && ('U' == 85) \
141+ && ('V' == 86) && ('W' == 87) && ('X' == 88) && ('Y' == 89) \
142+ && ('Z' == 90) && ('[' == 91) && ('\\' == 92) && (']' == 93) \
143+ && ('^' == 94) && ('_' == 95) && ('a' == 97) && ('b' == 98) \
144+ && ('c' == 99) && ('d' == 100) && ('e' == 101) && ('f' == 102) \
145+ && ('g' == 103) && ('h' == 104) && ('i' == 105) && ('j' == 106) \
146+ && ('k' == 107) && ('l' == 108) && ('m' == 109) && ('n' == 110) \
147+ && ('o' == 111) && ('p' == 112) && ('q' == 113) && ('r' == 114) \
148+ && ('s' == 115) && ('t' == 116) && ('u' == 117) && ('v' == 118) \
149+ && ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \
150+ && ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126))
151+/* The character set is not based on ISO-646. */
152+#error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gperf@gnu.org>."
153+#endif
154+
155+
156 #define TOTAL_KEYWORDS 34
157 #define MIN_WORD_LENGTH 2
158 #define MAX_WORD_LENGTH 8
159-#define MIN_HASH_VALUE 2
160-#define MAX_HASH_VALUE 69
161-/* maximum key range = 68, duplicates = 0 */
162+#define MIN_HASH_VALUE 3
163+#define MAX_HASH_VALUE 44
164+/* maximum key range = 42, duplicates = 0 */
165
166 #ifdef __GNUC__
167 __inline
168+#else
169+#ifdef __cplusplus
170+inline
171+#endif
172 #endif
173 static unsigned int
174-hash2 (str, len)
175- register const char *str;
176- register unsigned int len;
177+hash2 (register const char *str, register size_t len)
178 {
179 static unsigned char asso_values[] =
180 {
181- 70, 70, 70, 70, 70, 70, 70, 70, 70, 70,
182- 70, 70, 70, 70, 70, 70, 70, 70, 70, 70,
183- 70, 70, 70, 70, 70, 70, 70, 70, 70, 70,
184- 70, 70, 70, 70, 70, 70, 70, 70, 70, 70,
185- 70, 70, 70, 70, 70, 70, 70, 70, 70, 70,
186- 70, 70, 70, 70, 70, 70, 70, 70, 70, 70,
187- 70, 70, 70, 70, 70, 70, 70, 70, 70, 70,
188- 5, 70, 70, 70, 70, 70, 0, 70, 70, 70,
189- 70, 70, 70, 70, 70, 70, 70, 70, 70, 70,
190- 70, 70, 70, 70, 70, 0, 70, 5, 5, 10,
191- 10, 20, 20, 25, 70, 0, 70, 70, 50, 70,
192- 0, 15, 0, 70, 15, 0, 40, 20, 0, 0,
193- 70, 70, 10, 70, 70, 70, 70, 70, 70, 70,
194- 70, 70, 70, 70, 70, 70, 70, 70, 70, 70,
195- 70, 70, 70, 70, 70, 70, 70, 70, 70, 70,
196- 70, 70, 70, 70, 70, 70, 70, 70, 70, 70,
197- 70, 70, 70, 70, 70, 70, 70, 70, 70, 70,
198- 70, 70, 70, 70, 70, 70, 70, 70, 70, 70,
199- 70, 70, 70, 70, 70, 70, 70, 70, 70, 70,
200- 70, 70, 70, 70, 70, 70, 70, 70, 70, 70,
201- 70, 70, 70, 70, 70, 70, 70, 70, 70, 70,
202- 70, 70, 70, 70, 70, 70, 70, 70, 70, 70,
203- 70, 70, 70, 70, 70, 70, 70, 70, 70, 70,
204- 70, 70, 70, 70, 70, 70, 70, 70, 70, 70,
205- 70, 70, 70, 70, 70, 70, 70, 70, 70, 70,
206- 70, 70, 70, 70, 70, 70
207+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
208+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
209+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
210+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
211+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
212+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
213+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
214+ 25, 45, 45, 45, 45, 45, 10, 45, 45, 45,
215+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
216+ 45, 45, 45, 45, 45, 5, 45, 30, 10, 10,
217+ 25, 20, 0, 10, 45, 5, 45, 45, 25, 45,
218+ 10, 10, 5, 45, 0, 5, 0, 0, 0, 20,
219+ 45, 45, 25, 45, 45, 45, 45, 45, 45, 45,
220+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
221+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
222+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
223+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
224+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
225+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
226+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
227+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
228+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
229+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
230+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
231+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
232+ 45, 45, 45, 45, 45, 45
233 };
234- register int hval = len;
235+ register unsigned int hval = len;
236
237 switch (hval)
238 {
239 default:
240- case 3:
241 hval += asso_values[(unsigned char)str[2]];
242+ /*FALLTHROUGH*/
243 case 2:
244 case 1:
245 hval += asso_values[(unsigned char)str[0]];
246@@ -60,78 +90,97 @@ hash2 (str, len)
247 return hval;
248 }
249
250-#ifdef __GNUC__
251-__inline
252-#endif
253 struct token_trans *
254-is_ckey (str, len)
255- register const char *str;
256- register unsigned int len;
257+is_ckey (register const char *str, register size_t len)
258 {
259 static struct token_trans wordlist[] =
260 {
261+ {""}, {""}, {""},
262+#line 16 "token2.tok"
263+ {"for", TK_FOR},
264 {""}, {""},
265+#line 22 "token2.tok"
266+ {"return", TK_RETURN},
267+#line 18 "token2.tok"
268 {"if", TK_IF},
269- {""},
270+#line 19 "token2.tok"
271+ {"int", TK_INT},
272+#line 32 "token2.tok"
273 {"void", TK_VOID},
274- {"while", TK_WHILE},
275+#line 30 "token2.tok"
276+ {"union", TK_UNION},
277+#line 27 "token2.tok"
278+ {"struct", TK_STRUCT},
279+#line 29 "token2.tok"
280+ {"typedef", TK_TYPEDEF},
281+#line 31 "token2.tok"
282+ {"unsigned", TK_UNSIGNED},
283+#line 17 "token2.tok"
284+ {"goto", TK_GOTO},
285+#line 15 "token2.tok"
286+ {"float", TK_FLOAT},
287+#line 28 "token2.tok"
288 {"switch", TK_SWITCH},
289 {""},
290- {"__LINE__", TK_LINE},
291- {""}, {""},
292- {"static", TK_STATIC},
293- {"do", TK_DO},
294- {"__FILE__", TK_FILE},
295+#line 21 "token2.tok"
296+ {"register", TK_REGISTER},
297+#line 5 "token2.tok"
298 {"case", TK_CASE},
299- {"const", TK_CONST},
300- {"sizeof", TK_SIZEOF},
301+#line 23 "token2.tok"
302+ {"short", TK_SHORT},
303+#line 24 "token2.tok"
304+ {"signed", TK_SIGNED},
305 {""},
306+#line 36 "token2.tok"
307+ {"__LINE__", TK_LINE},
308+#line 13 "token2.tok"
309+ {"enum", TK_ENUM},
310+#line 7 "token2.tok"
311+ {"const", TK_CONST},
312+#line 14 "token2.tok"
313+ {"extern", TK_EXTERN},
314+#line 10 "token2.tok"
315+ {"do", TK_DO},
316+#line 8 "token2.tok"
317 {"continue", TK_CONTINUE},
318- {"char", TK_CHAR},
319- {"short", TK_SHORT},
320- {"struct", TK_STRUCT},
321- {""}, {""},
322+#line 12 "token2.tok"
323 {"else", TK_ELSE},
324- {"union", TK_UNION},
325- {""}, {""},
326- {"unsigned", TK_UNSIGNED},
327- {""},
328- {"break", TK_BREAK},
329- {"signed", TK_SIGNED},
330- {""}, {""}, {""}, {""},
331+#line 34 "token2.tok"
332+ {"while", TK_WHILE},
333+#line 11 "token2.tok"
334 {"double", TK_DOUBLE},
335+#line 9 "token2.tok"
336 {"default", TK_DEFAULT},
337- {"for", TK_FOR},
338- {""},
339- {"float", TK_FLOAT},
340- {""}, {""},
341- {"int", TK_INT},
342- {"enum", TK_ENUM},
343- {""}, {""},
344- {"typedef", TK_TYPEDEF},
345- {"register", TK_REGISTER},
346+#line 33 "token2.tok"
347+ {"volatile", TK_VOLATILE},
348+#line 3 "token2.tok"
349 {"auto", TK_AUTO},
350- {""}, {""}, {""}, {""},
351+#line 4 "token2.tok"
352+ {"break", TK_BREAK},
353+#line 25 "token2.tok"
354+ {"sizeof", TK_SIZEOF},
355+ {""},
356+#line 35 "token2.tok"
357+ {"__FILE__", TK_FILE},
358+#line 20 "token2.tok"
359 {"long", TK_LONG},
360- {""}, {""}, {""},
361- {"volatile", TK_VOLATILE},
362- {""}, {""},
363- {"return", TK_RETURN},
364- {""}, {""}, {""}, {""},
365- {"extern", TK_EXTERN},
366+ {""},
367+#line 26 "token2.tok"
368+ {"static", TK_STATIC},
369 {""}, {""},
370- {"goto", TK_GOTO}
371+#line 6 "token2.tok"
372+ {"char", TK_CHAR}
373 };
374
375 if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
376 {
377- register int key = hash2 (str, len);
378+ register unsigned int key = hash2 (str, len);
379
380- if (key <= MAX_HASH_VALUE && key >= 0)
381+ if (key <= MAX_HASH_VALUE)
382 {
383 register const char *s = wordlist[key].name;
384
385- if (*str == *s && !strncmp (str + 1, s + 1, len - 1))
386+ if (*str == *s && !strncmp (str + 1, s + 1, len - 1) && s[len] == '\0')
387 return &wordlist[key];
388 }
389 }
diff --git a/recipes-extended/dev86/dev86_git.bb b/recipes-extended/dev86/dev86_git.bb
index c987342b..a5f40fab 100644
--- a/recipes-extended/dev86/dev86_git.bb
+++ b/recipes-extended/dev86/dev86_git.bb
@@ -9,6 +9,8 @@ PV = "${BASE_PV}+git${SRCPV}"
9SRCREV = "e254e0b19651d3b8a20225b40281c9974a95dec4" 9SRCREV = "e254e0b19651d3b8a20225b40281c9974a95dec4"
10SRC_URI = "git://github.com/jbruchon/${BPN}.git;protocol=https \ 10SRC_URI = "git://github.com/jbruchon/${BPN}.git;protocol=https \
11 file://0001-cpp-Makefile-respect-LDFLAGS-when-building-bcc-cpp.patch \ 11 file://0001-cpp-Makefile-respect-LDFLAGS-when-building-bcc-cpp.patch \
12 file://0003-cpp-update-token1.tok-to-make-new-gperf-happy-regen..patch \
13 file://0004-regen-token2.h-token1.h-with-gperf-3.1.patch \
12" 14"
13SRC_URI_append_class-target = " \ 15SRC_URI_append_class-target = " \
14 file://0002-Makefile-use-ifdefg-from-dev86-native-instead-of-tar.patch \ 16 file://0002-Makefile-use-ifdefg-from-dev86-native-instead-of-tar.patch \