summarylogtreecommitdiffstats
path: root/0005-w32-home.all.patch
diff options
context:
space:
mode:
Diffstat (limited to '0005-w32-home.all.patch')
-rw-r--r--0005-w32-home.all.patch24
1 files changed, 24 insertions, 0 deletions
diff --git a/0005-w32-home.all.patch b/0005-w32-home.all.patch
new file mode 100644
index 000000000000..588997f63cb6
--- /dev/null
+++ b/0005-w32-home.all.patch
@@ -0,0 +1,24 @@
+--- aspell-0.60.7-20110707/common/config.cpp.orig 2014-03-20 19:51:08.756753700 +0000
++++ aspell-0.60.7-20110707/common/config.cpp 2014-03-20 20:15:54.984480600 +0000
+@@ -664,6 +664,21 @@
+ } else { // sep == '|'
+ assert(replace[0] == '$');
+ const char * env = getenv(replace.c_str()+1);
++ if (NULL == env && strcmp (replace.c_str() + 1, "HOME") == 0)
++ {
++ const char *hd, *hp;
++ hd = getenv("HOMEDRIVE");
++ hp = getenv("HOMEPATH");
++ if (hd && hp)
++ {
++ char tmpbuf[strlen ("HOME=") + strlen (hd) + strlen (hp) + 1];
++ strcpy (tmpbuf, "HOME=");
++ strcpy (&tmpbuf[strlen ("HOME=")], hd);
++ strcpy (&tmpbuf[strlen ("HOME=") + strlen (hd)], hp);
++ putenv (tmpbuf);
++ env = getenv(replace.c_str()+1);
++ }
++ }
+ final_str += env ? env : second;
+ }
+ replace = "";