Skip to content

Instantly share code, notes, and snippets.

@mattn
Created April 18, 2012 08:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mattn/2412113 to your computer and use it in GitHub Desktop.
Save mattn/2412113 to your computer and use it in GitHub Desktop.
diff -r 2cfb68fa26cd src/Make_ming.mak
--- a/src/Make_ming.mak Wed Mar 28 20:51:51 2012 +0200
+++ b/src/Make_ming.mak Wed Apr 18 17:44:32 2012 +0900
@@ -51,7 +51,9 @@
# set to yes to enable OLE support
OLE=no
# Set the default $(WINVER) to make it work with pre-Win2k
+ifndef WINVER
WINVER = 0x0400
+endif
# Set to yes to enable Cscope support
CSCOPE=yes
# Set to yes to enable Netbeans support
diff -r 2cfb68fa26cd src/misc1.c
--- a/src/misc1.c Wed Mar 28 20:51:51 2012 +0200
+++ b/src/misc1.c Wed Apr 18 17:44:32 2012 +0900
@@ -4314,6 +4314,13 @@
#else
homedir_env = mch_getenv((char_u *)"HOME");
#endif
+#if _WIN32_WINNT >= 0x0500
+ {
+ char_u pathbuf[MAXPATHL];
+ if (GetLongPathName(homedir_env, pathbuf, sizeof(pathbuf)) != 0)
+ homedir_env = pathbuf;
+ }
+#endif
if (homedir_env != NULL && *homedir_env == NUL)
homedir_env = NULL;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment