diff options
-rw-r--r-- | src/parse/tokentree.cpp | 6 | ||||
-rw-r--r-- | tools/minicargo/build.cpp | 3 | ||||
-rw-r--r-- | tools/minicargo/path.cpp | 3 |
3 files changed, 9 insertions, 3 deletions
diff --git a/src/parse/tokentree.cpp b/src/parse/tokentree.cpp index bb0ea9fc..2d807f7d 100644 --- a/src/parse/tokentree.cpp +++ b/src/parse/tokentree.cpp @@ -32,10 +32,10 @@ TokenTree TokenTree::clone() const case TOK_LIFETIME: os << "/*" << tt.m_hygiene << "*/"; break; - case TOK_INTERPOLATED_IDENT ... TOK_INTERPOLATED_ITEM: - os << "/*int*/"; - break; default: + if( TOK_INTERPOLATED_IDENT <= tt.m_tok.type() && tt.m_tok.type() <= TOK_INTERPOLATED_ITEM ) { + os << "/*int*/"; + } break; } return os << tt.m_tok.to_str(); diff --git a/tools/minicargo/build.cpp b/tools/minicargo/build.cpp index 56f9b076..b805ebb5 100644 --- a/tools/minicargo/build.cpp +++ b/tools/minicargo/build.cpp @@ -1,5 +1,8 @@ /* */ +#ifdef _WIN32 +# define _CRT_SECURE_NO_WARNINGS // Allows use of getenv (this program doesn't set env vars) +#endif #include "manifest.h" #include "build.h" #include "debug.h" diff --git a/tools/minicargo/path.cpp b/tools/minicargo/path.cpp index 93281e0f..12e505bb 100644 --- a/tools/minicargo/path.cpp +++ b/tools/minicargo/path.cpp @@ -2,6 +2,7 @@ */ #include "path.h" #if _WIN32 +# include <Windows.h> #else # include <unistd.h> // getcwd/chdir #endif @@ -41,6 +42,8 @@ helpers::path helpers::path::to_absolute() const return *this; #if _WIN32 + char cwd[1024]; + GetCurrentDirectoryA(sizeof(cwd), cwd); #else char cwd[1024]; if( !getcwd(cwd, sizeof(cwd)) ) |