zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit b11c5d8f8256fc19e08eacfc50be209878f00e73 (tree)
parent 4fc601895b9f89bf0d3d3c1de1b0bbc959444298
Author: Andrew Kelley <superjoe30@gmail.com>
Date:   Wed,  6 Jun 2018 15:36:47 -0400

fix std.os.windows.PathFileExists specified in the wrong DLL (#1066)

closes #1054
Diffstat:
Mstd/os/file.zig | 3++-
Mstd/os/windows/index.zig | 4++--
2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/std/os/file.zig b/std/os/file.zig @@ -123,7 +123,8 @@ pub const File = struct { } return true; } else if (is_windows) { - if (os.windows.PathFileExists(path_with_null.ptr) == os.windows.TRUE) { + // TODO do not depend on shlwapi.dll + if (os.windows.PathFileExistsA(path_with_null.ptr) == os.windows.TRUE) { return true; } diff --git a/std/os/windows/index.zig b/std/os/windows/index.zig @@ -123,8 +123,6 @@ pub extern "kernel32" stdcallcc fn QueryPerformanceCounter(lpPerformanceCount: * pub extern "kernel32" stdcallcc fn QueryPerformanceFrequency(lpFrequency: *LARGE_INTEGER) BOOL; -pub extern "kernel32" stdcallcc fn PathFileExists(pszPath: ?LPCTSTR) BOOL; - pub extern "kernel32" stdcallcc fn ReadFile( in_hFile: HANDLE, out_lpBuffer: *c_void, @@ -163,6 +161,8 @@ pub extern "kernel32" stdcallcc fn FreeLibrary(hModule: HMODULE) BOOL; pub extern "user32" stdcallcc fn MessageBoxA(hWnd: ?HANDLE, lpText: ?LPCTSTR, lpCaption: ?LPCTSTR, uType: UINT) c_int; +pub extern "shlwapi" stdcallcc fn PathFileExistsA(pszPath: ?LPCTSTR) BOOL; + pub const PROV_RSA_FULL = 1; pub const BOOL = c_int;