*: check defined(_WIN32) instead of defined(WIN32)
Only _WIN32 is defined by the compiler, and WIN32 is not standardized and may be missing. Closes #169
This commit is contained in:
@@ -91,7 +91,7 @@ bool
|
||||
directory_child_access(Storage &storage, const Directory &directory,
|
||||
const char *name, int mode) noexcept
|
||||
{
|
||||
#ifdef WIN32
|
||||
#ifdef _WIN32
|
||||
/* CheckAccess() is useless on WIN32 */
|
||||
(void)storage;
|
||||
(void)directory;
|
||||
|
||||
@@ -55,7 +55,7 @@ UpdateWalk::UpdateWalk(EventLoop &_loop, DatabaseListener &_listener,
|
||||
storage(_storage),
|
||||
editor(_loop, _listener)
|
||||
{
|
||||
#ifndef WIN32
|
||||
#ifndef _WIN32
|
||||
follow_inside_symlinks =
|
||||
config_get_bool(ConfigOption::FOLLOW_INSIDE_SYMLINKS,
|
||||
DEFAULT_FOLLOW_INSIDE_SYMLINKS);
|
||||
@@ -133,7 +133,7 @@ UpdateWalk::PurgeDeletedFromDirectory(Directory &directory)
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef WIN32
|
||||
#ifndef _WIN32
|
||||
static bool
|
||||
update_directory_stat(Storage &storage, Directory &directory)
|
||||
{
|
||||
@@ -156,7 +156,7 @@ static int
|
||||
FindAncestorLoop(Storage &storage, Directory *parent,
|
||||
unsigned inode, unsigned device)
|
||||
{
|
||||
#ifndef WIN32
|
||||
#ifndef _WIN32
|
||||
if (device == 0 && inode == 0)
|
||||
/* can't detect loops if the Storage does not support
|
||||
these numbers */
|
||||
@@ -258,7 +258,7 @@ bool
|
||||
UpdateWalk::SkipSymlink(const Directory *directory,
|
||||
const char *utf8_name) const noexcept
|
||||
{
|
||||
#ifndef WIN32
|
||||
#ifndef _WIN32
|
||||
const auto path_fs = storage.MapChildFS(directory->GetPath(),
|
||||
utf8_name);
|
||||
if (path_fs.IsNull())
|
||||
|
||||
@@ -36,7 +36,7 @@ class UpdateWalk final {
|
||||
friend class UpdateArchiveVisitor;
|
||||
#endif
|
||||
|
||||
#ifndef WIN32
|
||||
#ifndef _WIN32
|
||||
static constexpr bool DEFAULT_FOLLOW_INSIDE_SYMLINKS = true;
|
||||
static constexpr bool DEFAULT_FOLLOW_OUTSIDE_SYMLINKS = true;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user