diff options
Diffstat (limited to 'devel/ruby-byaccr/patches')
-rw-r--r-- | devel/ruby-byaccr/patches/patch-aa | 62 | ||||
-rw-r--r-- | devel/ruby-byaccr/patches/patch-ab | 38 | ||||
-rw-r--r-- | devel/ruby-byaccr/patches/patch-ac | 14 | ||||
-rw-r--r-- | devel/ruby-byaccr/patches/patch-ad | 70 | ||||
-rw-r--r-- | devel/ruby-byaccr/patches/patch-ae | 32 | ||||
-rw-r--r-- | devel/ruby-byaccr/patches/patch-af | 120 | ||||
-rw-r--r-- | devel/ruby-byaccr/patches/patch-ag | 60 |
7 files changed, 396 insertions, 0 deletions
diff --git a/devel/ruby-byaccr/patches/patch-aa b/devel/ruby-byaccr/patches/patch-aa new file mode 100644 index 00000000000..8e4d2efabe2 --- /dev/null +++ b/devel/ruby-byaccr/patches/patch-aa @@ -0,0 +1,62 @@ +$NetBSD: patch-aa,v 1.1.1.1 2001/07/01 14:39:15 taca Exp $ + +--- Makefile.orig Wed Nov 1 23:03:49 2000 ++++ Makefile +@@ -1,51 +1,8 @@ +-CC = gcc +-CFLAGS = -O +-PROGRAM = byaccr +-OBJ = closure.o \ +- error.o \ +- lalr.o \ +- lr0.o \ +- main.o \ +- mkpar.o \ +- output.o \ +- reader.o \ +- skeleton.o \ +- symtab.o \ +- verbose.o \ +- warshall.o ++PROG= byaccr ++SRCS= closure.c error.c lalr.c lr0.c main.c mkpar.c output.c reader.c \ ++ skeleton.c symtab.c verbose.c warshall.c + +-all: $(PROGRAM) ++BINDIR= ${LOCALBASE}/bin ++MKMAN= no + +-SRCS = closure.c \ +- error.c \ +- lalr.c \ +- lr0.c \ +- main.c \ +- mkpar.c \ +- output.c \ +- reader.c \ +- skeleton.c \ +- symtab.c \ +- verbose.c \ +- warshall.c +- +-$(PROGRAM): $(OBJ) +- $(CC) -o $(PROGRAM) $(OBJ) +- @echo "done" +- +-clean: +- /bin/rm -rf $(OBJ) *~ +- +-### +-closure.o: closure.c defs.h +-error.o: error.c defs.h +-lalr.o: lalr.c defs.h +-lr0.o: lr0.c defs.h +-main.o: main.c defs.h +-mkpar.o: mkpar.c defs.h +-output.o: output.c defs.h +-reader.o: reader.c defs.h +-skeleton.o: skeleton.c defs.h +-symtab.o: symtab.c defs.h +-verbose.o: verbose.c defs.h +-warshall.o: warshall.c defs.h ++.include <bsd.prog.mk> diff --git a/devel/ruby-byaccr/patches/patch-ab b/devel/ruby-byaccr/patches/patch-ab new file mode 100644 index 00000000000..993408293ff --- /dev/null +++ b/devel/ruby-byaccr/patches/patch-ab @@ -0,0 +1,38 @@ +$NetBSD: patch-ab,v 1.1.1.1 2001/07/01 14:39:15 taca Exp $ + +--- defs.h.orig Thu Nov 2 01:29:07 2000 ++++ defs.h +@@ -6,7 +6,8 @@ + #include <ctype.h> + #include <stdio.h> + #include <malloc.h> +- ++#include <unistd.h> ++#include <unistd.h> + + + /* machine-dependent definitions */ +@@ -241,8 +242,8 @@ + extern int ntags; + + extern char unionized; +-extern char line_format[]; +-extern char jline_format[];/*rwj*/ ++extern const char *line_format; ++extern const char *jline_format;/*rwj*/ + + extern int start_symbol; + extern char **symbol_name; +@@ -290,8 +291,11 @@ + + /* system variables */ + ++#ifdef NEED_ERRNO + extern int errno; +- ++#else ++#include <errno.h> ++#endif + + /************************ + ## PROTOTYPES diff --git a/devel/ruby-byaccr/patches/patch-ac b/devel/ruby-byaccr/patches/patch-ac new file mode 100644 index 00000000000..28ee577b0c1 --- /dev/null +++ b/devel/ruby-byaccr/patches/patch-ac @@ -0,0 +1,14 @@ +$NetBSD: patch-ac,v 1.1.1.1 2001/07/01 14:39:15 taca Exp $ + +--- lr0.c.orig Thu Nov 2 01:29:07 2000 ++++ lr0.c +@@ -12,9 +12,6 @@ + shifts *first_shift; + reductions *first_reduction; + +-int get_state(); +-core *new_state(); +- + static core **state_set; + static core *this_state; + static core *last_state; diff --git a/devel/ruby-byaccr/patches/patch-ad b/devel/ruby-byaccr/patches/patch-ad new file mode 100644 index 00000000000..0d1864c16db --- /dev/null +++ b/devel/ruby-byaccr/patches/patch-ad @@ -0,0 +1,70 @@ +$NetBSD: patch-ad,v 1.1.1.1 2001/07/01 14:39:15 taca Exp $ + +--- main.c.orig Thu Nov 2 01:29:07 2000 ++++ main.c +@@ -307,9 +307,11 @@ + text_file_name[len + 5] = 't'; + union_file_name[len + 5] = 'u'; + ++#ifdef WITHOUT_MKSTEMP + mktemp(action_file_name); + mktemp(text_file_name); + mktemp(union_file_name); ++#endif + + if (jflag)/*rwj*/ + { +@@ -363,6 +365,9 @@ + + void open_files(void) + { ++#ifndef WITHOUT_MKSTEMP ++ int fd; ++#endif + create_file_names(); + + if (input_file == 0) +@@ -372,11 +377,25 @@ + open_error(input_file_name); + } + +- action_file = fopen(action_file_name, "w"); ++#ifdef WITHOUT_MKSTEMP ++ action_file = fopen(action_file_name, "w+"); ++#else ++ action_file = NULL; ++ fd = mkstemp(action_file_name); ++ if (fd >= 0) ++ action_file = fdopen(fd, "w"); ++#endif + if (action_file == 0) + open_error(action_file_name); + +- text_file = fopen(text_file_name, "w"); ++#ifdef WITHOUT_MKSTEMP ++ text_file = fopen(text_file_name, "w+"); ++#else ++ text_file = NULL; ++ fd = mkstemp(text_file_name); ++ if (fd >= 0) ++ action_file = fdopen(fd, "w"); ++#endif + if (text_file == 0) + open_error(text_file_name); + +@@ -392,7 +411,14 @@ + defines_file = fopen(defines_file_name, "w"); + if (defines_file == 0) + open_error(defines_file_name); +- union_file = fopen(union_file_name, "w"); ++#ifdef WITHOUT_MKSTEMP ++ union_file = fopen(union_file_name, "w+"); ++#else ++ union_file = NULL; ++ fd = mkstemp(union_file_name); ++ if (fd >= 0) ++ union_file = fdopen(fd, "w"); ++#endif + if (union_file == 0) + open_error(union_file_name); + } diff --git a/devel/ruby-byaccr/patches/patch-ae b/devel/ruby-byaccr/patches/patch-ae new file mode 100644 index 00000000000..119bed55acd --- /dev/null +++ b/devel/ruby-byaccr/patches/patch-ae @@ -0,0 +1,32 @@ +$NetBSD: patch-ae,v 1.1.1.1 2001/07/01 14:39:15 taca Exp $ + +--- mkpar.c.orig Thu Nov 2 01:29:07 2000 ++++ mkpar.c +@@ -16,12 +16,6 @@ + static int SRcount; + static int RRcount; + +-extern action *parse_actions(); +-extern action *get_shifts(); +-extern action *add_reductions(); +-extern action *add_reduce(); +- +- + void make_parser(void) + { + int i; +@@ -174,11 +168,12 @@ + for (i = 3; i < nrules; ++i) + if (!rules_used[i]) ++nunused; + +- if (nunused) ++ if (nunused) { + if (nunused == 1) + fprintf(stderr, "%s: 1 rule never reduced\n", myname); + else +- fprintf(stderr, "%s: %d rules never reduced\n", myname, nunused); ++ fprintf(stderr, "%s: %d rules never reduced\n", myname, nunused); ++ } + } + + diff --git a/devel/ruby-byaccr/patches/patch-af b/devel/ruby-byaccr/patches/patch-af new file mode 100644 index 00000000000..5d06125f5b5 --- /dev/null +++ b/devel/ruby-byaccr/patches/patch-af @@ -0,0 +1,120 @@ +$NetBSD: patch-af,v 1.1.1.1 2001/07/01 14:39:15 taca Exp $ + +--- output.c.orig Tue Nov 14 17:42:19 2000 ++++ output.c +@@ -834,9 +834,7 @@ + s = symbol_name[i]; + if (is_C_identifier(s)) + { +- if (jflag) /*rwj*/ +- fprintf(code_file, ""); +- else ++ if (!jflag) /*rwj*/ + fprintf(code_file, "#define "); + if (dflag) fprintf(defines_file, "#define "); + c = *s; +@@ -876,8 +874,17 @@ + + if (dflag && unionized) + { ++#ifdef WITHOUT_MKSTEMP + fclose(union_file); + union_file = fopen(union_file_name, "r"); ++#else ++ if (fflush(union_file) == 0) ++ rewind(union_file); ++ else { ++ fclose(union_file); ++ union_file = NULL; ++ } ++#endif + if (union_file == NULL) open_error(union_file_name); + while ((c = getc(union_file)) != EOF) + putc(c, defines_file); +@@ -891,8 +898,17 @@ + int c; + FILE *in, *out; + ++#ifdef WITHOUT_MKSTEMP + fclose(text_file); + text_file = fopen(text_file_name, "r"); ++#else ++ if (fflush(text_file) == 0) ++ rewind(text_file); ++ else { ++ fclose(text_file); ++ text_file = NULL; ++ } ++#endif + if (text_file == NULL) + open_error(text_file_name); + in = text_file; +@@ -908,11 +924,12 @@ + ++outline; + putc(c, out); + } +- if (!lflag) ++ if (!lflag) { + if (jflag)/*rwj*/ + fprintf(out, jline_format, ++outline + 1, code_file_name); + else + fprintf(out, line_format, ++outline + 1, code_file_name); ++ } + } + + +@@ -1191,8 +1208,6 @@ + void output_stype(void) + { + int prim; /*is the Ruby semantic type a primitive?*/ +-char filenam[128]; +-FILE *f; + if (jflag){ /*rwj*/ + prim=0; + fprintf(code_file,"\n\n"); +@@ -1313,11 +1328,12 @@ + ++outline; + putc('\n', out); + } +- if (!lflag) ++ if (!lflag) { + if (jflag) + fprintf(out, jline_format, ++outline + 1, code_file_name); + else + fprintf(out, line_format, ++outline + 1, code_file_name); ++ } + } + + +@@ -1326,8 +1342,17 @@ + int c, last; + FILE *out; + ++#ifdef WITHOUT_MKSTEMP + fclose(action_file); + action_file = fopen(action_file_name, "r"); ++#else ++ if (fflush(action_file) == 0) ++ rewind(action_file); ++ else { ++ fclose(action_file); ++ action_file = NULL; ++ } ++#endif + if (action_file == NULL) + open_error(action_file_name); + +@@ -1353,11 +1378,12 @@ + putc('\n', out); + } + +- if (!lflag) ++ if (!lflag) { + if (jflag)/*rwj*/ + fprintf(out, jline_format, ++outline + 1, code_file_name); + else + fprintf(out, line_format, ++outline + 1, code_file_name); ++ } + } + + void free_itemsets(void) diff --git a/devel/ruby-byaccr/patches/patch-ag b/devel/ruby-byaccr/patches/patch-ag new file mode 100644 index 00000000000..d5e20652d4c --- /dev/null +++ b/devel/ruby-byaccr/patches/patch-ag @@ -0,0 +1,60 @@ +$NetBSD: patch-ag,v 1.1.1.1 2001/07/01 14:39:15 taca Exp $ + +--- reader.c.orig Thu Nov 2 01:29:07 2000 ++++ reader.c +@@ -35,8 +35,8 @@ + int name_pool_size; + char *name_pool; + +-char line_format[] = "#line %d \"%s\"\n"; +-char jline_format[] = "#line %d \"%s\"\n"; ++const char *line_format = "#line %d \"%s\"\n"; ++const char *jline_format = "#line %d \"%s\"\n"; + + + void cachec(int c) +@@ -315,11 +315,12 @@ + if (line == 0) + unterminated_text(t_lineno, t_line, t_cptr); + } +- if (!lflag)/*rwj*/ ++ if (!lflag) { /*rwj*/ + if (jflag) + fprintf(f, jline_format, lineno, input_file_name); + else + fprintf(f, line_format, lineno, input_file_name); ++ } + + loop: + c = *cptr++; +@@ -446,11 +447,12 @@ + if (unionized) over_unionized(cptr - 6); + unionized = 1; + +- if (!lflag) ++ if (!lflag) { + if (jflag) + fprintf(text_file, jline_format, lineno, input_file_name); + else + fprintf(text_file, line_format, lineno, input_file_name); ++ } + + fprintf(text_file, "typedef union"); + if (dflag) fprintf(union_file, "typedef union"); +@@ -1190,7 +1192,7 @@ + insert_empty_rule(); + last_was_action = 1; + +- if (!lflag)/*rwj*/ ++ if (!lflag)/*rwj*/ { + if (jflag){ + fprintf(f, "when %d\n", nrules - 2); + fprintf(f, jline_format, lineno, input_file_name); +@@ -1199,6 +1201,7 @@ + fprintf(f, "%d:\n", nrules - 2); + fprintf(f, line_format, lineno, input_file_name); + }; ++ } + + if (*cptr == '=') ++cptr; + |