From 69b6dcf83c6e7b5aefe16f23d720cd691cdde3ef Mon Sep 17 00:00:00 2001 From: phani Date: Fri, 13 Dec 2019 17:37:56 -0500 Subject: [PATCH] added http-parser --- .gitmodules | 3 +++ runtime/Makefile | 8 +++++++- runtime/http-parser | 1 + 3 files changed, 11 insertions(+), 1 deletion(-) create mode 160000 runtime/http-parser diff --git a/.gitmodules b/.gitmodules index 1eb41ce..b177dee 100644 --- a/.gitmodules +++ b/.gitmodules @@ -5,3 +5,6 @@ [submodule "runtime/jsmn"] path = runtime/jsmn url = https://github.com/zserge/jsmn.git +[submodule "runtime/http-parser"] + path = runtime/http-parser + url = https://github.com/nodejs/http-parser.git diff --git a/runtime/Makefile b/runtime/Makefile index 940fa91..5332ca6 100644 --- a/runtime/Makefile +++ b/runtime/Makefile @@ -31,6 +31,12 @@ JSMN=jsmn JSMNINC=-I${JSMN} JSMNCFLAGS=${JSMNINC} -DJSMN_STATIC -DJSMN_STRICT +HTTPPARSE=http-parser +HTTPPARSEINC=-I${HTTPPARSE} +HTTPPARSESRC=${HTTPPARSE}/http_parser.c +HTTPPARSECFLAGS=${HTTPPARSEINC} +CFILES += ${HTTPPARSESRC} + ifeq ($(USE_MEM),USE_MEM_GENERIC) CFILES += ${RTDIR}/memory/generic.c else ifeq ($(USE_MEM),USE_MEM_VM) @@ -42,7 +48,7 @@ all: clean runtime tools runtime: @echo "Compiling runtime" @mkdir -p bin/ - @${CC} ${CFLAGS} ${LDFLAGS} ${CFILES} ${JSMNCFLAGS} -L/usr/lib/ -luv $^ -o ${RUNTIME} + @${CC} ${CFLAGS} ${LDFLAGS} ${CFILES} ${JSMNCFLAGS} ${HTTPPARSECFLAGS} -L/usr/lib/ -luv $^ -o ${RUNTIME} tools: # @echo "Compiling tools" diff --git a/runtime/http-parser b/runtime/http-parser new file mode 160000 index 0000000..28f3c35 --- /dev/null +++ b/runtime/http-parser @@ -0,0 +1 @@ +Subproject commit 28f3c35c215ffbe0241685901338fad484660454