summaryrefslogtreecommitdiff
path: root/Build/source/texk/lcdf-typetools/lcdf-typetools-2.94-PATCHES/patch-20-TL-binary
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2012-08-13 07:48:23 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2012-08-13 07:48:23 +0000
commitd2fbaf4a407cac794e13fdb9d5d032b0aa16b8e6 (patch)
tree78c4c2b5da2a15b611b1d5fb4fb5bbed1ef75e0f /Build/source/texk/lcdf-typetools/lcdf-typetools-2.94-PATCHES/patch-20-TL-binary
parent48f3c5e8221e66fda48a8b93457b71ce99356a25 (diff)
lcdf-typetools: Reduce TL vs W32TeX diffs (from Akira)
git-svn-id: svn://tug.org/texlive/trunk@27382 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/lcdf-typetools/lcdf-typetools-2.94-PATCHES/patch-20-TL-binary')
-rw-r--r--Build/source/texk/lcdf-typetools/lcdf-typetools-2.94-PATCHES/patch-20-TL-binary96
1 files changed, 96 insertions, 0 deletions
diff --git a/Build/source/texk/lcdf-typetools/lcdf-typetools-2.94-PATCHES/patch-20-TL-binary b/Build/source/texk/lcdf-typetools/lcdf-typetools-2.94-PATCHES/patch-20-TL-binary
new file mode 100644
index 00000000000..b921936e5d3
--- /dev/null
+++ b/Build/source/texk/lcdf-typetools/lcdf-typetools-2.94-PATCHES/patch-20-TL-binary
@@ -0,0 +1,96 @@
+ In TeX Live we treat all output files as binary.
+
+diff -ur -x Makefile.in -x aclocal.m4 -x autoconf.h.in -x configure lcdf-typetools-2.94.orig/liblcdf/filename.cc lcdf-typetools-2.94/liblcdf/filename.cc
+--- lcdf-typetools-2.94.orig/liblcdf/filename.cc 2011-11-03 17:51:58.000000000 +0100
++++ lcdf-typetools-2.94/liblcdf/filename.cc 2012-08-11 18:30:06.000000000 +0200
+@@ -126,5 +126,5 @@
+ if (_actual || !_path)
+ return _actual;
+ else
+- return fopen(_path.c_str(), binary ? "wb" : "w");
++ return fopen(_path.c_str(), "wb");
+ }
+diff -ur -x Makefile.in -x aclocal.m4 -x autoconf.h.in -x configure lcdf-typetools-2.94.orig/otftotfm/automatic.cc lcdf-typetools-2.94/otftotfm/automatic.cc
+--- lcdf-typetools-2.94.orig/otftotfm/automatic.cc 2012-08-11 17:49:05.000000000 +0200
++++ lcdf-typetools-2.94/otftotfm/automatic.cc 2012-08-11 17:57:54.000000000 +0200
+@@ -309,7 +309,7 @@
+ String ls_r = writable_texdir + "ls-R";
+ bool success = false;
+ if (access(ls_r.c_str(), R_OK) >= 0) // make sure it already exists
+- if (FILE *f = fopen(ls_r.c_str(), "a")) {
++ if (FILE *f = fopen(ls_r.c_str(), "ab")) {
+ fprintf(f, "./%s:\n%s\n", directory.c_str(), file.c_str());
+ success = true;
+ fclose(f);
+@@ -680,7 +680,7 @@
+ #endif
+ {
+ fclose(f);
+- f = fopen(map_file.c_str(), "w");
++ f = fopen(map_file.c_str(), "wb");
+ fd = fileno(f);
+ }
+
+diff -ur -x Makefile.in -x aclocal.m4 -x autoconf.h.in -x configure lcdf-typetools-2.94.orig/otftotfm/otftotfm.cc lcdf-typetools-2.94/otftotfm/otftotfm.cc
+--- lcdf-typetools-2.94.orig/otftotfm/otftotfm.cc 2012-08-11 17:14:49.000000000 +0200
++++ lcdf-typetools-2.94/otftotfm/otftotfm.cc 2012-08-11 18:07:57.000000000 +0200
+@@ -555,7 +555,7 @@
+
+ if (verbose)
+ errh->message("creating %s", filename.c_str());
+- FILE *f = fopen(filename.c_str(), "w");
++ FILE *f = fopen(filename.c_str(), "wb");
+ if (!f) {
+ errh->error("%s: %s", filename.c_str(), strerror(errno));
+ return;
+@@ -997,7 +997,7 @@
+ #endif
+ {
+ fclose(f);
+- f = fopen(filename.c_str(), "w");
++ f = fopen(filename.c_str(), "wb");
+ fd = fileno(f);
+ }
+
+diff -ur -x Makefile.in -x aclocal.m4 -x autoconf.h.in -x configure lcdf-typetools-2.94.orig/t1rawafm/t1rawafm.cc lcdf-typetools-2.94/t1rawafm/t1rawafm.cc
+--- lcdf-typetools-2.94.orig/t1rawafm/t1rawafm.cc 2011-11-03 17:51:58.000000000 +0100
++++ lcdf-typetools-2.94/t1rawafm/t1rawafm.cc 2012-08-11 16:01:57.000000000 +0200
+@@ -350,6 +350,9 @@
+ if (!outf)
+ errh->fatal("%s: %s", output_file, strerror(errno));
+ }
++#if defined(_MSDOS) || defined(_WIN32)
++ _setmode(_fileno(outf), _O_BINARY);
++#endif
+
+ write_afm(outf, font);
+
+diff -ur -x Makefile.in -x aclocal.m4 -x autoconf.h.in -x configure lcdf-typetools-2.94.orig/t1reencode/t1reencode.cc lcdf-typetools-2.94/t1reencode/t1reencode.cc
+--- lcdf-typetools-2.94.orig/t1reencode/t1reencode.cc 2011-11-03 17:51:58.000000000 +0100
++++ lcdf-typetools-2.94/t1reencode/t1reencode.cc 2012-08-11 15:58:50.000000000 +0200
+@@ -1094,10 +1094,10 @@
+ if (!outf)
+ errh->fatal("%s: %s", output_file, strerror(errno));
+ }
+- if (binary) {
+ #if defined(_MSDOS) || defined(_WIN32)
+- _setmode(_fileno(outf), _O_BINARY);
++ _setmode(_fileno(outf), _O_BINARY);
+ #endif
++ if (binary) {
+ Type1PFBWriter w(outf);
+ font->write(w);
+ } else {
+diff -ur -x Makefile.in -x aclocal.m4 -x autoconf.h.in -x configure lcdf-typetools-2.94.orig/t1testpage/t1testpage.cc lcdf-typetools-2.94/t1testpage/t1testpage.cc
+--- lcdf-typetools-2.94.orig/t1testpage/t1testpage.cc 2011-11-03 17:51:58.000000000 +0100
++++ lcdf-typetools-2.94/t1testpage/t1testpage.cc 2012-08-11 16:02:02.000000000 +0200
+@@ -665,6 +665,9 @@
+ if (!outf)
+ errh->fatal("%s: %s", output_file, strerror(errno));
+ }
++#if defined(_MSDOS) || defined(_WIN32)
++ _setmode(_fileno(outf), _O_BINARY);
++#endif
+
+ //font->undo_synthetic();
+