Define NGHTTP2_EXTERN to __declspec(dllimport) when using nghttp2
The private global variable nghttp2_enable_strict_preface is also marked as NGHTTP2_EXTERN, but it is test purpose only (test with .dll), and not part of public API. It could be removed in the future release.
This commit is contained in:
parent
a0a5f4f93e
commit
1f7e6ea3fe
|
@ -25,7 +25,8 @@ SUBDIRS = includes
|
|||
EXTRA_DIST = Makefile.msvc
|
||||
|
||||
AM_CFLAGS = $(WARNCFLAGS)
|
||||
AM_CPPFLAGS = -I$(srcdir)/includes -I$(builddir)/includes @DEFS@
|
||||
AM_CPPFLAGS = -I$(srcdir)/includes -I$(builddir)/includes -DBUILDING_NGHTTP2 \
|
||||
@DEFS@
|
||||
|
||||
pkgconfigdir = $(libdir)/pkgconfig
|
||||
pkgconfig_DATA = libnghttp2.pc
|
||||
|
|
|
@ -51,7 +51,11 @@ extern "C" {
|
|||
#ifdef NGHTTP2_STATICLIB
|
||||
#define NGHTTP2_EXTERN
|
||||
#elif defined(WIN32)
|
||||
#ifdef BUILDING_NGHTTP2
|
||||
#define NGHTTP2_EXTERN __declspec(dllexport)
|
||||
#else /* !BUILDING_NGHTTP2 */
|
||||
#define NGHTTP2_EXTERN __declspec(dllimport)
|
||||
#endif /* !BUILDING_NGHTTP2 */
|
||||
#else /* !defined(WIN32) */
|
||||
#define NGHTTP2_EXTERN
|
||||
#endif /* !defined(WIN32) */
|
||||
|
|
|
@ -307,7 +307,8 @@ static void active_outbound_item_reset(nghttp2_active_outbound_item *aob,
|
|||
|
||||
/* The global variable for tests where we want to disable strict
|
||||
preface handling. */
|
||||
int nghttp2_enable_strict_preface = 1;
|
||||
/* Specify NGHTTP2_EXTERN, so that we can test using Win build dll. */
|
||||
NGHTTP2_EXTERN int nghttp2_enable_strict_preface = 1;
|
||||
|
||||
static int session_new(nghttp2_session **session_ptr,
|
||||
const nghttp2_session_callbacks *callbacks,
|
||||
|
|
Loading…
Reference in New Issue