diff --git a/include/wx/utils.h b/include/wx/utils.h index 239dc6f6f4..51479e48f4 100644 --- a/include/wx/utils.h +++ b/include/wx/utils.h @@ -18,7 +18,6 @@ #include "wx/object.h" #include "wx/list.h" #include "wx/filefn.h" -#include "wx/hashmap.h" #include "wx/versioninfo.h" #include "wx/meta/implicitconversion.h" @@ -38,6 +37,13 @@ class WXDLLIMPEXP_FWD_BASE wxArrayInt; // needed for wxOperatingSystemId, wxLinuxDistributionInfo #include "wx/platinfo.h" +// This is a hack, but this header used to include wx/hashmap.h which, in turn, +// included wx/wxcrt.h and it turns out quite some existing code relied on it +// by using the CRT wrapper functions declared there without explicitly +// including that header, so keep including it from here to let it continue to +// compile. +#include "wx/wxcrt.h" + #if defined(__X__) #include #include @@ -45,6 +51,8 @@ class WXDLLIMPEXP_FWD_BASE wxArrayInt; #include +#include + // ---------------------------------------------------------------------------- // Forward declaration // ---------------------------------------------------------------------------- @@ -366,7 +374,7 @@ enum }; // Map storing environment variables. -typedef wxStringToStringHashMap wxEnvVariableHashMap; +using wxEnvVariableHashMap = std::unordered_map; // Used to pass additional parameters for child process to wxExecute(). Could // be extended with other fields later. diff --git a/interface/wx/utils.h b/interface/wx/utils.h index debe854677..8eadeb5758 100644 --- a/interface/wx/utils.h +++ b/interface/wx/utils.h @@ -253,7 +253,7 @@ wxVersionInfo wxGetLibraryVersionInfo(); @header{wx/utils.h} */ -typedef wxStringToStringHashMap wxEnvVariableHashMap; +using wxEnvVariableHashMap = std::unordered_map; /** This is a macro defined as @c getenv() or its wide char version in Unicode