forked from HowardHinnant/date
fixed build in WinRT mode, where some API are not available
This commit is contained in:
committed by
Howard Hinnant
parent
1fdda81a30
commit
6c4d333026
10
src/tz.cpp
10
src/tz.cpp
@@ -117,6 +117,14 @@
|
|||||||
// gcc/mingw supports unistd.h on Win32 but MSVC does not.
|
// gcc/mingw supports unistd.h on Win32 but MSVC does not.
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
|
# ifdef WINAPI_FAMILY
|
||||||
|
# include <winapifamily.h>
|
||||||
|
# if WINAPI_FAMILY != WINAPI_FAMILY_DESKTOP_APP
|
||||||
|
# define WINRT
|
||||||
|
# define INSTALL .
|
||||||
|
# endif
|
||||||
|
# endif
|
||||||
|
|
||||||
# include <io.h> // _unlink etc.
|
# include <io.h> // _unlink etc.
|
||||||
|
|
||||||
# if defined(__clang__)
|
# if defined(__clang__)
|
||||||
@@ -173,6 +181,7 @@ static CONSTDATA char folder_delimiter = '/';
|
|||||||
#if !USE_OS_TZDB
|
#if !USE_OS_TZDB
|
||||||
|
|
||||||
# ifdef _WIN32
|
# ifdef _WIN32
|
||||||
|
# ifndef WINRT
|
||||||
|
|
||||||
namespace
|
namespace
|
||||||
{
|
{
|
||||||
@@ -212,6 +221,7 @@ get_download_folder()
|
|||||||
return get_known_folder(FOLDERID_Downloads);
|
return get_known_folder(FOLDERID_Downloads);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# endif // WINRT
|
||||||
# else // !_WIN32
|
# else // !_WIN32
|
||||||
|
|
||||||
# if !defined(INSTALL) || HAS_REMOTE_API
|
# if !defined(INSTALL) || HAS_REMOTE_API
|
||||||
|
Reference in New Issue
Block a user