Merge branch 'webrequest-build-fixes' of https://github.com/MaartenBent/wxWidgets
wxWebRequest-related build fixes for MinGW. See https://github.com/wxWidgets/wxWidgets/pull/2283
This commit is contained in:
@@ -1650,11 +1650,7 @@
|
||||
//
|
||||
// Recommended setting: 1, can be set to 0 if wxUSE_WEBREQUEST_CURL==1,
|
||||
// otherwise wxWebRequest won't be available at all.
|
||||
#if defined(_MSC_VER) || defined(__MINGW64_VERSION_MAJOR)
|
||||
#define wxUSE_WEBREQUEST_WINHTTP 1
|
||||
#else
|
||||
#define wxUSE_WEBREQUEST_WINHTTP 0
|
||||
#endif
|
||||
#define wxUSE_WEBREQUEST_WINHTTP 1
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Windows-only settings
|
||||
|
@@ -235,6 +235,11 @@
|
||||
# define wxUSE_ACTIVITYINDICATOR 0
|
||||
#endif /* !wxUSE_ACTIVITYINDICATOR && !_MSC_VER */
|
||||
|
||||
/* MinGW-w64 (32 and 64 bit) has winhttp.h available, legacy MinGW does not. */
|
||||
#if (!defined(_MSC_VER) && !defined(__MINGW64_VERSION_MAJOR)) || !wxUSE_DYNLIB_CLASS
|
||||
#undef wxUSE_WEBREQUEST_WINHTTP
|
||||
#define wxUSE_WEBREQUEST_WINHTTP 0
|
||||
#endif
|
||||
/*
|
||||
Similarly, turn off wxUSE_WEBREQUEST if we can't enable it because we don't
|
||||
have any of its backends to allow the library to compile with the default
|
||||
|
@@ -136,6 +136,8 @@ public:
|
||||
|
||||
~wxWebSessionWinHTTP();
|
||||
|
||||
static bool Initialize();
|
||||
|
||||
wxWebRequestImplPtr
|
||||
CreateRequest(wxWebSession& session,
|
||||
wxEvtHandler* handler,
|
||||
@@ -163,7 +165,14 @@ class wxWebSessionFactoryWinHTTP : public wxWebSessionFactory
|
||||
{
|
||||
public:
|
||||
wxWebSessionImpl* Create() wxOVERRIDE
|
||||
{ return new wxWebSessionWinHTTP(); }
|
||||
{
|
||||
return new wxWebSessionWinHTTP();
|
||||
}
|
||||
|
||||
bool Initialize() wxOVERRIDE
|
||||
{
|
||||
return wxWebSessionWinHTTP::Initialize();
|
||||
}
|
||||
};
|
||||
|
||||
#endif // _WX_MSW_WEBREQUEST_WINHTTP_H
|
||||
|
@@ -1650,11 +1650,7 @@
|
||||
//
|
||||
// Recommended setting: 1, can be set to 0 if wxUSE_WEBREQUEST_CURL==1,
|
||||
// otherwise wxWebRequest won't be available at all.
|
||||
#if defined(_MSC_VER) || defined(__MINGW64_VERSION_MAJOR)
|
||||
#define wxUSE_WEBREQUEST_WINHTTP 1
|
||||
#else
|
||||
#define wxUSE_WEBREQUEST_WINHTTP 0
|
||||
#endif
|
||||
#define wxUSE_WEBREQUEST_WINHTTP 1
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Windows-only settings
|
||||
|
@@ -44,11 +44,7 @@
|
||||
//
|
||||
// Recommended setting: 1, can be set to 0 if wxUSE_WEBREQUEST_CURL==1,
|
||||
// otherwise wxWebRequest won't be available at all.
|
||||
#if defined(_MSC_VER) || defined(__MINGW64_VERSION_MAJOR)
|
||||
#define wxUSE_WEBREQUEST_WINHTTP 1
|
||||
#else
|
||||
#define wxUSE_WEBREQUEST_WINHTTP 0
|
||||
#endif
|
||||
#define wxUSE_WEBREQUEST_WINHTTP 1
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Windows-only settings
|
||||
|
@@ -212,6 +212,8 @@ class wxWebSessionFactory
|
||||
public:
|
||||
virtual wxWebSessionImpl* Create() = 0;
|
||||
|
||||
virtual bool Initialize() { return true; }
|
||||
|
||||
virtual ~wxWebSessionFactory() { }
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user