diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /dev-lang/mmix/files |
reinit the tree, so we can have metadata
Diffstat (limited to 'dev-lang/mmix/files')
-rw-r--r-- | dev-lang/mmix/files/mmix-20110420-makefile.patch | 71 | ||||
-rw-r--r-- | dev-lang/mmix/files/mmix-20131017-format-security.patch | 59 |
2 files changed, 130 insertions, 0 deletions
diff --git a/dev-lang/mmix/files/mmix-20110420-makefile.patch b/dev-lang/mmix/files/mmix-20110420-makefile.patch new file mode 100644 index 000000000000..14107ed915a9 --- /dev/null +++ b/dev-lang/mmix/files/mmix-20110420-makefile.patch @@ -0,0 +1,71 @@ +--- a/Makefile ++++ b/Makefile +@@ -27,23 +27,23 @@ + if test -r $*.ch; then cweave $*.w $*.ch; else cweave $*.w; fi + + .w.o: +- make $*.c +- make $*.o ++ $(MAKE) $*.c ++ $(MAKE) $*.o + + .w: +- make $*.c +- make $* ++ $(MAKE) $*.c ++ $(MAKE) $* + + .w.dvi: +- make $*.tex +- make $*.dvi ++ $(MAKE) $*.tex ++ $(MAKE) $*.dvi + + .w.ps: +- make $*.dvi +- make $*.ps ++ $(MAKE) $*.dvi ++ $(MAKE) $*.ps + + .w.pdf: +- make $*.tex ++ $(MAKE) $*.tex + case "$(PDFTEX)" in \ + dvipdfm ) tex "\let\pdf+ \input $*"; dvipdfm $* ;; \ + pdftex ) pdftex $* ;; \ +@@ -73,27 +73,26 @@ + clean: + rm -f *~ *.o *.c *.h *.tex *.log *.dvi *.toc *.idx *.scn *.ps core + +-mmix-pipe.o: mmix-pipe.c abstime ++abstime.h: abstime + ./abstime > abstime.h ++ ++mmix-pipe.o: mmix-pipe.c abstime abstime.h + $(CC) $(CFLAGS) -c mmix-pipe.c +- rm abstime.h + + mmix-config.o: mmix-pipe.o + + mmmix: mmix-arith.o mmix-pipe.o mmix-config.o mmix-mem.o mmix-io.o mmmix.c +- $(CC) $(CFLAGS) mmmix.c \ ++ $(CC) $(CFLAGS) $(LDFLAGS) mmmix.c \ + mmix-arith.o mmix-pipe.o mmix-config.o mmix-mem.o mmix-io.o -o mmmix + + mmixal: mmix-arith.o mmixal.c +- $(CC) $(CFLAGS) mmixal.c mmix-arith.o -o mmixal ++ $(CC) $(CFLAGS) $(LDFLAGS) mmixal.c mmix-arith.o -o mmixal + +-mmix: mmix-arith.o mmix-io.o mmix-sim.c abstime +- ./abstime > abstime.h +- $(CC) $(CFLAGS) mmix-sim.c mmix-arith.o mmix-io.o -o mmix +- rm abstime.h ++mmix: mmix-arith.o mmix-io.o mmix-sim.c abstime abstime.h ++ $(CC) $(CFLAGS) $(LDFLAGS) mmix-sim.c mmix-arith.o mmix-io.o -o mmix + + mmotype: mmotype.c +- $(CC) $(CFLAGS) mmotype.c -o mmotype ++ $(CC) $(CFLAGS) $(LDFLAGS) mmotype.c -o mmotype + + tarfile: $(ALL) + tar cvf /tmp/mmix.tar $(ALL) diff --git a/dev-lang/mmix/files/mmix-20131017-format-security.patch b/dev-lang/mmix/files/mmix-20131017-format-security.patch new file mode 100644 index 000000000000..3824765317b9 --- /dev/null +++ b/dev-lang/mmix/files/mmix-20131017-format-security.patch @@ -0,0 +1,59 @@ +diff --git a/mmix-pipe.w b/mmix-pipe.w +index b7f4536..a1a9a48 100644 +--- a/mmix-pipe.w ++++ b/mmix-pipe.w +@@ -1883,7 +1883,7 @@ static void print_specnode_id(a) + octa a; + { + if (a.h==sign_bit) { +- if (a.l<32) printf(special_name[a.l]); ++ if (a.l<32) fputs(special_name[a.l], stdout); + else if (a.l<256) printf("g[%d]",a.l); + else printf("l[%d]",a.l-256); + }@+else if (a.h!=(tetra)-1) { +diff --git a/mmix-sim.w b/mmix-sim.w +index cb6995c..176f60c 100644 +--- a/mmix-sim.w ++++ b/mmix-sim.w +@@ -2832,7 +2832,7 @@ void trace_print(o) + case hex: fputc('#',stdout);@+print_hex(o);@+return; + case zhex: printf("%08x%08x",o.h,o.l);@+return; + case floating: print_float(o);@+return; +- case handle:@+if (o.h==0 && o.l<3) printf(stream_name[o.l]); ++ case handle:@+if (o.h==0 && o.l<3) fputs(stream_name[o.l], stdout); + else print_int(o);@+return; + } + } +@@ -2843,9 +2843,9 @@ case ')': fputc(right_paren[round_mode],stdout);@+break; + case 't':@+if (x.l) printf(" Yes, -> #"),print_hex(inst_ptr); + else printf(" No");@+break; + case 'g':@+if (!good) printf(" (bad guess)");@+break; +-case 's': printf(special_name[zz]);@+break; ++case 's': fputs(special_name[zz], stdout);@+break; + case '?': p++;@+if (z.l) printf("%c%d",*p,z.l);@+break; +-case 'l': printf(lhs);@+break; ++case 'l': fputs(lhs, stdout);@+break; + case 'r': p=switchable_string;@+break; + + @ @d rhs &switchable_string[1] +@@ -2984,9 +2984,9 @@ void scan_option(arg,usage) + fprintf(stderr, + "Usage: %s <options> progfile command line-args...\n",myself); + @.Usage: ...@> +- for (k=0;usage_help[k][0];k++) fprintf(stderr,usage_help[k]); ++ for (k=0;usage_help[k][0];k++) fputs(usage_help[k], stderr); + exit(-1); +- }@+else@+ for (k=0;usage_help[k][1]!='b';k++) printf(usage_help[k]); ++ }@+else@+ for (k=0;usage_help[k][1]!='b';k++) fputs(usage_help[k], stdout); + return; + } + } +@@ -3090,7 +3090,7 @@ void catchint(n) + printf("Eh? Sorry, I don't understand `%s'. (Type h for help)\n", + command_buf); + goto interact; +- case 'h':@+ for (k=0;interactive_help[k][0];k++) printf(interactive_help[k]); ++ case 'h':@+ for (k=0;interactive_help[k][0];k++) fputs(interactive_help[k], stdout); + goto interact; + } + check_syntax:@+ if (*p!='\n') { |