Re: [9fans] How can I compile c code written for plan9 in ANIS C compiler

2022-10-11 Thread ron minnich
ah found one. This was for one instance of where mach was used. It basically says if mach is used in a function, put a declaration of m at the start of the function. @mr exists@ typedef Mach; // only needed once per semantic patch idexpression Mach *m; function f; position p; identifier d; @@

Re: [9fans] How can I compile c code written for plan9 in ANIS C compiler

2022-10-11 Thread ron minnich
we used the coccinnelle tool (spatch) to convert about 1.4M lines of Plan 9 code to C11 for harvey. It was not perfect, but it did get a lot right. This even got pretty complex: in amd64 Plan 9, r14 and r15 are dedicated to up and mach. This is not portable, so we wanted to make it explicit. So