mirror of
https://github.com/yann64/haikuports.git
synced 2026-05-05 06:28:55 +02:00
bison: added a recipe for version 2.6.5
This commit is contained in:
@@ -1,29 +0,0 @@
|
||||
diff -urN bison-2.5/src/AnnotationList.c bison-2.5-haiku/src/AnnotationList.c
|
||||
--- bison-2.5/src/AnnotationList.c 2011-03-06 16:47:12.043515904 -0800
|
||||
+++ bison-2.5-haiku/src/AnnotationList.c 2012-08-26 09:54:44.000000000 -0700
|
||||
@@ -233,9 +233,10 @@
|
||||
AnnotationList *annotation_node =
|
||||
AnnotationList__alloc_on_obstack (
|
||||
self->inadequacyNode->contributionCount, annotations_obstackp);
|
||||
- annotation_node->inadequacyNode = self->inadequacyNode;
|
||||
bool potential_contribution = false;
|
||||
bitset *lookaheads = NULL;
|
||||
+ annotation_node->inadequacyNode = self->inadequacyNode;
|
||||
+
|
||||
{
|
||||
ContributionIndex ci;
|
||||
for (ci = 0; ci < self->inadequacyNode->contributionCount; ++ci)
|
||||
diff -urN bison-2.5/src/ielr.c bison-2.5-haiku/src/ielr.c
|
||||
--- bison-2.5/src/ielr.c 2011-03-06 16:47:12.044564480 -0800
|
||||
+++ bison-2.5-haiku/src/ielr.c 2012-08-26 10:05:25.000000000 -0700
|
||||
@@ -1032,9 +1032,9 @@
|
||||
lookahead sets. */
|
||||
if (!annotation_lists)
|
||||
{
|
||||
+ state_list *node;
|
||||
timevar_push (TV_IELR_PHASE4);
|
||||
initialize_LA ();
|
||||
- state_list *node;
|
||||
for (node = first_state; node; node = node->next)
|
||||
if (!node->state->consistent)
|
||||
{
|
||||
@@ -1,29 +0,0 @@
|
||||
diff -urN bison-2.5/src/location.c bison-2.5-haiku/src/location.c
|
||||
--- bison-2.5/src/location.c 2011-05-01 22:17:32.046137344 +0000
|
||||
+++ bison-2.5-haiku/src/location.c 2012-06-01 18:19:15.538443776 +0000
|
||||
@@ -144,11 +144,11 @@
|
||||
/* Must search in reverse since the file name field may
|
||||
* contain `.' or `:'. */
|
||||
char *delim = mbsrchr (loc_str, '.');
|
||||
- aver (delim);
|
||||
+ aver (delim != NULL);
|
||||
*delim = '\0';
|
||||
bound->column = atoi (delim+1);
|
||||
delim = mbsrchr (loc_str, ':');
|
||||
- aver (delim);
|
||||
+ aver (delim != NULL);
|
||||
*delim = '\0';
|
||||
bound->line = atoi (delim+1);
|
||||
bound->file = uniqstr_new (loc_str);
|
||||
diff -urN bison-2.5/src/muscle-tab.c bison-2.5-haiku/src/muscle-tab.c
|
||||
--- bison-2.5/src/muscle-tab.c 2011-05-14 22:17:12.043253760 +0000
|
||||
+++ bison-2.5-haiku/src/muscle-tab.c 2012-06-01 18:16:05.827326464 +0000
|
||||
@@ -336,7 +336,7 @@
|
||||
{
|
||||
location loc;
|
||||
char const *value = muscle_find_const (key);
|
||||
- aver (value);
|
||||
+ aver (value != NULL);
|
||||
aver (*value == '[');
|
||||
aver (*++value == '[');
|
||||
while (*++value)
|
||||
@@ -1,81 +0,0 @@
|
||||
diff -urN bison-2.6.2/src/AnnotationList.c bison-2.6.2-haiku/src/AnnotationList.c
|
||||
--- bison-2.6.2/src/AnnotationList.c 2012-03-30 05:39:19.030146560 -0700
|
||||
+++ bison-2.6.2-haiku/src/AnnotationList.c 2012-09-30 11:25:40.750518272 -0700
|
||||
@@ -230,12 +230,13 @@
|
||||
state **predecessor;
|
||||
for (predecessor = predecessors[s->number]; *predecessor; ++predecessor)
|
||||
{
|
||||
+ bool potential_contribution = false;
|
||||
+ bitset *lookaheads = NULL;
|
||||
AnnotationList *annotation_node =
|
||||
AnnotationList__alloc_on_obstack (
|
||||
self->inadequacyNode->contributionCount, annotations_obstackp);
|
||||
annotation_node->inadequacyNode = self->inadequacyNode;
|
||||
- bool potential_contribution = false;
|
||||
- bitset *lookaheads = NULL;
|
||||
+
|
||||
{
|
||||
ContributionIndex ci;
|
||||
for (ci = 0; ci < self->inadequacyNode->contributionCount; ++ci)
|
||||
diff -urN bison-2.6.2/src/ielr.c bison-2.6.2-haiku/src/ielr.c
|
||||
--- bison-2.6.2/src/ielr.c 2012-03-30 05:39:19.032243712 -0700
|
||||
+++ bison-2.6.2-haiku/src/ielr.c 2012-09-30 11:28:10.713555968 -0700
|
||||
@@ -1032,9 +1032,9 @@
|
||||
lookahead sets. */
|
||||
if (!annotation_lists)
|
||||
{
|
||||
+ state_list *node;
|
||||
timevar_push (TV_IELR_PHASE4);
|
||||
initialize_LA ();
|
||||
- state_list *node;
|
||||
for (node = first_state; node; node = node->next)
|
||||
if (!node->state->consistent)
|
||||
{
|
||||
diff -urN bison-2.6.2/src/location.c bison-2.6.2-haiku/src/location.c
|
||||
--- bison-2.6.2/src/location.c 2012-03-30 05:39:19.033030144 -0700
|
||||
+++ bison-2.6.2-haiku/src/location.c 2012-09-30 10:32:52.147587072 -0700
|
||||
@@ -144,11 +144,11 @@
|
||||
/* Must search in reverse since the file name field may
|
||||
* contain `.' or `:'. */
|
||||
char *delim = mbsrchr (loc_str, '.');
|
||||
- aver (delim);
|
||||
+ aver (delim != NULL);
|
||||
*delim = '\0';
|
||||
bound->column = atoi (delim+1);
|
||||
delim = mbsrchr (loc_str, ':');
|
||||
- aver (delim);
|
||||
+ aver (delim != NULL);
|
||||
*delim = '\0';
|
||||
bound->line = atoi (delim+1);
|
||||
bound->file = uniqstr_new (loc_str);
|
||||
diff -urN bison-2.6.2/src/muscle-tab.c bison-2.6.2-haiku/src/muscle-tab.c
|
||||
--- bison-2.6.2/src/muscle-tab.c 2012-07-30 09:06:21.033816576 -0700
|
||||
+++ bison-2.6.2-haiku/src/muscle-tab.c 2012-09-30 10:32:52.255852544 -0700
|
||||
@@ -344,7 +344,7 @@
|
||||
{
|
||||
location loc;
|
||||
char const *value = muscle_find_const (key);
|
||||
- aver (value);
|
||||
+ aver (value != NULL);
|
||||
aver (*value == '[');
|
||||
aver (*++value == '[');
|
||||
while (*++value)
|
||||
diff -urN bison-2.6.2/src/scan-code.l bison-2.6.2-haiku/src/scan-code.l
|
||||
--- bison-2.6.2/src/scan-code.l 2012-07-30 09:06:21.009437184 -0700
|
||||
+++ bison-2.6.2-haiku/src/scan-code.l2 2012-09-30 19:52:46.294912000 -0700
|
||||
@@ -611,12 +611,12 @@
|
||||
indent += SUB_INDENT;
|
||||
if (len == 0)
|
||||
{
|
||||
- location sym_loc = text_loc;
|
||||
- sym_loc.start.column += 1;
|
||||
- sym_loc.end = sym_loc.start;
|
||||
const char *format =
|
||||
_("syntax error after '%c', expecting integer, letter,"
|
||||
" '_', '[', or '$'");
|
||||
+ location sym_loc = text_loc;
|
||||
+ sym_loc.start.column += 1;
|
||||
+ sym_loc.end = sym_loc.start;
|
||||
complain_at_indent (sym_loc, &indent, format, dollar_or_at);
|
||||
}
|
||||
else if (midrule_rhs_index)
|
||||
100
sys-devel/bison/patches/bison-2.6.5.patchset
Normal file
100
sys-devel/bison/patches/bison-2.6.5.patchset
Normal file
@@ -0,0 +1,100 @@
|
||||
From 9a1dd934ea2f8fd0f05cb9bb0c647514810342c4 Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Duval <jerome.duval@gmail.com>
|
||||
Date: Mon, 4 Aug 2014 19:41:40 +0000
|
||||
Subject: c89 patch
|
||||
|
||||
|
||||
diff --git a/src/AnnotationList.c b/src/AnnotationList.c
|
||||
index 4c1e0ae..97f35f6 100644
|
||||
--- a/src/AnnotationList.c
|
||||
+++ b/src/AnnotationList.c
|
||||
@@ -233,9 +233,10 @@ AnnotationList__computePredecessorAnnotations (AnnotationList *self, state *s,
|
||||
AnnotationList *annotation_node =
|
||||
AnnotationList__alloc_on_obstack (
|
||||
self->inadequacyNode->contributionCount, annotations_obstackp);
|
||||
- annotation_node->inadequacyNode = self->inadequacyNode;
|
||||
bool potential_contribution = false;
|
||||
bitset *lookaheads = NULL;
|
||||
+ annotation_node->inadequacyNode = self->inadequacyNode;
|
||||
+
|
||||
{
|
||||
ContributionIndex ci;
|
||||
for (ci = 0; ci < self->inadequacyNode->contributionCount; ++ci)
|
||||
diff --git a/src/getargs.c b/src/getargs.c
|
||||
index 6490569..bbf1845 100644
|
||||
--- a/src/getargs.c
|
||||
+++ b/src/getargs.c
|
||||
@@ -267,6 +267,7 @@ static void usage (int) ATTRIBUTE_NORETURN;
|
||||
static void
|
||||
usage (int status)
|
||||
{
|
||||
+ const char *lc_messages = setlocale (LC_MESSAGES, NULL);
|
||||
if (status != 0)
|
||||
fprintf (stderr, _("Try `%s --help' for more information.\n"),
|
||||
program_name);
|
||||
@@ -370,7 +371,6 @@ THINGS is a list of comma separated words that can include:\n\
|
||||
/* Don't output this redundant message for English locales.
|
||||
Note we still output for 'C' so that it gets included in the
|
||||
man page. */
|
||||
- const char *lc_messages = setlocale (LC_MESSAGES, NULL);
|
||||
if (lc_messages && strcmp (lc_messages, "en_"))
|
||||
/* TRANSLATORS: Replace LANG_CODE in this URL with your language
|
||||
code <http://translationproject.org/team/LANG_CODE.html> to
|
||||
diff --git a/src/ielr.c b/src/ielr.c
|
||||
index cde2baa..ce437e3 100644
|
||||
--- a/src/ielr.c
|
||||
+++ b/src/ielr.c
|
||||
@@ -1032,9 +1032,9 @@ ielr_split_states (bitsetv follow_kernel_items, bitsetv always_follows,
|
||||
lookahead sets. */
|
||||
if (!annotation_lists)
|
||||
{
|
||||
+ state_list *node;
|
||||
timevar_push (TV_IELR_PHASE4);
|
||||
initialize_LA ();
|
||||
- state_list *node;
|
||||
for (node = first_state; node; node = node->next)
|
||||
if (!node->state->consistent)
|
||||
{
|
||||
diff --git a/src/scan-code.l b/src/scan-code.l
|
||||
index fa593be..54f2921 100644
|
||||
--- a/src/scan-code.l
|
||||
+++ b/src/scan-code.l
|
||||
@@ -611,12 +611,12 @@ parse_ref (char *cp, symbol_list *rule, int rule_length,
|
||||
indent += SUB_INDENT;
|
||||
if (len == 0)
|
||||
{
|
||||
- location sym_loc = text_loc;
|
||||
- sym_loc.start.column += 1;
|
||||
- sym_loc.end = sym_loc.start;
|
||||
const char *format =
|
||||
_("syntax error after '%c', expecting integer, letter,"
|
||||
" '_', '[', or '$'");
|
||||
+ location sym_loc = text_loc;
|
||||
+ sym_loc.start.column += 1;
|
||||
+ sym_loc.end = sym_loc.start;
|
||||
complain_at_indent (sym_loc, &indent, format, dollar_or_at);
|
||||
}
|
||||
else if (midrule_rhs_index)
|
||||
diff --git a/src/uniqstr.c b/src/uniqstr.c
|
||||
index 62d09ca..4d5f0a7 100644
|
||||
--- a/src/uniqstr.c
|
||||
+++ b/src/uniqstr.c
|
||||
@@ -62,13 +62,14 @@ uniqstr_vsprintf (char const *format, ...)
|
||||
va_start (args, format);
|
||||
length = vsnprintf (NULL, 0, format, args);
|
||||
va_end (args);
|
||||
-
|
||||
+{
|
||||
char res[length + 1];
|
||||
va_start (args, format);
|
||||
vsprintf (res, format, args);
|
||||
va_end (args);
|
||||
return uniqstr_new (res);
|
||||
}
|
||||
+}
|
||||
|
||||
/*------------------------------.
|
||||
| Abort if S is not a uniqstr. |
|
||||
--
|
||||
1.8.3.4
|
||||
|
||||
Reference in New Issue
Block a user