ref: c66e91c68b28138da3ea4b761d63271591078414
parent: f9e21a66f6594e62a494da24f52957187390b6a2
author: Sigrid Solveig Haflínudóttir <sigrid@ftrv.se>
date: Tue Oct 1 22:48:09 EDT 2024
update for newest c9
--- a/9gc.c
+++ b/9gc.c
@@ -13,7 +13,7 @@
#include <sys/types.h>
#include <termios.h>
#include <unistd.h>
-#include "c9.h"
+#include "c9/proto.h"
#include "parg.h"
enum
@@ -297,12 +297,13 @@
}
}
-__attribute__((format(printf, 1, 2)))
+__attribute__((format(printf, 2, 3)))
static void
-ctxerror(const char *fmt, ...)
+ctxerror(C9ctx *c, const char *fmt, ...)
{
va_list ap;
+ (void)c;
va_start(ap, fmt);
vfprintf(stderr, fmt, ap);
fprintf(stderr, "\n");
--- a/9pex.c
+++ b/9pex.c
@@ -24,7 +24,7 @@
#define st_atim st_atimespec
#define st_ctim st_ctimespec
#endif
-#include "c9.h"
+#include "c9/proto.h"
#include "parg.h"
#define max(a,b) ((a)>(b)?(a):(b))
@@ -660,12 +660,13 @@
return 0;
}
-__attribute__((format(printf, 1, 2)))
+__attribute__((format(printf, 2, 3)))
static void
-ctxerror(const char *fmt, ...)
+ctxerror(C9ctx *c, const char *fmt, ...)
{
va_list ap;
+ used(c);
va_start(ap, fmt);
vfprintf(stderr, fmt, ap);
fprintf(stderr, "\n");
--- a/Makefile
+++ b/Makefile
@@ -2,10 +2,10 @@
PREFIX?=/usr/local
BIN=${DESTDIR}${PREFIX}/bin
CFLAGS?=-g -O2
-CFLAGS+=-std=c99 -Wall -Wextra -Wshadow -Ic9 -Iparg
+CFLAGS+=-std=c99 -Wall -Wextra -Wshadow -Ic9/include -Iparg
PEX_O=9pex.o crc32.o
GC_O=9gc.o
-COMMON_O=c9/c9.o parg/parg.o
+COMMON_O=c9/proto.o parg/parg.o
all: default