From e02512032be39346e377688174c0f3677eaf8544 Mon Sep 17 00:00:00 2001 From: Jan-E Date: Sun, 13 Mar 2016 18:12:39 +0100 Subject: [PATCH 1/8] Fix missing external symbol nghttp2_rcbuf_new2 --- lib/Makefile.msvc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/Makefile.msvc b/lib/Makefile.msvc index c34b6995..391ae0e3 100644 --- a/lib/Makefile.msvc +++ b/lib/Makefile.msvc @@ -90,7 +90,8 @@ NGHTTP2_SRC := nghttp2_pq.c \ nghttp2_option.c \ nghttp2_callbacks.c \ nghttp2_mem.c \ - nghttp2_http.c + nghttp2_http.c \ + nghttp2_rcbuf.c NGHTTP2_OBJ_R := $(addprefix $(OBJ_DIR)/r_, $(notdir $(NGHTTP2_SRC:.c=.obj))) NGHTTP2_OBJ_D := $(addprefix $(OBJ_DIR)/d_, $(notdir $(NGHTTP2_SRC:.c=.obj))) From 4cde76c9c3474472460d7f73467dde723cdaee77 Mon Sep 17 00:00:00 2001 From: Jan-E Date: Sun, 13 Mar 2016 18:13:46 +0100 Subject: [PATCH 2/8] Do not use Cython by default --- lib/Makefile.msvc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Makefile.msvc b/lib/Makefile.msvc index 391ae0e3..4c2043af 100644 --- a/lib/Makefile.msvc +++ b/lib/Makefile.msvc @@ -12,8 +12,8 @@ # THIS_MAKEFILE := $(lastword $(MAKEFILE_LIST)) -USE_CYTHON := 1 -#USE_CYTHON := 0 +USE_CYTHON := 0 +#USE_CYTHON := 1 _VERSION := $(shell grep AC_INIT ../configure.ac | cut -d'[' -f3 | sed -r -e 's/(-DEV)?], //g') _VERSION := $(subst ., ,$(_VERSION)) From fa36537f8285c7a317427b46cb4627d4ee2f7b5d Mon Sep 17 00:00:00 2001 From: Jan-E Date: Sun, 13 Mar 2016 18:18:22 +0100 Subject: [PATCH 3/8] Detect version for releases en dev versions --- lib/Makefile.msvc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Makefile.msvc b/lib/Makefile.msvc index 4c2043af..5ab6a697 100644 --- a/lib/Makefile.msvc +++ b/lib/Makefile.msvc @@ -15,7 +15,7 @@ THIS_MAKEFILE := $(lastword $(MAKEFILE_LIST)) USE_CYTHON := 0 #USE_CYTHON := 1 -_VERSION := $(shell grep AC_INIT ../configure.ac | cut -d'[' -f3 | sed -r -e 's/(-DEV)?], //g') +_VERSION := $(shell grep AC_INIT ../configure.ac | cut -d'[' -f3 | sed -e 's/-DEV//g' -e 's/], //g') _VERSION := $(subst ., ,$(_VERSION)) VER_MAJOR := $(word 1,$(_VERSION)) VER_MINOR := $(word 2,$(_VERSION)) From 77852cf57258382956c812b5762d1a55d53183b6 Mon Sep 17 00:00:00 2001 From: Jan-E Date: Sun, 13 Mar 2016 18:24:32 +0100 Subject: [PATCH 4/8] Use string for NGHTTP2_VERSION_NUM, e.g 0x010800 --- lib/Makefile.msvc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Makefile.msvc b/lib/Makefile.msvc index 5ab6a697..411d3a47 100644 --- a/lib/Makefile.msvc +++ b/lib/Makefile.msvc @@ -21,7 +21,7 @@ VER_MAJOR := $(word 1,$(_VERSION)) VER_MINOR := $(word 2,$(_VERSION)) VER_MICRO := $(word 3,$(_VERSION)) VERSION := $(VER_MAJOR).$(VER_MINOR).$(VER_MICRO) -VERSION_NUM := ($(VER_MAJOR) << 16) + ($(VER_MINOR) << 8) + $(VER_MICRO) +VERSION_NUM := 0x$(shell if [ ${VER_MAJOR} -lt 10 ] ;then echo 0;fi)$(VER_MAJOR)$(shell if [ ${VER_MINOR} -lt 10 ] ;then echo 0;fi)$(VER_MINOR)$(shell if [ ${VER_MICRO} -lt 10 ] ; then echo 0;fi)$(VER_MICRO) GENERATED := 'Generated by $(realpath Makefile.MSVC)' From 78e5417ff2e630cc565873403cd8506f1af55473 Mon Sep 17 00:00:00 2001 From: Jan-E Date: Sun, 13 Mar 2016 18:31:14 +0100 Subject: [PATCH 5/8] Remove -nologo: not used in VC11/VC14, throws error in VC9 --- lib/Makefile.msvc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Makefile.msvc b/lib/Makefile.msvc index 411d3a47..3a867368 100644 --- a/lib/Makefile.msvc +++ b/lib/Makefile.msvc @@ -194,11 +194,11 @@ $(OBJ_DIR)/d_%.obj: %.c $(THIS_MAKEFILE) @echo $(OBJ_DIR)/r_nghttp2.res: $(OBJ_DIR)/nghttp2.rc $(THIS_MAKEFILE) - $(RC) -nologo -D_RELEASE -Fo $@ $< + $(RC) -D_RELEASE -Fo $@ $< @echo $(OBJ_DIR)/d_nghttp2.res: $(OBJ_DIR)/nghttp2.rc $(THIS_MAKEFILE) - $(RC) -nologo -D_DEBUG -Fo $@ $< + $(RC) -D_DEBUG -Fo $@ $< @echo includes/nghttp2/nghttp2ver.h: includes/nghttp2/nghttp2ver.h.in $(THIS_MAKEFILE) From 4e2972a5dc497cdf2e2e26c584021a16cb0b650c Mon Sep 17 00:00:00 2001 From: Jan-E Date: Sun, 13 Mar 2016 18:43:44 +0100 Subject: [PATCH 6/8] Use string for NGHTTP2_VERSION_NUM, e.g 0x010800: do not add parentheses --- lib/Makefile.msvc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Makefile.msvc b/lib/Makefile.msvc index 3a867368..21a93f9c 100644 --- a/lib/Makefile.msvc +++ b/lib/Makefile.msvc @@ -204,7 +204,7 @@ $(OBJ_DIR)/d_nghttp2.res: $(OBJ_DIR)/nghttp2.rc $(THIS_MAKEFILE) includes/nghttp2/nghttp2ver.h: includes/nghttp2/nghttp2ver.h.in $(THIS_MAKEFILE) sed < includes/nghttp2/nghttp2ver.h.in \ -e 's/@PACKAGE_VERSION@/$(VERSION)/g' \ - -e 's/@PACKAGE_VERSION_NUM@/($(VERSION_NUM))/g' > $@ + -e 's/@PACKAGE_VERSION_NUM@/$(VERSION_NUM)/g' > $@ touch --reference=includes/nghttp2/nghttp2ver.h.in $@ From 0f71fbce8dd711610e78b6b4658ea6f32cc8c4ca Mon Sep 17 00:00:00 2001 From: Jan-E Date: Sun, 13 Mar 2016 18:57:58 +0100 Subject: [PATCH 7/8] Generate nghttp2ver.h before compiling --- lib/Makefile.msvc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Makefile.msvc b/lib/Makefile.msvc index 21a93f9c..2a68b950 100644 --- a/lib/Makefile.msvc +++ b/lib/Makefile.msvc @@ -102,7 +102,7 @@ NGHTTP2_OBJ_D := $(addprefix $(OBJ_DIR)/d_, $(notdir $(NGHTTP2_SRC:.c=.obj))) clean_nghttp2_pyd_0 clean_nghttp2_pyd_1 -all: intro $(OBJ_DIR) $(TARGETS) build_nghttp2_pyd_$(USE_CYTHON) +all: intro includes/nghttp2/nghttp2ver.h $(OBJ_DIR) $(TARGETS) build_nghttp2_pyd_$(USE_CYTHON) @echo 'Welcome to NgHTTP2 (release + debug).' @echo 'Do a "make -f Makefile.MSVC install" at own risk!' From e8b62c620d62088fae8b0873feeb8ab335c47713 Mon Sep 17 00:00:00 2001 From: Jan-E Date: Mon, 14 Mar 2016 14:13:19 +0100 Subject: [PATCH 8/8] Revert change of NGHTTP2_VERSION_NUM, keep the parentheses around VERSION_NUM, not in the sed -e --- lib/Makefile.msvc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Makefile.msvc b/lib/Makefile.msvc index 2a68b950..2a930d11 100644 --- a/lib/Makefile.msvc +++ b/lib/Makefile.msvc @@ -21,7 +21,7 @@ VER_MAJOR := $(word 1,$(_VERSION)) VER_MINOR := $(word 2,$(_VERSION)) VER_MICRO := $(word 3,$(_VERSION)) VERSION := $(VER_MAJOR).$(VER_MINOR).$(VER_MICRO) -VERSION_NUM := 0x$(shell if [ ${VER_MAJOR} -lt 10 ] ;then echo 0;fi)$(VER_MAJOR)$(shell if [ ${VER_MINOR} -lt 10 ] ;then echo 0;fi)$(VER_MINOR)$(shell if [ ${VER_MICRO} -lt 10 ] ; then echo 0;fi)$(VER_MICRO) +VERSION_NUM := (($(VER_MAJOR) << 16) + ($(VER_MINOR) << 8) + $(VER_MICRO)) GENERATED := 'Generated by $(realpath Makefile.MSVC)'