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

Restrict the use of _s (Annex K) functions to MSVC #436

Merged
merged 1 commit into from
Jan 11, 2025
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
4 changes: 2 additions & 2 deletions lib/Interpreter/Compatibility.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@
#include "clang/Basic/Version.h"
#include "clang/Config/config.h"

#ifdef _WIN32
#ifdef _MSC_VER
#define dup _dup
#define dup2 _dup2
#define close _close
#define fileno _fileno
#endif

static inline char* GetEnv(const char* Var_Name) {
#ifdef _WIN32
#ifdef _MSC_VER
char* Env = nullptr;
size_t sz = 0;
getenv_s(&sz, Env, sz, Var_Name);
Expand Down
2 changes: 1 addition & 1 deletion lib/Interpreter/CppInterOp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3414,7 +3414,7 @@ namespace Cpp {
int m_DupFD = -1;

public:
#ifdef _WIN32
#ifdef _MSC_VER
StreamCaptureInfo(int FD)
: m_TempFile(
[]() {
Expand Down