mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-02-14 10:53:14 +01:00
2nd attempt to compile ldmd with MSVC.
This reverts the previous commits and reduces MSVC odditites to a single place.
This commit is contained in:
@@ -50,9 +50,6 @@
|
||||
#include <cstdlib>
|
||||
#include <numeric>
|
||||
#include <vector>
|
||||
#if defined(_MSC_VER)
|
||||
#include <stdarg.h>
|
||||
#endif
|
||||
#include "llvm/Support/FileSystem.h"
|
||||
#include "llvm/Support/Program.h"
|
||||
#include "llvm/Support/SystemUtils.h"
|
||||
@@ -62,10 +59,6 @@
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#define snprintf _snprintf
|
||||
#endif
|
||||
|
||||
namespace ls = llvm::sys;
|
||||
|
||||
// We reuse DMD's response file parsing routine for maximum compatibilty - it
|
||||
@@ -114,7 +107,11 @@ char* concat(const char* a, const char* b)
|
||||
char* concat(const char* a, int b)
|
||||
{
|
||||
char bStr[14];
|
||||
#if defined(_MSC_VER)
|
||||
_snprintf_s(bStr, _countof(bStr), sizeof(bStr), "%d", b);
|
||||
#else
|
||||
snprintf(bStr, sizeof(bStr), "%d", b);
|
||||
#endif
|
||||
return concat(a, bStr);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user