Index: boost/config/compiler/visualc.hpp =================================================================== --- boost/config/compiler/visualc.hpp (revision 85866) +++ boost/config/compiler/visualc.hpp (working copy) @@ -101,6 +101,12 @@ # define BOOST_HAS_GETSYSTEMTIMEASFILETIME #endif +// disable some API for WinRT applications +#ifdef BOOST_FOR_WINRT +//WinRT applications don't have a notion of environment variables and getenv implementation +#define BOOST_NO_GETENV +#endif + // // check for exception handling support: #if !defined(_CPPUNWIND) && !defined(BOOST_NO_EXCEPTIONS) Index: libs/locale/src/util/default_locale.cpp =================================================================== --- libs/locale/src/util/default_locale.cpp (revision 85866) +++ libs/locale/src/util/default_locale.cpp (working copy) @@ -29,6 +29,8 @@ std::string get_system_locale(bool use_utf8) { char const *lang = 0; + + #ifndef BOOST_NO_GETENV if(!lang || !*lang) lang = getenv("LC_CTYPE"); if(!lang || !*lang) @@ -35,6 +37,7 @@ lang = getenv("LC_ALL"); if(!lang || !*lang) lang = getenv("LANG"); + #endif #ifndef BOOST_LOCALE_USE_WIN32_API (void)use_utf8; // not relevant for non-windows if(!lang || !*lang)