Skip to content

Commit

Permalink
Fix checking __MINGW64_VERSION_MAJOR for wxUSE_WEBREQUEST_WINHTTP
Browse files Browse the repository at this point in the history
It is not yet defined for setup.h, so check it in chkconf.h.
Fixes wxWidgets#19105
  • Loading branch information
MaartenBent committed Mar 22, 2021
1 parent 5bdd5e1 commit 3cc48e2
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 25 deletions.
6 changes: 1 addition & 5 deletions build/cmake/setup.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -691,11 +691,7 @@
#cmakedefine01 wxUSE_GRAPHICS_DIRECT2D
#endif

#if defined(_MSC_VER) || defined(__MINGW64_VERSION_MAJOR)
#cmakedefine01 wxUSE_WEBREQUEST_WINHTTP
#else
#cmakedefine01 wxUSE_WEBREQUEST_WINHTTP
#endif
#cmakedefine01 wxUSE_WEBREQUEST_WINHTTP


#cmakedefine01 wxUSE_OLE
Expand Down
6 changes: 1 addition & 5 deletions include/wx/gtk/setup.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions include/wx/msw/chkconf.h
Original file line number Diff line number Diff line change
Expand Up @@ -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))
#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
Expand Down
6 changes: 1 addition & 5 deletions include/wx/msw/setup.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 1 addition & 5 deletions include/wx/msw/setup_inc.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 1 addition & 5 deletions setup.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -691,11 +691,7 @@
#define wxUSE_GRAPHICS_DIRECT2D 0
#endif

#if defined(_MSC_VER) || defined(__MINGW64_VERSION_MAJOR)
#define wxUSE_WEBREQUEST_WINHTTP 0
#else
#define wxUSE_WEBREQUEST_WINHTTP 0
#endif
#define wxUSE_WEBREQUEST_WINHTTP 0


#define wxUSE_OLE 0
Expand Down

0 comments on commit 3cc48e2

Please sign in to comment.