minipeg on 9front
tcp80.org·178w
Preview
Report Post

be0ba 2022-07-31

Apply the patch, and on a *nix box, make minipeg-new.c && mv minipeg-new.c minipeg.c. After that, create version.h either using make version.h on *nix, or by w/e means you like on 9front, and then pcc -D_POSIX_SOURCE -D_BSD_EXTENSION -c minipeg.c and link the resulting object file.

diff --git a/compile.c b/compile.c
index 4e7977d..3abe12e 100644
--- a/compile.c
+++ b/compile.c
@@ -389,7 +389,7 @@ static char *header=

static char *preamble= "\
#ifndef YY_MAYBE_UNUSED\n\
-#define YY_MAYBE_UNUSED __attribute__((unused))\n\
+#define YY_MAYBE_UNUSED\n\
#endif\n\
#ifndef YY_MALLOC\n\
#define YY_MALLOC(C, N)		malloc(N)\n\
diff --git a/peg.peg b/peg.peg
index 686106a..2b39d7c 100644
--- a/peg.peg
+++ b/peg.peg
@@ -2,13 +2,16 @@
#include "tree.h"
#include "versi...

Similar Posts

Loading similar posts...