Created
October 20, 2014 11:35
-
-
Save k-takata/a966bcb5a8f4371fac11 to your computer and use it in GitHub Desktop.
Vimproc issue #174
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- a/autoload/proc_w32.c | |
+++ b/autoload/proc_w32.c | |
@@ -43,6 +43,7 @@ | |
#include <windows.h> | |
#include <winbase.h> | |
#include <shellapi.h> | |
+#include <shlobj.h> | |
#include <shobjidl.h> | |
#if 0 | |
# include <winsock2.h> | |
@@ -225,6 +226,7 @@ static LPWSTR resolve_cmdline(LPWSTR cmdline) { | |
size_t len = 0; | |
size_t offset = 0; | |
BOOL err = TRUE; | |
+ int i; | |
argv = CommandLineToArgvW(cmdline, &argc); | |
if (argv == NULL) | |
@@ -245,7 +247,7 @@ static LPWSTR resolve_cmdline(LPWSTR cmdline) { | |
offset = wcslen(buf); | |
// Skip the original file name, but copy the args | |
- for (int i = 1; i < argc; ++i) { | |
+ for (i = 1; i < argc; ++i) { | |
size_t remaining = len - offset; | |
int iLen = _snwprintf(buf + offset, remaining, L" %s", argv[i]); | |
if (iLen > 0 && (size_t)iLen < remaining) { | |
diff --git a/make_mingw32.mak b/make_mingw32.mak | |
index abff905..5adbfdf 100644 | |
--- a/make_mingw32.mak | |
+++ b/make_mingw32.mak | |
@@ -4,7 +4,7 @@ TARGET=autoload/vimproc_win32.dll | |
SRC=autoload/proc_w32.c | |
CC=gcc | |
CFLAGS=-O2 -Wall -shared -m32 | |
-LDFLAGS+=-lwsock32 -luser32 -lole32 | |
+LDFLAGS+=-lwsock32 -luser32 -lole32 -luuid | |
all: $(TARGET) | |
diff --git a/make_mingw64.mak b/make_mingw64.mak | |
index 9fc1ffd..9f52a17 100644 | |
--- a/make_mingw64.mak | |
+++ b/make_mingw64.mak | |
@@ -4,7 +4,7 @@ TARGET=autoload/vimproc_win64.dll | |
SRC=autoload/proc_w32.c | |
CC=x86_64-w64-mingw32-gcc | |
CFLAGS=-O2 -Wall -shared -m64 | |
-LDFLAGS+=-lwsock32 -luser32 -lole32 | |
+LDFLAGS+=-lwsock32 -luser32 -lole32 -luuid | |
all: $(TARGET) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment