shithub: mc

Download patch

ref: 4ed002a147669f67222a266959c99badb3136f37
parent: ac3d02cdfbafe7b887cbd8738d3df9b17c5c82c9
author: Ori Bernstein <ori@eigenstate.org>
date: Mon May 18 06:55:19 EDT 2015

Fix build on OSX.

    A couple of symprefix doublings and type redefinitions.

--- a/6/asm.h
+++ b/6/asm.h
@@ -12,7 +12,6 @@
 typedef struct Blob Blob;
 typedef struct Isel Isel;
 typedef struct Asmbb Asmbb;
-typedef struct Blob Blob;
 
 typedef enum {
 #define Insn(val, gasfmt, p9fmt, use, def) val,
--- a/6/gengas.c
+++ b/6/gengas.c
@@ -536,10 +536,10 @@
             encodemin(fd, b->ival);
             break;
         case Btref:
-            fprintf(fd, "\t.quad %s%s\n", Symprefix, b->ref);
+            fprintf(fd, "\t.quad %s\n", b->ref);
             break;
         case Btbytes:
-            writebytes(fd, b->bytes.buf, b->bytes.len);
+            writebytes(fd, b->bytes.buf, b->bytes.len + 1);
             break;
         case Btseq:
             for (i = 0; i < b->seq.nsub; i++)