Moved nghttp2 to epan

Cleaned up nghttp2 build

Change-Id: I9f7adc12936155e0ffc01ec825b5aff95279f97d
Reviewed-on: https://code.wireshark.org/review/2937
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Evan Huus <eapache@gmail.com>
This commit is contained in:
Graham Bloice 2014-07-02 14:10:02 +01:00 committed by Alexis La Goutte
parent 5f0fd977d1
commit 4b5967f683
26 changed files with 93 additions and 190 deletions

View File

@ -2881,6 +2881,7 @@ AC_OUTPUT(
epan/dissectors/dcerpc/Makefile
epan/dissectors/pidl/Makefile
epan/ftypes/Makefile
epan/nghttp2/Makefile
epan/wmem/Makefile
epan/wslua/Makefile
filetap/Makefile
@ -2923,7 +2924,6 @@ AC_OUTPUT(
tools/lemon/Makefile
wiretap/Makefile
wsutil/Makefile
wsutil/nghttp2/Makefile
echld/Makefile
_CUSTOM_AC_OUTPUT_
,)

View File

@ -41,6 +41,7 @@ include_directories(
${CMAKE_CURRENT_SOURCE_DIR}/dissectors
${CMAKE_CURRENT_SOURCE_DIR}/ftypes
${CMAKE_CURRENT_SOURCE_DIR}/wslua
${CMAKE_CURRENT_SOURCE_DIR}/nghttp2
)
set(CRYPT_FILES
@ -1482,6 +1483,15 @@ set(WMEM_FILES
)
source_group(wmem FILES ${WMEM_FILES})
set(NGHTTP2_FILES
nghttp2/nghttp2_buf.c
nghttp2/nghttp2_hd.c
nghttp2/nghttp2_hd_huffman.c
nghttp2/nghttp2_hd_huffman_data.c
nghttp2/nghttp2_helper.c
)
source_group(nghttp2 FILES ${NGHTTP2_FILES})
ADD_CUSTOM_TARGET(
update-sminmpec
COMMAND ${PERL_EXECUTABLE}
@ -1638,6 +1648,7 @@ set(CLEAN_FILES
${DISSECTOR_SUPPORT_SRC}
${LIBWIRESHARK_ASM_FILES}
${WMEM_FILES}
${NGHTTP2_FILES}
${WSLUA_FILES}
)
@ -1658,6 +1669,7 @@ add_library(epan ${LINK_MODE_LIB}
${DFILTER_FILES}
${FTYPE_FILES}
${WMEM_FILES}
${NGHTTP2_FILES}
${WSLUA_FILES}
${DISSECTOR_FILES}
${DISSECTOR_SUPPORT_SRC}
@ -1679,13 +1691,15 @@ file(GLOB DFILTER_HEADERS dfilter/*.h ../tools/lemon/cppmagic.h)
file(GLOB D_HEADERS dissectors/*.h)
file(GLOB FTYPES_HEADERS ftypes/*.h)
file(GLOB WMEM_HEADERS wmem/*.h)
file(GLOB NGHTTP2_HEADERS nghttp2/*.h)
file(MAKE_DIRECTORY ${ABICHECK_TMPDIR}
${ABICHECK_TMPDIR}/epan
${ABICHECK_TMPDIR}/crypt
${ABICHECK_TMPDIR}/dfilter
${ABICHECK_TMPDIR}/dissectors
${ABICHECK_TMPDIR}/ftypes
${ABICHECK_TMPDIR}/wmem)
${ABICHECK_TMPDIR}/wmem
${ABICHECK_TMPDIR}/nghttp2)
file(COPY ../color.h ../register.h DESTINATION ${ABICHECK_TMPDIR})
file(COPY ${HEADERS} DESTINATION ${ABICHECK_TMPDIR}/epan)
@ -1694,6 +1708,7 @@ file(COPY ${DFILTER_HEADERS} DESTINATION ${ABICHECK_TMPDIR}/dfilter)
file(COPY ${D_HEADERS} DESTINATION ${ABICHECK_TMPDIR}/dissectors)
file(COPY ${FTYPES_HEADERS} DESTINATION ${ABICHECK_TMPDIR}/ftypes)
file(COPY ${WMEM_HEADERS} DESTINATION ${ABICHECK_TMPDIR}/wmem)
file(COPY ${NGHTTP2_HEADERS} DESTINATION ${ABICHECK_TMPDIR}/nghttp2)
add_custom_command(OUTPUT libwireshark.abi.tar.gz
COMMAND cp ../config.h ${ABICHECK_TMPDIR}
@ -1708,9 +1723,10 @@ add_custom_command(OUTPUT libwireshark.abi.tar.gz
${ABICHECK_TMPDIR}/epan/* ${ABICHECK_TMPDIR}/crypt/*
${ABICHECK_TMPDIR}/dfilter/* ${ABICHECK_TMPDIR}/dissectors/*
${ABICHECK_TMPDIR}/ftypes/* ${ABICHECK_TMPDIR}/wmem/*
${ABICHECK_TMPDIR}/nghttp2/*
DEPENDS ${HEADERS}
${CRYPT_HEADERS} ${DFILTER_HEADERS} ${D_HEADERS}
${FTYPES_HEADERS} ${WMEM_HEADERS} epan)
${FTYPES_HEADERS} ${WMEM_HEADERS} ${NGHTTP2_HEADERS} epan)
# By default the name for a library with target name epan will be libepan,
# but Ethereal is now named Wireshark

View File

@ -33,7 +33,7 @@ wslua_dir =
wslua_dist_dir = wslua
endif # HAVE_LIBLUA
SUBDIRS = crypt ftypes dfilter dissectors wmem $(wslua_dir)
SUBDIRS = crypt ftypes dfilter dissectors nghttp2 wmem $(wslua_dir)
DIST_SUBDIRS = $(SUBDIRS) $(wslua_dist_dir)
@ -126,7 +126,7 @@ libwireshark_la_LIBADD = \
libwireshark_asmopt.la crypt/libairpdcap.la \
ftypes/libftypes.la dfilter/libdfilter.la dissectors/libdissectors.la \
dissectors/libdirtydissectors.la dissectors/libfiledissectors.la \
wmem/libwmem.la $(wslua_lib) @SOCKET_LIBS@ @NSL_LIBS@ \
nghttp2/libnghttp2.la wmem/libwmem.la $(wslua_lib) @SOCKET_LIBS@ @NSL_LIBS@ \
@C_ARES_LIBS@ @ADNS_LIBS@ @LIBGCRYPT_LIBS@ @LIBGNUTLS_LIBS@ \
@KRB5_LIBS@ @SSL_LIBS@ @LIBSMI_LDFLAGS@ @GEOIP_LIBS@ \
${top_builddir}/wiretap/libwiretap.la @GLIB_LIBS@ \
@ -136,7 +136,7 @@ libwireshark_la_DEPENDENCIES = \
libwireshark_generated.la \
libwireshark_asmopt.la crypt/libairpdcap.la \
ftypes/libftypes.la dfilter/libdfilter.la dissectors/libdissectors.la \
dissectors/libdirtydissectors.la wmem/libwmem.la $(wslua_lib) \
dissectors/libdirtydissectors.la nghttp2/libnghttp2.la wmem/libwmem.la $(wslua_lib) \
${top_builddir}/wsutil/libwsutil.la \
${top_builddir}/wiretap/libwiretap.la

View File

@ -70,6 +70,7 @@ libwireshark_LIBS = \
dfilter\dfilter.lib \
wmem\wmem.lib \
$(WSLUA_LIB) \
nghttp2\nghttp2.lib \
dissectors\dissectors.lib
.c.obj::
@ -89,17 +90,17 @@ DOXYGEN_DEP=doxygen
!ENDIF
!IFDEF ENABLE_LIBWIRESHARK
all: crypt ftypes dfilter wmem $(WSLUA_DIR) dissectors libwireshark.dll
all: crypt ftypes dfilter wmem $(WSLUA_DIR) nghttp2 dissectors libwireshark.dll
!ELSE
all: crypt ftypes dfilter wmem $(WSLUA_DIR) dissectors libwireshark.lib
all: crypt ftypes dfilter wmem $(WSLUA_DIR) nghttp2 dissectors libwireshark.lib
!ENDIF
# For use when making libwireshark.dll
libwireshark.lib: libwireshark.dll
libwireshark.exp: libwireshark.dll
libwireshark.dll: ..\config.h $(LIBWIRESHARK_OBJECTS) crypt ftypes dfilter wmem $(WSLUA_DIR) dissectors $(DOXYGEN_DEP) $(EXTRA_OBJECTS) \
crypt\airpdcap.lib ftypes\ftypes.lib dfilter\dfilter.lib wmem\wmem.lib dissectors\dissectors.lib $(WSLUA_LIB) ..\image\libwireshark.res
libwireshark.dll: ..\config.h $(LIBWIRESHARK_OBJECTS) crypt ftypes dfilter wmem $(WSLUA_DIR) nghttp2 dissectors $(DOXYGEN_DEP) $(EXTRA_OBJECTS) \
crypt\airpdcap.lib ftypes\ftypes.lib dfilter\dfilter.lib wmem\wmem.lib dissectors\dissectors.lib $(WSLUA_LIB) nghttp2\nghttp2.lib ..\image\libwireshark.res
@echo Linking libwireshark.dll
$(link) $(dlllflags) $(conlibsdll) shell32.lib psapi.lib \
$(LOCAL_LDFLAGS) $(DLL_LDFLAGS) \
@ -109,8 +110,8 @@ libwireshark.dll: ..\config.h $(LIBWIRESHARK_OBJECTS) crypt ftypes dfilter wmem
dissectors\register.obj \
$(EXTRA_OBJECTS)
libwireshark.lib : ..\config.h $(LIBWIRESHARK_OBJECTS) crypt ftypes dfilter wmem $(WSLUA_DIR) dissectors $(DOXYGEN_DEP) $(EXTRA_OBJECTS) \
crypt\airpdcap.lib ftypes\ftypes.lib dfilter\dfilter.lib wmem\wmem.lib $(WSLUA_LIB) dissectors\dissectors.lib
libwireshark.lib : ..\config.h $(LIBWIRESHARK_OBJECTS) crypt ftypes dfilter wmem $(WSLUA_DIR) nghttp2 dissectors $(DOXYGEN_DEP) $(EXTRA_OBJECTS) \
crypt\airpdcap.lib ftypes\ftypes.lib dfilter\dfilter.lib wmem\wmem.lib $(WSLUA_LIB) nghttp2\nghttp2.lib dissectors\dissectors.lib
link /lib /out:libwireshark.lib $(LIBWIRESHARK_OBJECTS) \
$(EXTRA_OBJECTS)
@ -139,6 +140,8 @@ clean: clean-local
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
cd ../wslua
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
cd ../nghttp2
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
cd ..
#
@ -171,6 +174,8 @@ distclean: distclean-local
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
cd ../wslua
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
cd ../nghttp2
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
cd ..
maintainer-clean-local: distclean-local
@ -188,6 +193,8 @@ maintainer-clean: maintainer-clean-local
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
cd ../wslua
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
cd ../nghttp2
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
cd ..
crypt:: ..\config.h
@ -220,6 +227,11 @@ wslua:: ..\config.h
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
cd ..
nghttp2:: ..\config.h
cd nghttp2
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
cd ..
doxygen.cfg: ..\config.nmake doxygen.cfg.in
sed -e s/@VERSION@/$(VERSION)/ \
< doxygen.cfg.in > $@

View File

@ -47,7 +47,7 @@
#include <epan/conversation.h>
#include <epan/follow.h>
#include <wsutil/nghttp2/nghttp2/nghttp2.h>
#include <epan/nghttp2/nghttp2.h>
#include "packet-tcp.h"

View File

@ -35,8 +35,8 @@ LIBNGHTTP2_INCLUDES = \
nghttp2_helper.h \
nghttp2_int.h \
nghttp2_net.h \
nghttp2/nghttp2.h \
nghttp2/nghttp2ver.h
nghttp2.h \
nghttp2ver.h
#

View File

@ -3,23 +3,24 @@
#
include ..\..\config.nmake
include Makefile.common
############### no need to modify below this line #########
CFLAGS=$(WARNINGS_ARE_ERRORS) $(STANDARD_CFLAGS) \
/I../.. $(GLIB_CFLAGS) -DWS_BUILD_DLL
/I. /Inghttp2 /I../.. $(GLIB_CFLAGS) -DWS_BUILD_DLL
.c.obj::
$(CC) $(CFLAGS) -Fd.\ -c $<
NGHTTP2_OBJECTS = $(LIBNGHTTP2_SRC:.c=.obj)
OBJECTS = $(LIBNGHTTP2_SRC:.c=.obj)
nghttp2.lib: $(NGHTTP2_OBJECTS)
link /lib /out:nghttp2.lib $(NGHTTP2_OBJECTS)
nghttp2.lib: $(OBJECTS)
link /lib /out:nghttp2.lib $(OBJECTS)
clean:
rm -f $(NGHTTP2_OBJECTS) nghttp2.lib *.pdb *.sbr
rm -f $(OBJECTS) nghttp2.lib *.pdb *.sbr
distclean: clean

View File

@ -0,0 +1,30 @@
Code from nghttp2 library ( https://github.com/tatsuhiro-t/nghttp2)
Thanks for Tatsuhiro Tsujikawa for permission to use nghttp2 lib.
Update library from source
download (clone) last release of nghttp2
and in folder epan/nghttp2 copy following file
cp ../../../nghttp2/lib/nghttp2_buf.[ch] .
cp ../../../nghttp2/lib/nghttp2_hd*.[ch] .
cp ../../../nghttp2/lib/nghttp2_helper.[ch] .
cp ../../../nghttp2/lib/nghttp2_int.h .
cp ../../../nghttp2/lib/nghttp2_net.h .
cp ../../../nghttp2/lib/includes/nghttp2/nghttp2.h .
cp ../../../nghttp2/lib/includes/nghttp2/nghttp2ver.h .
Change path to nghttp2.h
find . -name "nghttp2*" -type f -exec sed -i 's/<nghttp2\/nghttp2.h>/<nghttp2.h>/g' {} \;
Change path to nghttp2ver.h
find . -name "nghttp2*" -type f -exec sed -i 's/<nghttp2\/nghttp2ver.h>/<nghttp2ver.h>/g' {} \;
Fix c++-compat error
in nghttp2/nghttp2_helper.h remove check for CONFIG.H
in nghttp2/nghttp2.h
Add on the top
#include "config.h"

View File

@ -25,7 +25,6 @@
#ifndef NGHTTP2_H
#define NGHTTP2_H
#include "ws_symbol_export.h"
#include "config.h"
#ifdef __cplusplus
@ -33,52 +32,10 @@ extern "C" {
#endif
#include <stdlib.h>
#ifdef __WIN32__
typedef __int8 int8_t;
typedef unsigned __int8 uint8_t;
typedef __int16 int16_t;
typedef unsigned __int16 uint16_t;
typedef __int32 int32_t;
typedef unsigned __int32 uint32_t;
typedef __int64 int64_t;
typedef unsigned __int64 uint64_t;
/* Limits of integral types. */
#ifndef INT8_MIN
#define INT8_MIN (-128)
#endif
#ifndef INT16_MIN
#define INT16_MIN (-32767-1)
#endif
#ifndef INT32_MIN
#define INT32_MIN (-2147483647-1)
#endif
#ifndef INT8_MAX
#define INT8_MAX (127)
#endif
#ifndef INT16_MAX
#define INT16_MAX (32767)
#endif
#ifndef INT32_MAX
#define INT32_MAX (2147483647)
#endif
#ifndef UINT8_MAX
#define UINT8_MAX (255U)
#endif
#ifndef UINT16_MAX
#define UINT16_MAX (65535U)
#endif
#ifndef UINT32_MAX
#define UINT32_MAX (4294967295U)
#endif
#else
#include <stdint.h>
#endif
#include <sys/types.h>
#include <wsutil/nghttp2/nghttp2/nghttp2ver.h>
#include "nghttp2ver.h"
/**
* @macro
@ -2966,14 +2923,14 @@ typedef struct nghttp2_hd_inflater nghttp2_hd_inflater;
* :enum:`NGHTTP2_ERR_NOMEM`
* Out of memory.
*/
WS_DLL_PUBLIC int nghttp2_hd_inflate_new(nghttp2_hd_inflater **inflater_ptr);
int nghttp2_hd_inflate_new(nghttp2_hd_inflater **inflater_ptr);
/**
* @function
*
* Deallocates any resources allocated for |inflater|.
*/
WS_DLL_PUBLIC void nghttp2_hd_inflate_del(nghttp2_hd_inflater *inflater);
void nghttp2_hd_inflate_del(nghttp2_hd_inflater *inflater);
/**
* @function
@ -2990,7 +2947,7 @@ WS_DLL_PUBLIC void nghttp2_hd_inflate_del(nghttp2_hd_inflater *inflater);
* :enum:`NGHTTP2_ERR_NOMEM`
* Out of memory.
*/
WS_DLL_PUBLIC int nghttp2_hd_inflate_change_table_size(nghttp2_hd_inflater *inflater,
int nghttp2_hd_inflate_change_table_size(nghttp2_hd_inflater *inflater,
size_t settings_hd_table_bufsize_max);
/**
@ -3090,7 +3047,7 @@ typedef enum {
* }
*
*/
WS_DLL_PUBLIC ssize_t nghttp2_hd_inflate_hd(nghttp2_hd_inflater *inflater,
ssize_t nghttp2_hd_inflate_hd(nghttp2_hd_inflater *inflater,
nghttp2_nv *nv_out, int *inflate_flags,
uint8_t *in, size_t inlen, int in_final);
@ -3102,7 +3059,7 @@ WS_DLL_PUBLIC ssize_t nghttp2_hd_inflate_hd(nghttp2_hd_inflater *inflater,
* This function returns 0 if it succeeds. Currently this function
* always succeeds.
*/
WS_DLL_PUBLIC int nghttp2_hd_inflate_end_headers(nghttp2_hd_inflater *inflater);
int nghttp2_hd_inflate_end_headers(nghttp2_hd_inflater *inflater);
#ifdef __cplusplus
}

View File

@ -474,4 +474,3 @@ int nghttp2_bufs_next_present(nghttp2_bufs *bufs)
return chain && nghttp2_buf_len(&chain->buf);
}

View File

@ -29,7 +29,7 @@
# include <config.h>
#endif /* HAVE_CONFIG_H */
#include <wsutil/nghttp2/nghttp2/nghttp2.h>
#include <nghttp2.h>
#include "nghttp2_int.h"
@ -368,4 +368,4 @@ int nghttp2_bufs_next_present(nghttp2_bufs *bufs);
*/
ssize_t nghttp2_bufs_len(nghttp2_bufs *bufs);
#endif /* NGHTTP2_BUF_H */
#endif /* NGHTTP2_BUF_H */

View File

@ -29,7 +29,7 @@
# include <config.h>
#endif /* HAVE_CONFIG_H */
#include <wsutil/nghttp2/nghttp2/nghttp2.h>
#include <nghttp2.h>
#include "nghttp2_hd_huffman.h"
#include "nghttp2_buf.h"

View File

@ -29,7 +29,7 @@
# include <config.h>
#endif /* HAVE_CONFIG_H */
#include <wsutil/nghttp2/nghttp2/nghttp2.h>
#include <nghttp2.h>
typedef enum {
/* FSA accepts this state as the end of huffman encoding

View File

@ -27,7 +27,7 @@
#include <config.h>
#include <wsutil/nghttp2/nghttp2/nghttp2.h>
#include <nghttp2.h>
#define nghttp2_min(A, B) ((A) < (B) ? (A) : (B))
#define nghttp2_max(A, B) ((A) > (B) ? (A) : (B))

View File

@ -87,11 +87,6 @@ set(WSUTIL_FILES
ws_mempbrk.c
ws_mempbrk_sse42.c
ws_version_info.c
nghttp2/nghttp2_buf.c
nghttp2/nghttp2_hd.c
nghttp2/nghttp2_hd_huffman.c
nghttp2/nghttp2_hd_huffman_data.c
nghttp2/nghttp2_helper.c
${WSUTIL_PLATFORM_FILES}
${WSUTIL_SSE42_FILES}
)

View File

@ -18,8 +18,6 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
SUBDIRS = nghttp2
DIST_SUBDIRS = $(SUBDIRS)
ACLOCAL_AMFLAGS = `../aclocal-flags`
@ -82,14 +80,12 @@ EXTRA_libwsutil_la_SOURCES= \
wsgetopt_int.h
libwsutil_la_DEPENDENCIES= \
nghttp2/libnghttp2.la \
$(wsutil_optional_objects)
libwsutil_la_LIBADD = \
@COREFOUNDATION_FRAMEWORKS@ \
@GLIB_LIBS@ \
@LIBGCRYPT_LIBS@ \
nghttp2/libnghttp2.la \
$(wsutil_optional_objects)
EXTRA_DIST = \

View File

@ -34,19 +34,14 @@ OBJECTS = file_util.obj \
libwsutil.lib: libwsutil.dll
libwsutil.exp: libwsutil.dll
libwsutil.dll : $(OBJECTS) nghttp ..\image\libwsutil.res
libwsutil.dll : $(OBJECTS) ..\image\libwsutil.res
@echo Linking libwsutil.dll
$(link) $(dlllflags) $(conlibsdll) shell32.lib \
$(LOCAL_LDFLAGS) $(DLL_LDFLAGS) \
/OUT:libwsutil.dll \
/IMPLIB:libwsutil.lib \
..\image\libwsutil.res \
$(OBJECTS) $(libwsutil_LIBS) \
nghttp2/nghttp2_buf.obj \
nghttp2/nghttp2_hd.obj \
nghttp2/nghttp2_hd_huffman.obj \
nghttp2/nghttp2_hd_huffman_data.obj \
nghttp2/nghttp2_helper.obj
$(OBJECTS) $(libwsutil_LIBS)
#
# The following target will rebuild its obj
@ -54,7 +49,7 @@ libwsutil.dll : $(OBJECTS) nghttp ..\image\libwsutil.res
#
ws_version_info.obj: ..\version.h
clean-local:
clean:
rm -f $(OBJECTS) \
libwsutil.lib \
libwsutil.exp \
@ -62,20 +57,10 @@ clean-local:
libwsutil.dll.manifest \
*.pdb *.sbr
clean: clean-local
cd nghttp2
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
cd ..
distclean: clean
maintainer-clean: distclean
nghttp: ..\config.h
cd nghttp2
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
cd ..
checkapi:
## $(PERL) ../tools/checkAPIs.pl -g abort -g termoutput \
$(PERL) ../tools/checkAPIs.pl -g termoutput -build \

View File

@ -1,88 +0,0 @@
Code from nghttp2 library ( https://github.com/tatsuhiro-t/nghttp2)
Thanks for Tatsuhiro Tsujikawa for permission to use nghttp2 lib.
Update library from source
download (clone) last release of nghttp2
and in folder wsutil/nghttp2 copy following file
cp ../../../nghttp2/lib/nghttp2_buf.[ch] .
cp ../../../nghttp2/lib/nghttp2_hd*.[ch] .
cp ../../../nghttp2/lib/nghttp2_helper.[ch] .
cp ../../../nghttp2/lib/nghttp2_int.h .
cp ../../../nghttp2/lib/nghttp2_net.h .
cp ../../../nghttp2/lib/includes/nghttp2/nghttp2.h nghttp2/
cp ../../../nghttp2/lib/includes/nghttp2/nghttp2ver.h nghttp2/
Change path to nghttp2.h
find . -name "nghttp2*" -type f -exec sed -i 's/<nghttp2\/nghttp2.h>/<wsutil\/nghttp2\/nghttp2\/nghttp2.h>/g' {} \;
Change path to nghttp2ver.h
find . -name "nghttp2*" -type f -exec sed -i 's/<nghttp2\/nghttp2ver.h>/<wsutil\/nghttp2\/nghttp2\/nghttp2ver.h>/g' {} \;
Fix c++-compat error
in nghttp2/nghttp2_helper.h remove check for CONFIG.H
in nghttp2/nghttp2/nghttp2.h
Add on the top
#include "ws_symbol_export.h"
#include "config.h"
Replace
#include <stdint.h>
By
#ifdef __WIN32__
typedef __int8 int8_t;
typedef unsigned __int8 uint8_t;
typedef __int16 int16_t;
typedef unsigned __int16 uint16_t;
typedef __int32 int32_t;
typedef unsigned __int32 uint32_t;
typedef __int64 int64_t;
typedef unsigned __int64 uint64_t;
/* Limits of integral types. */
#ifndef INT8_MIN
#define INT8_MIN (-128)
#endif
#ifndef INT16_MIN
#define INT16_MIN (-32767-1)
#endif
#ifndef INT32_MIN
#define INT32_MIN (-2147483647-1)
#endif
#ifndef INT8_MAX
#define INT8_MAX (127)
#endif
#ifndef INT16_MAX
#define INT16_MAX (32767)
#endif
#ifndef INT32_MAX
#define INT32_MAX (2147483647)
#endif
#ifndef UINT8_MAX
#define UINT8_MAX (255U)
#endif
#ifndef UINT16_MAX
#define UINT16_MAX (65535U)
#endif
#ifndef UINT32_MAX
#define UINT32_MAX (4294967295U)
#endif
#else
#include <stdint.h>
#endif
and export (WS_DLL_PUBLIC) following function :
nghttp2_hd_inflate_new
nghttp2_hd_inflate_del
nghttp2_hd_inflate_change_table_size
nghttp2_hd_inflate_hd
nghttp2_hd_inflate_end_headers