summaryrefslogtreecommitdiffstats
path: root/src/minidump-win32.cc
diff options
context:
space:
mode:
authorGergely Nagy <ngg@ngg.hu>2017-10-31 13:10:07 (GMT)
committerGergely Nagy <ngg@ngg.hu>2017-10-31 13:10:07 (GMT)
commit59849864592b421e0a8f993011e7e5c2ab27e77b (patch)
tree207b1887bb23b7052a4e6ca2f3e2df05040cb049 /src/minidump-win32.cc
parente234a7bdb6c42f4539c0ab09b624f191287c2c10 (diff)
downloadNinja-59849864592b421e0a8f993011e7e5c2ab27e77b.zip
Ninja-59849864592b421e0a8f993011e7e5c2ab27e77b.tar.gz
Ninja-59849864592b421e0a8f993011e7e5c2ab27e77b.tar.bz2
Fix building on Windows in UNICODE mode
Diffstat (limited to 'src/minidump-win32.cc')
-rw-r--r--src/minidump-win32.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/minidump-win32.cc b/src/minidump-win32.cc
index 1efb085..ca93638 100644
--- a/src/minidump-win32.cc
+++ b/src/minidump-win32.cc
@@ -32,17 +32,17 @@ typedef BOOL (WINAPI *MiniDumpWriteDumpFunc) (
/// Creates a windows minidump in temp folder.
void CreateWin32MiniDump(_EXCEPTION_POINTERS* pep) {
char temp_path[MAX_PATH];
- GetTempPath(sizeof(temp_path), temp_path);
+ GetTempPathA(sizeof(temp_path), temp_path);
char temp_file[MAX_PATH];
sprintf(temp_file, "%s\\ninja_crash_dump_%lu.dmp",
temp_path, GetCurrentProcessId());
// Delete any previous minidump of the same name.
- DeleteFile(temp_file);
+ DeleteFileA(temp_file);
// Load DbgHelp.dll dynamically, as library is not present on all
// Windows versions.
- HMODULE dbghelp = LoadLibrary("dbghelp.dll");
+ HMODULE dbghelp = LoadLibraryA("dbghelp.dll");
if (dbghelp == NULL) {
Error("failed to create minidump: LoadLibrary('dbghelp.dll'): %s",
GetLastErrorString().c_str());