authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2018-06-06 15:36:47-04:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2018-06-06 15:36:47-04:00
logb11c5d8f8256fc19e08eacfc50be209878f00e73
tree7392beabb8e04888ea9a0dfc106d34ff5f330da9
parent4fc601895b9f89bf0d3d3c1de1b0bbc959444298
signaturebadge-question-mark Signed by PGP key 4AEE18F83AFDEB23

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

closes #1054

2 files changed, 4 insertions(+), 3 deletions(-)

std/os/file.zig+2-1
......@@ -123,7 +123,8 @@ pub const File = struct {
123123 }
124124 return true;
125125 } else if (is_windows) {
126 if (os.windows.PathFileExists(path_with_null.ptr) == os.windows.TRUE) {
126 // TODO do not depend on shlwapi.dll
127 if (os.windows.PathFileExistsA(path_with_null.ptr) == os.windows.TRUE) {
127128 return true;
128129 }
129130
std/os/windows/index.zig+2-2
......@@ -123,8 +123,6 @@ pub extern "kernel32" stdcallcc fn QueryPerformanceCounter(lpPerformanceCount: *
123123
124124pub extern "kernel32" stdcallcc fn QueryPerformanceFrequency(lpFrequency: *LARGE_INTEGER) BOOL;
125125
126pub extern "kernel32" stdcallcc fn PathFileExists(pszPath: ?LPCTSTR) BOOL;
127
128126pub extern "kernel32" stdcallcc fn ReadFile(
129127 in_hFile: HANDLE,
130128 out_lpBuffer: *c_void,
......@@ -163,6 +161,8 @@ pub extern "kernel32" stdcallcc fn FreeLibrary(hModule: HMODULE) BOOL;
163161
164162pub extern "user32" stdcallcc fn MessageBoxA(hWnd: ?HANDLE, lpText: ?LPCTSTR, lpCaption: ?LPCTSTR, uType: UINT) c_int;
165163
164pub extern "shlwapi" stdcallcc fn PathFileExistsA(pszPath: ?LPCTSTR) BOOL;
165
166166pub const PROV_RSA_FULL = 1;
167167
168168pub const BOOL = c_int;