Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows: Remove MSVC define redundant with _MSC_VER #82304

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 0 additions & 17 deletions drivers/unix/file_access_unix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,18 +39,7 @@
#include <fcntl.h>
#include <sys/stat.h>
#include <sys/types.h>

#if defined(UNIX_ENABLED)
#include <unistd.h>
#endif

#ifdef MSVC
#define S_ISREG(m) ((m)&_S_IFREG)
#include <io.h>
#endif
#ifndef S_ISREG
#define S_ISREG(m) ((m)&S_IFREG)
#endif

void FileAccessUnix::check_errors() const {
ERR_FAIL_NULL_MSG(f, "File must be opened before use.");
Expand Down Expand Up @@ -279,16 +268,10 @@ bool FileAccessUnix::file_exists(const String &p_path) {
return false;
}

#ifdef UNIX_ENABLED
// See if we have access to the file
if (access(filename.utf8().get_data(), F_OK)) {
return false;
}
#else
if (_access(filename.utf8().get_data(), 4) == -1) {
return false;
}
#endif

// See if this is a regular file
switch (st.st_mode & S_IFMT) {
Expand Down
1 change: 1 addition & 0 deletions drivers/windows/file_access_windows.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@

#include "core/os/os.h"
#include "core/string/print_string.h"

#include <share.h> // _SH_DENYNO
#include <shlwapi.h>
#define WIN32_LEAN_AND_MEAN
Expand Down
2 changes: 1 addition & 1 deletion platform/windows/crash_handler_windows.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
#include <windows.h>

// Crash handler exception only enabled with MSVC
#if defined(DEBUG_ENABLED) && defined(MSVC)
#if defined(DEBUG_ENABLED) && defined(_MSC_VER)
#define CRASH_HANDLER_EXCEPTION 1

extern DWORD CrashHandlerException(EXCEPTION_POINTERS *ep);
Expand Down
1 change: 0 additions & 1 deletion platform/windows/detect.py
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,6 @@ def configure_msvc(env, vcvars_msvc_config):
"WINMIDI_ENABLED",
"TYPED_METHOD_BIND",
"WIN32",
"MSVC",
"WINVER=%s" % env["target_win_version"],
"_WIN32_WINNT=%s" % env["target_win_version"],
]
Expand Down
Loading