summaryrefslogtreecommitdiff
path: root/Build/source/utils/t1utils/TLpatches
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/utils/t1utils/TLpatches')
-rw-r--r--Build/source/utils/t1utils/TLpatches/ChangeLog56
-rw-r--r--Build/source/utils/t1utils/TLpatches/TL-Changes17
-rw-r--r--Build/source/utils/t1utils/TLpatches/patch-03-warnings83
-rw-r--r--Build/source/utils/t1utils/TLpatches/patch-04-TL-binary37
-rw-r--r--Build/source/utils/t1utils/TLpatches/patch-05-getopt11
-rw-r--r--Build/source/utils/t1utils/TLpatches/patch-07-warnings25
6 files changed, 229 insertions, 0 deletions
diff --git a/Build/source/utils/t1utils/TLpatches/ChangeLog b/Build/source/utils/t1utils/TLpatches/ChangeLog
new file mode 100644
index 00000000000..0aa285f538f
--- /dev/null
+++ b/Build/source/utils/t1utils/TLpatches/ChangeLog
@@ -0,0 +1,56 @@
+2015-03-01 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ Import t1utils-1.39.
+ * patch-03-warnings, patch-04-TL-binary, patch-05-getopt:
+ Adapted.
+ * patch-06-unsigned (removed): Now handled in original sources.
+ * patch-07-warnings (new): Avoid compiler warnings.
+
+2014-06-19 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * patch-06-unsigned (new): Avoid undefined behaviour.
+
+2013-11-22 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * patch-05-getopt (new): Drop '#include <getopt.h>'.
+
+2013-10-03 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ Import t1utils-1.38.
+ * patch-03-warnings, patch-04-TL-binary: Adapted.
+
+2012-08-12 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * patch-04-TL-binary (new): Use binary mode for output files.
+ From Akira Kakuto <kakuto@fuk.kindai.ac.jp> (W32TeX).
+
+2011-07-21 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ Adapt to t1utils-1.37.
+ * patch-03-warnings: Adapted.
+
+2010-06-07 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ Adapt to t1utils-1.36.
+ * patch-02-static (removed): Now handled in original sources.
+ * patch-03-warnings: Adapted, now mostly in original sources.
+
+2010-05-10 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ Adapt to t1utils-1.35.
+ * patch-01-getline (removed): Now handled in original sources.
+ * patch-02-static, patch-03-warnings: Adapted.
+
+2009-08-23 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * patch-03-warnings (new): Avoid more compiler warnings.
+
+2009-08-19 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * patch-02-static (new): Avoid warnings when compiling with
+ 'gcc --Wmissing-prototypes'.
+
+2009-06-12 Francois Charette <firmicus@ankabut.net>
+
+ * patch-01-getline (new): Avoid getline name conflict.
+
diff --git a/Build/source/utils/t1utils/TLpatches/TL-Changes b/Build/source/utils/t1utils/TLpatches/TL-Changes
new file mode 100644
index 00000000000..0ee328bb84f
--- /dev/null
+++ b/Build/source/utils/t1utils/TLpatches/TL-Changes
@@ -0,0 +1,17 @@
+Changes applied to the t1utils-1.39 tree as obtained from:
+ http://www.lcdf.org/type/
+
+Removed:
+ Makefile.in
+ aclocal.m4
+ compile
+ config.guess
+ config.sub
+ configure
+ depcomp
+ install-sh
+ missing
+
+Moved this file to ../:
+ strerror.c
+
diff --git a/Build/source/utils/t1utils/TLpatches/patch-03-warnings b/Build/source/utils/t1utils/TLpatches/patch-03-warnings
new file mode 100644
index 00000000000..f945094761a
--- /dev/null
+++ b/Build/source/utils/t1utils/TLpatches/patch-03-warnings
@@ -0,0 +1,83 @@
+ Avoid compiler warnings (gcc's -Wcast-qual).
+
+diff -ur t1utils-1.39.orig/clp.c t1utils-1.39/clp.c
+--- t1utils-1.39.orig/clp.c 2014-12-11 18:20:22.000000000 +0100
++++ t1utils-1.39/clp.c 2015-03-02 08:50:06.829885555 +0100
+@@ -1075,21 +1075,27 @@
+ parse_int(Clp_Parser *clp, const char *arg, int complain, void *user_data)
+ {
+ const char *val;
++ char *temp;
+ if (*arg == 0 || isspace((unsigned char) *arg)
+ || (user_data != 0 && *arg == '-'))
+ val = arg;
+ else if (user_data != 0) { /* unsigned */
+ #if HAVE_STRTOUL
+- clp->val.u = strtoul(arg, (char **) &val, 0);
++ clp->val.u = strtoul(arg, &temp, 0);
++ val = temp;
+ #else
+ /* don't bother really trying to do it right */
+ if (arg[0] == '-')
+ val = arg;
+- else
+- clp->val.u = strtol(arg, (char **) &val, 0);
++ else {
++ clp->val.u = strtol(arg, &temp, 0);
++ val = temp;
++ }
+ #endif
+- } else
+- clp->val.i = strtol(arg, (char **) &val, 0);
++ } else {
++ clp->val.i = strtol(arg, &temp, 0);
++ val = temp;
++ }
+ if (*arg != 0 && *val == 0)
+ return 1;
+ else if (complain) {
+@@ -1105,11 +1111,14 @@
+ parse_double(Clp_Parser *clp, const char *arg, int complain, void *user_data)
+ {
+ const char *val;
++ char *temp;
+ (void)user_data;
+ if (*arg == 0 || isspace((unsigned char) *arg))
+ val = arg;
+- else
+- clp->val.d = strtod(arg, (char **) &val);
++ else {
++ clp->val.d = strtod(arg, &temp);
++ val = temp;
++ }
+ if (*arg != 0 && *val == 0)
+ return 1;
+ else if (complain)
+diff -ur t1utils-1.39.orig/t1disasm.c t1utils-1.39/t1disasm.c
+--- t1utils-1.39.orig/t1disasm.c 2015-02-26 21:25:22.000000000 +0100
++++ t1utils-1.39/t1disasm.c 2015-03-02 08:50:06.000000000 +0100
+@@ -302,11 +302,11 @@
+ /* 23.Feb.2004 - use 'memstr', not strstr, because the strings input to
+ eexec_line aren't null terminated! Reported by Werner Lemberg. */
+
+-static const unsigned char *
+-oog_memstr(const unsigned char *line, int line_len, const char *pattern, int pattern_len)
++static unsigned char *
++oog_memstr(unsigned char *line, int line_len, const char *pattern, int pattern_len)
+ {
+- const unsigned char *try;
+- const unsigned char *last = line + line_len - pattern_len + 1;
++ unsigned char *try;
++ unsigned char *last = line + line_len - pattern_len + 1;
+ while (line < last
+ && (try = memchr(line, (unsigned char)*pattern, last - line))) {
+ if (memcmp(try, pattern, pattern_len) == 0)
+@@ -401,7 +401,7 @@
+ badly: a charstring definition follows "/Charstrings ... begin", ON THE
+ SAME LINE. */
+ {
+- const char *CharStrings = (const char *)
++ char *CharStrings = (char *)
+ oog_memstr(line, line_len, "/CharStrings ", 13);
+ int crap, n;
+ char should_be_slash = 0;
diff --git a/Build/source/utils/t1utils/TLpatches/patch-04-TL-binary b/Build/source/utils/t1utils/TLpatches/patch-04-TL-binary
new file mode 100644
index 00000000000..2f85b052be0
--- /dev/null
+++ b/Build/source/utils/t1utils/TLpatches/patch-04-TL-binary
@@ -0,0 +1,37 @@
+ In TeX Live we treat all output files as binary.
+
+diff -ur t1utils-1.39.orig/t1ascii.c t1utils-1.39/t1ascii.c
+--- t1utils-1.39.orig/t1ascii.c 2014-12-12 19:58:33.000000000 +0100
++++ t1utils-1.39/t1ascii.c 2015-03-02 08:52:29.000000000 +0100
+@@ -286,6 +286,7 @@
+ /* As we are processing a PFB (binary) input */
+ /* file, we must set its file mode to binary. */
+ _setmode(_fileno(ifp), _O_BINARY);
++ _setmode(_fileno(ofp), _O_BINARY);
+ #endif
+
+ /* prepare font reader */
+diff -ur t1utils-1.39.orig/t1disasm.c t1utils-1.39/t1disasm.c
+--- t1utils-1.39.orig/t1disasm.c 2015-03-02 08:50:06.000000000 +0100
++++ t1utils-1.39/t1disasm.c 2015-03-02 08:52:29.000000000 +0100
+@@ -717,6 +717,7 @@
+ /* As we might be processing a PFB (binary) input file, we must set its file
+ mode to binary. */
+ _setmode(_fileno(ifp), _O_BINARY);
++ _setmode(_fileno(ofp), _O_BINARY);
+ #endif
+
+ /* prepare font reader */
+diff -ur t1utils-1.39.orig/t1unmac.c t1utils-1.39/t1unmac.c
+--- t1utils-1.39.orig/t1unmac.c 2014-12-12 19:58:33.000000000 +0100
++++ t1utils-1.39/t1unmac.c 2015-03-02 08:52:29.000000000 +0100
+@@ -656,8 +656,7 @@
+ _setmode(_fileno(ifp), _O_BINARY);
+ /* If we are processing a PFB (binary) output */
+ /* file, we must set its file mode to binary. */
+- if (pfb)
+- _setmode(_fileno(ofp), _O_BINARY);
++ _setmode(_fileno(ofp), _O_BINARY);
+ #endif
+
+ if (pfb)
diff --git a/Build/source/utils/t1utils/TLpatches/patch-05-getopt b/Build/source/utils/t1utils/TLpatches/patch-05-getopt
new file mode 100644
index 00000000000..3a78ff17b1d
--- /dev/null
+++ b/Build/source/utils/t1utils/TLpatches/patch-05-getopt
@@ -0,0 +1,11 @@
+diff -ur t1utils-1.39.orig/t1unmac.c t1utils-1.39/t1unmac.c
+--- t1utils-1.39.orig/t1unmac.c 2015-03-02 08:52:29.000000000 +0100
++++ t1utils-1.39/t1unmac.c 2015-03-02 08:57:05.000000000 +0100
+@@ -41,7 +41,6 @@
+ #endif
+ #if defined(_MSDOS) || defined(_WIN32)
+ # include <fcntl.h>
+-# include <getopt.h>
+ # include <io.h>
+ #endif
+ #include <stdio.h>
diff --git a/Build/source/utils/t1utils/TLpatches/patch-07-warnings b/Build/source/utils/t1utils/TLpatches/patch-07-warnings
new file mode 100644
index 00000000000..26f81378cba
--- /dev/null
+++ b/Build/source/utils/t1utils/TLpatches/patch-07-warnings
@@ -0,0 +1,25 @@
+ Avoid compiler warnings (gcc's -Wcast-qual).
+
+diff -ur t1utils-1.39.orig/t1asmhelp.h t1utils-1.39/t1asmhelp.h
+--- t1utils-1.39.orig/t1asmhelp.h 2015-02-26 21:31:27.000000000 +0100
++++ t1utils-1.39/t1asmhelp.h 2015-03-02 11:09:49.000000000 +0100
+@@ -18,8 +18,8 @@
+ }
+ }
+
+-
+-static const char* cs_start = "";
++static char cs_start_init[] = "";
++static char *cs_start = cs_start_init;
+
+ static void
+ set_cs_start(const char* line)
+@@ -36,7 +36,7 @@
+ for (r = q; r != p && !isspace((unsigned char) *r) && *r != '{'; ++r)
+ /* nada */;
+ if (cs_start_set)
+- free((char*) cs_start);
++ free(cs_start);
+ cs_start = p = malloc(r - q + 1);
+ memcpy(p, q, r - q);
+ p[r - q] = 0;