diff options
Diffstat (limited to 'Build/source/texk/lcdf-typetools/lcdf-typetools-2.104-PATCHES/patch-20-TL-binary')
-rw-r--r-- | Build/source/texk/lcdf-typetools/lcdf-typetools-2.104-PATCHES/patch-20-TL-binary | 112 |
1 files changed, 112 insertions, 0 deletions
diff --git a/Build/source/texk/lcdf-typetools/lcdf-typetools-2.104-PATCHES/patch-20-TL-binary b/Build/source/texk/lcdf-typetools/lcdf-typetools-2.104-PATCHES/patch-20-TL-binary new file mode 100644 index 00000000000..ccc0e2637f1 --- /dev/null +++ b/Build/source/texk/lcdf-typetools/lcdf-typetools-2.104-PATCHES/patch-20-TL-binary @@ -0,0 +1,112 @@ + 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.104.orig/liblcdf/filename.cc lcdf-typetools-2.104/liblcdf/filename.cc +--- lcdf-typetools-2.104.orig/liblcdf/filename.cc 2013-09-17 15:40:15.000000000 +0200 ++++ lcdf-typetools-2.104/liblcdf/filename.cc 2014-07-05 11:50:21.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.104.orig/otftotfm/automatic.cc lcdf-typetools-2.104/otftotfm/automatic.cc +--- lcdf-typetools-2.104.orig/otftotfm/automatic.cc 2014-04-10 14:27:02.000000000 +0200 ++++ lcdf-typetools-2.104/otftotfm/automatic.cc 2014-07-05 11:50:21.000000000 +0200 +@@ -311,7 +311,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); +@@ -675,7 +675,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.104.orig/otftotfm/otftotfm.cc lcdf-typetools-2.104/otftotfm/otftotfm.cc +--- lcdf-typetools-2.104.orig/otftotfm/otftotfm.cc 2014-07-06 15:17:25.000000000 +0200 ++++ lcdf-typetools-2.104/otftotfm/otftotfm.cc 2014-07-07 08:32:34.000000000 +0200 +@@ -582,7 +582,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; +@@ -1024,7 +1024,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.104.orig/t1dotlessj/t1dotlessj.cc lcdf-typetools-2.104/t1dotlessj/t1dotlessj.cc +--- lcdf-typetools-2.104.orig/t1dotlessj/t1dotlessj.cc 2014-05-23 15:13:20.000000000 +0200 ++++ lcdf-typetools-2.104/t1dotlessj/t1dotlessj.cc 2014-07-05 11:50:21.000000000 +0200 +@@ -410,10 +410,10 @@ + // write it to output + if (!outputf) + outputf = stdout; +- if (binary) { + #if defined(_MSDOS) || defined(_WIN32) +- _setmode(_fileno(outputf), _O_BINARY); ++ _setmode(_fileno(outputf), _O_BINARY); + #endif ++ if (binary) { + Type1PFBWriter w(outputf); + dotless_font->write(w); + } else { +diff -ur -x Makefile.in -x aclocal.m4 -x autoconf.h.in -x configure lcdf-typetools-2.104.orig/t1rawafm/t1rawafm.cc lcdf-typetools-2.104/t1rawafm/t1rawafm.cc +--- lcdf-typetools-2.104.orig/t1rawafm/t1rawafm.cc 2014-05-23 15:13:20.000000000 +0200 ++++ lcdf-typetools-2.104/t1rawafm/t1rawafm.cc 2014-07-05 11:50:21.000000000 +0200 +@@ -356,6 +356,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.104.orig/t1reencode/t1reencode.cc lcdf-typetools-2.104/t1reencode/t1reencode.cc +--- lcdf-typetools-2.104.orig/t1reencode/t1reencode.cc 2013-09-17 15:27:20.000000000 +0200 ++++ lcdf-typetools-2.104/t1reencode/t1reencode.cc 2014-07-05 11:50:21.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.104.orig/t1testpage/t1testpage.cc lcdf-typetools-2.104/t1testpage/t1testpage.cc +--- lcdf-typetools-2.104.orig/t1testpage/t1testpage.cc 2013-09-17 15:27:20.000000000 +0200 ++++ lcdf-typetools-2.104/t1testpage/t1testpage.cc 2014-07-05 11:50:21.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(); + |