Merge branch 'js/mingw-load-sys-dll'
authorJunio C Hamano <gitster@pobox.com>
Tue, 30 Oct 2018 06:43:48 +0000 (15:43 +0900)
committerJunio C Hamano <gitster@pobox.com>
Tue, 30 Oct 2018 06:43:48 +0000 (15:43 +0900)
The way DLLs are loaded on the Windows port has been improved.

* js/mingw-load-sys-dll:
mingw: load system libraries the recommended way

compat/mingw.c
contrib/credential/wincred/git-credential-wincred.c
index 6c3c4ca5a62d9a6498e4c8340983390987ae7680..81ef24286a2757920e411b3858bcbdfd51d69a3b 100644 (file)
@@ -1624,7 +1624,8 @@ static void ensure_socket_initialization(void)
                        WSAGetLastError());
 
        for (name = libraries; *name; name++) {
-               ipv6_dll = LoadLibrary(*name);
+               ipv6_dll = LoadLibraryExA(*name, NULL,
+                                         LOAD_LIBRARY_SEARCH_SYSTEM32);
                if (!ipv6_dll)
                        continue;
 
index 86518cd93d9c58d8b9f02d7cb8a67adf7b3fb3b6..5bdad41de1f834b0685390258161a9e749d0dca0 100644 (file)
@@ -75,7 +75,8 @@ static CredDeleteWT CredDeleteW;
 static void load_cred_funcs(void)
 {
        /* load DLLs */
-       advapi = LoadLibrary("advapi32.dll");
+       advapi = LoadLibraryExA("advapi32.dll", NULL,
+                               LOAD_LIBRARY_SEARCH_SYSTEM32);
        if (!advapi)
                die("failed to load advapi32.dll");