mirror of
https://github.com/taglib/taglib.git
synced 2025-06-04 01:28:21 -04:00
Better define guards
This commit is contained in:
parent
1cc047c953
commit
606f6c0e74
@ -52,13 +52,13 @@ namespace
|
||||
const DWORD access = readOnly ? GENERIC_READ : (GENERIC_READ | GENERIC_WRITE);
|
||||
|
||||
if(!path.wstr().empty())
|
||||
#if (_WIN32_WINNT >= 0x0602)
|
||||
#if defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0602)
|
||||
return CreateFile2(path.wstr().c_str(), access, FILE_SHARE_READ, OPEN_EXISTING, NULL);
|
||||
#else
|
||||
return CreateFileW(path.wstr().c_str(), access, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL);
|
||||
#endif
|
||||
else if(!path.str().empty())
|
||||
#if (_WIN32_WINNT >= 0x0602)
|
||||
#if defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0602)
|
||||
return CreateFile2(path.toString().toCWString(), access, FILE_SHARE_READ, OPEN_EXISTING, NULL);
|
||||
#else
|
||||
return CreateFileA(path.str().c_str(), access, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL);
|
||||
@ -445,7 +445,7 @@ long FileStream::length()
|
||||
#ifdef _WIN32
|
||||
|
||||
SetLastError(NO_ERROR);
|
||||
#if (_WIN32_WINNT >= 0x0602)
|
||||
#if defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0602)
|
||||
LARGE_INTEGER fSize;
|
||||
GetFileSizeEx(d->file, &fSize);
|
||||
LONGLONG fileSize = fSize.QuadPart;
|
||||
|
Loading…
x
Reference in New Issue
Block a user