summaryrefslogtreecommitdiff
path: root/Build/source/libs
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2015-05-07 07:48:02 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2015-05-07 07:48:02 +0000
commitced74c6001212e818f836439087780de31e21f0b (patch)
tree499182ccd772f996cfb7b0f546ff0b3862326387 /Build/source/libs
parent86938cb68888266629fa70603b0b2488d7ef97d2 (diff)
libs/xpdf: More W32TeX changes from Akira
git-svn-id: svn://tug.org/texlive/trunk@37254 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/libs')
-rw-r--r--Build/source/libs/xpdf/xpdf-3.04-PATCHES/ChangeLog4
-rw-r--r--Build/source/libs/xpdf/xpdf-3.04-PATCHES/patch-41-W32TeX189
-rw-r--r--Build/source/libs/xpdf/xpdf-3.04/goo/gfile.cc11
-rw-r--r--Build/source/libs/xpdf/xpdf-3.04/xpdf/GlobalParams.cc9
-rw-r--r--Build/source/libs/xpdf/xpdf-3.04/xpdf/pdfdetach.cc3
-rw-r--r--Build/source/libs/xpdf/xpdf-3.04/xpdf/pdffonts.cc3
-rw-r--r--Build/source/libs/xpdf/xpdf-3.04/xpdf/pdfimages.cc3
-rw-r--r--Build/source/libs/xpdf/xpdf-3.04/xpdf/pdfinfo.cc3
-rw-r--r--Build/source/libs/xpdf/xpdf-3.04/xpdf/pdftohtml.cc3
-rw-r--r--Build/source/libs/xpdf/xpdf-3.04/xpdf/pdftopng.cc3
-rw-r--r--Build/source/libs/xpdf/xpdf-3.04/xpdf/pdftoppm.cc3
-rw-r--r--Build/source/libs/xpdf/xpdf-3.04/xpdf/pdftops.cc3
-rw-r--r--Build/source/libs/xpdf/xpdf-3.04/xpdf/pdftotext.cc3
13 files changed, 237 insertions, 3 deletions
diff --git a/Build/source/libs/xpdf/xpdf-3.04-PATCHES/ChangeLog b/Build/source/libs/xpdf/xpdf-3.04-PATCHES/ChangeLog
index 409f65cad84..992d3aa0ea2 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-07 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * patch-41-W32TeX (new): More changes from Akira.
+
2014-05-30 Peter Breitenlohner <peb@mppmu.mpg.de>
Imported xpdf-3.04 source tree:
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
new file mode 100644
index 00000000000..bfdd91cd4dd
--- /dev/null
+++ b/Build/source/libs/xpdf/xpdf-3.04-PATCHES/patch-41-W32TeX
@@ -0,0 +1,189 @@
+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
+@@ -44,6 +44,11 @@
+ #endif
+
+ //------------------------------------------------------------------------
++#ifdef _MSC_VER
++extern "C" {
++char *kpse_var_value (char *);
++}
++#endif
+
+ GString *getHomeDir() {
+ #ifdef VMS
+@@ -55,7 +60,11 @@
+ char *s;
+ GString *ret;
+
++#ifdef _MSC_VER
++ if ((s = kpse_var_value("HOME")))
++#else
+ if ((s = getenv("HOME")))
++#endif
+ ret = new GString(s);
+ else
+ ret = new GString(".");
+@@ -559,7 +568,7 @@
+
+ GBool createDir(char *path, int mode) {
+ #ifdef _WIN32
+- return !mkdir(path);
++ return !_mkdir(path);
+ #else
+ return !mkdir(path, mode);
+ #endif
+diff -ur -N xpdf-3.04.orig/xpdf/GlobalParams.cc xpdf-3.04/xpdf/GlobalParams.cc
+--- xpdf-3.04.orig/xpdf/GlobalParams.cc 2014-05-30 19:52:04.000000000 +0200
++++ xpdf-3.04/xpdf/GlobalParams.cc 2015-05-07 08:43:30.000000000 +0200
+@@ -16,7 +16,9 @@
+ #endif
+
+ #ifdef _WIN32
++# ifndef _WIN32_WINNT
+ # define _WIN32_WINNT 0x0500 // for GetSystemWindowsDirectory
++# endif
+ # include <windows.h>
+ #endif
+ #include <string.h>
+@@ -54,8 +56,8 @@
+ #ifdef _WIN32
+ # undef strcasecmp
+ # undef strncasecmp
+-# define strcasecmp stricmp
+-# define strncasecmp strnicmp
++# define strcasecmp _stricmp
++# define strncasecmp _strnicmp
+ #else
+ # include <strings.h>
+ #endif
+@@ -2138,8 +2140,11 @@
+ base14->fontNum,
+ displayFontTab[i].obliqueFactor));
+ } else {
++// Do not display unnecessary looking message on W32
++#ifndef _WIN32
+ error(errConfig, -1, "No display font for '{0:s}'",
+ displayFontTab[i].name);
++#endif
+ }
+ }
+ }
+diff -ur -N xpdf-3.04.orig/xpdf/pdfdetach.cc xpdf-3.04/xpdf/pdfdetach.cc
+--- xpdf-3.04.orig/xpdf/pdfdetach.cc 2014-05-28 20:50:50.000000000 +0200
++++ xpdf-3.04/xpdf/pdfdetach.cc 2015-05-07 08:43:30.000000000 +0200
+@@ -74,6 +74,9 @@
+
+ exitCode = 99;
+
++#ifdef _MSC_VER
++ (void)kpse_set_program_name(argv[0], NULL);
++#endif
+ // parse args
+ ok = parseArgs(argDesc, &argc, argv);
+ if ((doList ? 1 : 0) +
+diff -ur -N xpdf-3.04.orig/xpdf/pdffonts.cc xpdf-3.04/xpdf/pdffonts.cc
+--- xpdf-3.04.orig/xpdf/pdffonts.cc 2014-05-28 20:50:50.000000000 +0200
++++ xpdf-3.04/xpdf/pdffonts.cc 2015-05-07 08:43:30.000000000 +0200
+@@ -107,6 +107,9 @@
+
+ exitCode = 99;
+
++#ifdef _MSC_VER
++ (void)kpse_set_program_name(argv[0], NULL);
++#endif
+ // parse args
+ ok = parseArgs(argDesc, &argc, argv);
+ if (!ok || argc != 2 || printVersion || printHelp) {
+diff -ur -N xpdf-3.04.orig/xpdf/pdfimages.cc xpdf-3.04/xpdf/pdfimages.cc
+--- xpdf-3.04.orig/xpdf/pdfimages.cc 2014-05-28 20:50:50.000000000 +0200
++++ xpdf-3.04/xpdf/pdfimages.cc 2015-05-07 08:43:30.000000000 +0200
+@@ -76,6 +76,9 @@
+
+ exitCode = 99;
+
++#ifdef _MSC_VER
++ (void)kpse_set_program_name(argv[0], NULL);
++#endif
+ // parse args
+ ok = parseArgs(argDesc, &argc, argv);
+ if (!ok || argc != 3 || printVersion || printHelp) {
+diff -ur -N xpdf-3.04.orig/xpdf/pdfinfo.cc xpdf-3.04/xpdf/pdfinfo.cc
+--- xpdf-3.04.orig/xpdf/pdfinfo.cc 2014-05-28 20:50:50.000000000 +0200
++++ xpdf-3.04/xpdf/pdfinfo.cc 2015-05-07 08:43:30.000000000 +0200
+@@ -100,6 +100,9 @@
+
+ exitCode = 99;
+
++#ifdef _MSC_VER
++ (void)kpse_set_program_name(argv[0], NULL);
++#endif
+ // parse args
+ ok = parseArgs(argDesc, &argc, argv);
+ if (!ok || argc != 2 || printVersion || printHelp) {
+diff -ur -N xpdf-3.04.orig/xpdf/pdftohtml.cc xpdf-3.04/xpdf/pdftohtml.cc
+--- xpdf-3.04.orig/xpdf/pdftohtml.cc 2014-05-28 20:50:50.000000000 +0200
++++ xpdf-3.04/xpdf/pdftohtml.cc 2015-05-07 08:43:30.000000000 +0200
+@@ -86,6 +86,9 @@
+
+ exitCode = 99;
+
++#ifdef _MSC_VER
++ (void)kpse_set_program_name(argv[0], NULL);
++#endif
+ // parse args
+ ok = parseArgs(argDesc, &argc, argv);
+ if (!ok || argc != 3 || printVersion || printHelp) {
+diff -ur -N xpdf-3.04.orig/xpdf/pdftopng.cc xpdf-3.04/xpdf/pdftopng.cc
+--- xpdf-3.04.orig/xpdf/pdftopng.cc 2014-05-28 20:50:50.000000000 +0200
++++ xpdf-3.04/xpdf/pdftopng.cc 2015-05-07 08:43:30.000000000 +0200
+@@ -99,6 +99,9 @@
+
+ exitCode = 99;
+
++#ifdef _MSC_VER
++ (void)kpse_set_program_name(argv[0], NULL);
++#endif
+ // parse args
+ ok = parseArgs(argDesc, &argc, argv);
+ if (mono && gray) {
+diff -ur -N xpdf-3.04.orig/xpdf/pdftoppm.cc xpdf-3.04/xpdf/pdftoppm.cc
+--- xpdf-3.04.orig/xpdf/pdftoppm.cc 2014-05-28 20:50:50.000000000 +0200
++++ xpdf-3.04/xpdf/pdftoppm.cc 2015-05-07 08:43:30.000000000 +0200
+@@ -111,6 +111,9 @@
+
+ exitCode = 99;
+
++#ifdef _MSC_VER
++ (void)kpse_set_program_name(argv[0], NULL);
++#endif
+ // parse args
+ ok = parseArgs(argDesc, &argc, argv);
+ if (mono && gray) {
+diff -ur -N xpdf-3.04.orig/xpdf/pdftops.cc xpdf-3.04/xpdf/pdftops.cc
+--- xpdf-3.04.orig/xpdf/pdftops.cc 2014-05-28 20:50:50.000000000 +0200
++++ xpdf-3.04/xpdf/pdftops.cc 2015-05-07 08:43:30.000000000 +0200
+@@ -168,6 +168,9 @@
+
+ exitCode = 99;
+
++#ifdef _MSC_VER
++ (void)kpse_set_program_name(argv[0], NULL);
++#endif
+ // parse args
+ ok = parseArgs(argDesc, &argc, argv);
+ if (!ok || argc < 2 || argc > 3 || printVersion || printHelp) {
+diff -ur -N xpdf-3.04.orig/xpdf/pdftotext.cc xpdf-3.04/xpdf/pdftotext.cc
+--- xpdf-3.04.orig/xpdf/pdftotext.cc 2014-05-28 20:50:50.000000000 +0200
++++ xpdf-3.04/xpdf/pdftotext.cc 2015-05-07 08:43:30.000000000 +0200
+@@ -129,6 +129,9 @@
+
+ exitCode = 99;
+
++#ifdef _MSC_VER
++ (void)kpse_set_program_name(argv[0], NULL);
++#endif
+ // parse args
+ ok = parseArgs(argDesc, &argc, argv);
+ if (!ok || argc < 2 || argc > 3 || printVersion || printHelp) {
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 c2ce80508de..13be012183b 100644
--- a/Build/source/libs/xpdf/xpdf-3.04/goo/gfile.cc
+++ b/Build/source/libs/xpdf/xpdf-3.04/goo/gfile.cc
@@ -44,6 +44,11 @@
#endif
//------------------------------------------------------------------------
+#ifdef _MSC_VER
+extern "C" {
+char *kpse_var_value (char *);
+}
+#endif
GString *getHomeDir() {
#ifdef VMS
@@ -55,7 +60,11 @@ GString *getHomeDir() {
char *s;
GString *ret;
+#ifdef _MSC_VER
+ if ((s = kpse_var_value("HOME")))
+#else
if ((s = getenv("HOME")))
+#endif
ret = new GString(s);
else
ret = new GString(".");
@@ -559,7 +568,7 @@ GBool openTempFile(GString **name, FILE **f,
GBool createDir(char *path, int mode) {
#ifdef _WIN32
- return !mkdir(path);
+ return !_mkdir(path);
#else
return !mkdir(path, mode);
#endif
diff --git a/Build/source/libs/xpdf/xpdf-3.04/xpdf/GlobalParams.cc b/Build/source/libs/xpdf/xpdf-3.04/xpdf/GlobalParams.cc
index 57caf162d47..8938b75e4af 100644
--- a/Build/source/libs/xpdf/xpdf-3.04/xpdf/GlobalParams.cc
+++ b/Build/source/libs/xpdf/xpdf-3.04/xpdf/GlobalParams.cc
@@ -16,7 +16,9 @@
#endif
#ifdef _WIN32
+# ifndef _WIN32_WINNT
# define _WIN32_WINNT 0x0500 // for GetSystemWindowsDirectory
+# endif
# include <windows.h>
#endif
#include <string.h>
@@ -54,8 +56,8 @@
#ifdef _WIN32
# undef strcasecmp
# undef strncasecmp
-# define strcasecmp stricmp
-# define strncasecmp strnicmp
+# define strcasecmp _stricmp
+# define strncasecmp _strnicmp
#else
# include <strings.h>
#endif
@@ -2138,8 +2140,11 @@ void GlobalParams::setupBaseFonts(char *dir) {
base14->fontNum,
displayFontTab[i].obliqueFactor));
} else {
+// Do not display unnecessary looking message on W32
+#ifndef _WIN32
error(errConfig, -1, "No display font for '{0:s}'",
displayFontTab[i].name);
+#endif
}
}
}
diff --git a/Build/source/libs/xpdf/xpdf-3.04/xpdf/pdfdetach.cc b/Build/source/libs/xpdf/xpdf-3.04/xpdf/pdfdetach.cc
index 6d29ff3f774..35339526cbb 100644
--- a/Build/source/libs/xpdf/xpdf-3.04/xpdf/pdfdetach.cc
+++ b/Build/source/libs/xpdf/xpdf-3.04/xpdf/pdfdetach.cc
@@ -74,6 +74,9 @@ int main(int argc, char *argv[]) {
exitCode = 99;
+#ifdef _MSC_VER
+ (void)kpse_set_program_name(argv[0], NULL);
+#endif
// parse args
ok = parseArgs(argDesc, &argc, argv);
if ((doList ? 1 : 0) +
diff --git a/Build/source/libs/xpdf/xpdf-3.04/xpdf/pdffonts.cc b/Build/source/libs/xpdf/xpdf-3.04/xpdf/pdffonts.cc
index e1a0b4303be..b97940546ca 100644
--- a/Build/source/libs/xpdf/xpdf-3.04/xpdf/pdffonts.cc
+++ b/Build/source/libs/xpdf/xpdf-3.04/xpdf/pdffonts.cc
@@ -107,6 +107,9 @@ int main(int argc, char *argv[]) {
exitCode = 99;
+#ifdef _MSC_VER
+ (void)kpse_set_program_name(argv[0], NULL);
+#endif
// parse args
ok = parseArgs(argDesc, &argc, argv);
if (!ok || argc != 2 || printVersion || printHelp) {
diff --git a/Build/source/libs/xpdf/xpdf-3.04/xpdf/pdfimages.cc b/Build/source/libs/xpdf/xpdf-3.04/xpdf/pdfimages.cc
index dc794433e69..65a68db0aa6 100644
--- a/Build/source/libs/xpdf/xpdf-3.04/xpdf/pdfimages.cc
+++ b/Build/source/libs/xpdf/xpdf-3.04/xpdf/pdfimages.cc
@@ -76,6 +76,9 @@ int main(int argc, char *argv[]) {
exitCode = 99;
+#ifdef _MSC_VER
+ (void)kpse_set_program_name(argv[0], NULL);
+#endif
// parse args
ok = parseArgs(argDesc, &argc, argv);
if (!ok || argc != 3 || printVersion || printHelp) {
diff --git a/Build/source/libs/xpdf/xpdf-3.04/xpdf/pdfinfo.cc b/Build/source/libs/xpdf/xpdf-3.04/xpdf/pdfinfo.cc
index 9c0493d7df6..933b00f2e43 100644
--- a/Build/source/libs/xpdf/xpdf-3.04/xpdf/pdfinfo.cc
+++ b/Build/source/libs/xpdf/xpdf-3.04/xpdf/pdfinfo.cc
@@ -100,6 +100,9 @@ int main(int argc, char *argv[]) {
exitCode = 99;
+#ifdef _MSC_VER
+ (void)kpse_set_program_name(argv[0], NULL);
+#endif
// parse args
ok = parseArgs(argDesc, &argc, argv);
if (!ok || argc != 2 || printVersion || printHelp) {
diff --git a/Build/source/libs/xpdf/xpdf-3.04/xpdf/pdftohtml.cc b/Build/source/libs/xpdf/xpdf-3.04/xpdf/pdftohtml.cc
index f1fe691eb37..ac5dbcff707 100644
--- a/Build/source/libs/xpdf/xpdf-3.04/xpdf/pdftohtml.cc
+++ b/Build/source/libs/xpdf/xpdf-3.04/xpdf/pdftohtml.cc
@@ -86,6 +86,9 @@ int main(int argc, char *argv[]) {
exitCode = 99;
+#ifdef _MSC_VER
+ (void)kpse_set_program_name(argv[0], NULL);
+#endif
// parse args
ok = parseArgs(argDesc, &argc, argv);
if (!ok || argc != 3 || printVersion || printHelp) {
diff --git a/Build/source/libs/xpdf/xpdf-3.04/xpdf/pdftopng.cc b/Build/source/libs/xpdf/xpdf-3.04/xpdf/pdftopng.cc
index bb91ebac8b0..9cc57cb40ff 100644
--- a/Build/source/libs/xpdf/xpdf-3.04/xpdf/pdftopng.cc
+++ b/Build/source/libs/xpdf/xpdf-3.04/xpdf/pdftopng.cc
@@ -99,6 +99,9 @@ int main(int argc, char *argv[]) {
exitCode = 99;
+#ifdef _MSC_VER
+ (void)kpse_set_program_name(argv[0], NULL);
+#endif
// parse args
ok = parseArgs(argDesc, &argc, argv);
if (mono && gray) {
diff --git a/Build/source/libs/xpdf/xpdf-3.04/xpdf/pdftoppm.cc b/Build/source/libs/xpdf/xpdf-3.04/xpdf/pdftoppm.cc
index 17c0bbf276e..d7b6a442324 100644
--- a/Build/source/libs/xpdf/xpdf-3.04/xpdf/pdftoppm.cc
+++ b/Build/source/libs/xpdf/xpdf-3.04/xpdf/pdftoppm.cc
@@ -111,6 +111,9 @@ int main(int argc, char *argv[]) {
exitCode = 99;
+#ifdef _MSC_VER
+ (void)kpse_set_program_name(argv[0], NULL);
+#endif
// parse args
ok = parseArgs(argDesc, &argc, argv);
if (mono && gray) {
diff --git a/Build/source/libs/xpdf/xpdf-3.04/xpdf/pdftops.cc b/Build/source/libs/xpdf/xpdf-3.04/xpdf/pdftops.cc
index a6f478da4ed..f6715058bc1 100644
--- a/Build/source/libs/xpdf/xpdf-3.04/xpdf/pdftops.cc
+++ b/Build/source/libs/xpdf/xpdf-3.04/xpdf/pdftops.cc
@@ -168,6 +168,9 @@ int main(int argc, char *argv[]) {
exitCode = 99;
+#ifdef _MSC_VER
+ (void)kpse_set_program_name(argv[0], NULL);
+#endif
// parse args
ok = parseArgs(argDesc, &argc, argv);
if (!ok || argc < 2 || argc > 3 || printVersion || printHelp) {
diff --git a/Build/source/libs/xpdf/xpdf-3.04/xpdf/pdftotext.cc b/Build/source/libs/xpdf/xpdf-3.04/xpdf/pdftotext.cc
index 758413edd3b..02b45f9c304 100644
--- a/Build/source/libs/xpdf/xpdf-3.04/xpdf/pdftotext.cc
+++ b/Build/source/libs/xpdf/xpdf-3.04/xpdf/pdftotext.cc
@@ -129,6 +129,9 @@ int main(int argc, char *argv[]) {
exitCode = 99;
+#ifdef _MSC_VER
+ (void)kpse_set_program_name(argv[0], NULL);
+#endif
// parse args
ok = parseArgs(argDesc, &argc, argv);
if (!ok || argc < 2 || argc > 3 || printVersion || printHelp) {