From 2b17c8605d5fadc1799fdfdd6507d797cc7cfa8f Mon Sep 17 00:00:00 2001 From: Peter Breitenlohner Date: Sat, 9 May 2015 13:34:05 +0000 Subject: libs/xpdf: On Windows use USERPROFILE instead of HOME git-svn-id: svn://tug.org/texlive/trunk@37292 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/libs/xpdf/xpdf-3.04-PATCHES/ChangeLog | 4 ++++ Build/source/libs/xpdf/xpdf-3.04-PATCHES/patch-41-W32TeX | 12 ++++++++---- Build/source/libs/xpdf/xpdf-3.04/goo/gfile.cc | 6 +++++- 3 files changed, 17 insertions(+), 5 deletions(-) (limited to 'Build') diff --git a/Build/source/libs/xpdf/xpdf-3.04-PATCHES/ChangeLog b/Build/source/libs/xpdf/xpdf-3.04-PATCHES/ChangeLog index 992d3aa0ea2..f00ad4df94c 100644 --- a/Build/source/libs/xpdf/xpdf-3.04-PATCHES/ChangeLog +++ b/Build/source/libs/xpdf/xpdf-3.04-PATCHES/ChangeLog @@ -1,3 +1,7 @@ +2015-05-09 Peter Breitenlohner + + * patch-41-W32TeX: On Windows use USERPROFILE instead of HOME. + 2015-05-07 Peter Breitenlohner * patch-41-W32TeX (new): More changes from Akira. diff --git a/Build/source/libs/xpdf/xpdf-3.04-PATCHES/patch-41-W32TeX b/Build/source/libs/xpdf/xpdf-3.04-PATCHES/patch-41-W32TeX index bfdd91cd4dd..215703697ff 100644 --- a/Build/source/libs/xpdf/xpdf-3.04-PATCHES/patch-41-W32TeX +++ b/Build/source/libs/xpdf/xpdf-3.04-PATCHES/patch-41-W32TeX @@ -1,6 +1,6 @@ diff -ur -N xpdf-3.04.orig/goo/gfile.cc xpdf-3.04/goo/gfile.cc --- xpdf-3.04.orig/goo/gfile.cc 2014-05-30 19:42:41.000000000 +0200 -+++ xpdf-3.04/goo/gfile.cc 2015-05-07 08:43:30.000000000 +0200 ++++ xpdf-3.04/goo/gfile.cc 2015-05-09 15:26:58.000000000 +0200 @@ -44,6 +44,11 @@ #endif @@ -13,19 +13,23 @@ diff -ur -N xpdf-3.04.orig/goo/gfile.cc xpdf-3.04/goo/gfile.cc GString *getHomeDir() { #ifdef VMS -@@ -55,7 +60,11 @@ +@@ -55,7 +60,15 @@ char *s; GString *ret; ++#ifdef_WIN32 +#ifdef _MSC_VER -+ if ((s = kpse_var_value("HOME"))) ++ if ((s = kpse_var_value("USERPROFILE"))) ++#else ++ if ((s = getenv("USERPROFILE"))) ++#endif +#else if ((s = getenv("HOME"))) +#endif ret = new GString(s); else ret = new GString("."); -@@ -559,7 +568,7 @@ +@@ -559,7 +572,7 @@ GBool createDir(char *path, int mode) { #ifdef _WIN32 diff --git a/Build/source/libs/xpdf/xpdf-3.04/goo/gfile.cc b/Build/source/libs/xpdf/xpdf-3.04/goo/gfile.cc index 13be012183b..763fa870884 100644 --- a/Build/source/libs/xpdf/xpdf-3.04/goo/gfile.cc +++ b/Build/source/libs/xpdf/xpdf-3.04/goo/gfile.cc @@ -60,8 +60,12 @@ GString *getHomeDir() { char *s; GString *ret; +#ifdef_WIN32 #ifdef _MSC_VER - if ((s = kpse_var_value("HOME"))) + if ((s = kpse_var_value("USERPROFILE"))) +#else + if ((s = getenv("USERPROFILE"))) +#endif #else if ((s = getenv("HOME"))) #endif -- cgit v1.2.3