summaryrefslogtreecommitdiff
path: root/Build/source/texk/dvi2tty
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2012-04-26 09:15:12 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2012-04-26 09:15:12 +0000
commit6e134b72145b762e53274a0fa24c1031375f7f64 (patch)
tree5a4b3c6aae0e7c6786e9734e559246a8b4fd41fa /Build/source/texk/dvi2tty
parent95a7907ce592bb7ac0e4b829de095ba021a251a8 (diff)
dvi2tty: Work around a bug in LFS for 32-bit OpenSolaris/OpenIndiana
git-svn-id: svn://tug.org/texlive/trunk@26145 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/dvi2tty')
-rw-r--r--Build/source/texk/dvi2tty/dvi2tty-5.3.4-PATCHES/ChangeLog6
-rw-r--r--Build/source/texk/dvi2tty/dvi2tty-5.3.4-PATCHES/patch-04-OpenSolaris27
-rw-r--r--Build/source/texk/dvi2tty/dvi2tty-5.3.4/dvistuff.c7
3 files changed, 38 insertions, 2 deletions
diff --git a/Build/source/texk/dvi2tty/dvi2tty-5.3.4-PATCHES/ChangeLog b/Build/source/texk/dvi2tty/dvi2tty-5.3.4-PATCHES/ChangeLog
index 01f2e471a77..badddbbbef7 100644
--- a/Build/source/texk/dvi2tty/dvi2tty-5.3.4-PATCHES/ChangeLog
+++ b/Build/source/texk/dvi2tty/dvi2tty-5.3.4-PATCHES/ChangeLog
@@ -1,3 +1,9 @@
+2012-04-26 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * patch-04-OpenSolaris: New patch:
+ * dvistuff.c (postamble): Work around a bug in large file
+ support (LFS) for 32-bit OpenSolaris/OpenIndiana.
+
2011-11-21 Peter Breitenlohner <peb@mppmu.mpg.de>
* patch-03-uptex: New patch for upTeX support
diff --git a/Build/source/texk/dvi2tty/dvi2tty-5.3.4-PATCHES/patch-04-OpenSolaris b/Build/source/texk/dvi2tty/dvi2tty-5.3.4-PATCHES/patch-04-OpenSolaris
new file mode 100644
index 00000000000..5c0cd147ab2
--- /dev/null
+++ b/Build/source/texk/dvi2tty/dvi2tty-5.3.4-PATCHES/patch-04-OpenSolaris
@@ -0,0 +1,27 @@
+ It seems that st.st_size yields garbage on 32-bit
+ OpenSolaris/OpenIndiana with large file support.
+
+diff -ur dvi2tty-5.3.4.orig/dvistuff.c dvi2tty-5.3.4/dvistuff.c
+--- dvi2tty-5.3.4.orig/dvistuff.c 2011-11-21 22:41:54.000000000 +0100
++++ dvi2tty-5.3.4/dvistuff.c 2012-04-26 09:20:32.000000000 +0200
+@@ -276,15 +276,18 @@
+ {
+ register long size;
+ register int count;
+-#if !defined (THINK_C)
++#if !defined (THINK_C) && defined(VMS)
+ struct stat st;
+ #endif
+
+ #if defined (THINK_C)
+ size = DVIfile->len;
+-#else
++#elif defined(VMS)
+ fstat (fileno(DVIfile), &st);
+ size = (long) st.st_size; /* get size of file */
++#else
++ fseek (DVIfile, 0L, SEEK_END);
++ size = ftell (DVIfile); /* get size of file */
+ #endif
+
+ count = -1;
diff --git a/Build/source/texk/dvi2tty/dvi2tty-5.3.4/dvistuff.c b/Build/source/texk/dvi2tty/dvi2tty-5.3.4/dvistuff.c
index 697c8351444..3200fee17ce 100644
--- a/Build/source/texk/dvi2tty/dvi2tty-5.3.4/dvistuff.c
+++ b/Build/source/texk/dvi2tty/dvi2tty-5.3.4/dvistuff.c
@@ -276,15 +276,18 @@ void postamble(void)
{
register long size;
register int count;
-#if !defined (THINK_C)
+#if !defined (THINK_C) && defined(VMS)
struct stat st;
#endif
#if defined (THINK_C)
size = DVIfile->len;
-#else
+#elif defined(VMS)
fstat (fileno(DVIfile), &st);
size = (long) st.st_size; /* get size of file */
+#else
+ fseek (DVIfile, 0L, SEEK_END);
+ size = ftell (DVIfile); /* get size of file */
#endif
count = -1;