minimal plan9port to cross-build Jehanne

This commit is contained in:
2021-12-22 10:35:45 +01:00
commit c43269a19e
245 changed files with 26213 additions and 0 deletions

20
lib/lib9/sysfatal.c Normal file
View File

@ -0,0 +1,20 @@
#include <lib9.h>
void (*_sysfatal)(char*, ...);
void
sysfatal(char *fmt, ...)
{
char buf[256];
va_list arg;
va_start(arg, fmt);
if(_sysfatal)
(*_sysfatal)(fmt, arg);
vseprint(buf, buf+sizeof buf, fmt, arg);
va_end(arg);
__fixargv0();
fprint(2, "%s: %s\n", argv0 ? argv0 : "<prog>", buf);
exits("fatal");
}