From 3c29bba3b1087cea47fa30393f5ff6a4300b48a3 Mon Sep 17 00:00:00 2001 From: Peter Breitenlohner Date: Thu, 29 Mar 2012 15:26:57 +0000 Subject: pmx: Use binary mode for WIN32 Fix 64-bit bug (should be done in Fortran) git-svn-id: svn://tug.org/texlive/trunk@25776 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/utils/pmx/pmx-2.6.17-PATCHES/ChangeLog | 8 ++++++++ .../utils/pmx/pmx-2.6.17-PATCHES/patch-01-binary | 15 +++++++++++++++ .../utils/pmx/pmx-2.6.17-PATCHES/patch-02-bugfix | 19 +++++++++++++++++++ Build/source/utils/pmx/pmx-2.6.17/libf2c/open.c | 3 +++ Build/source/utils/pmx/pmx-2.6.17/scor2prt.c | 6 +++--- 5 files changed, 48 insertions(+), 3 deletions(-) create mode 100644 Build/source/utils/pmx/pmx-2.6.17-PATCHES/ChangeLog create mode 100644 Build/source/utils/pmx/pmx-2.6.17-PATCHES/patch-01-binary create mode 100644 Build/source/utils/pmx/pmx-2.6.17-PATCHES/patch-02-bugfix (limited to 'Build/source/utils/pmx') diff --git a/Build/source/utils/pmx/pmx-2.6.17-PATCHES/ChangeLog b/Build/source/utils/pmx/pmx-2.6.17-PATCHES/ChangeLog new file mode 100644 index 00000000000..fa7db92481b --- /dev/null +++ b/Build/source/utils/pmx/pmx-2.6.17-PATCHES/ChangeLog @@ -0,0 +1,8 @@ +2012-03-28 Peter Breitenlohner + + * patch-01-binary (new): Always use binary mode for WIN32. + + * patch-02-bugfix (new): Bug fix, should be fixed in Fortran. + +Copyright (C) 2012 Peter Breitenlohner +You may freely use, modify and/or distribute this file. diff --git a/Build/source/utils/pmx/pmx-2.6.17-PATCHES/patch-01-binary b/Build/source/utils/pmx/pmx-2.6.17-PATCHES/patch-01-binary new file mode 100644 index 00000000000..01947611c19 --- /dev/null +++ b/Build/source/utils/pmx/pmx-2.6.17-PATCHES/patch-01-binary @@ -0,0 +1,15 @@ + On Windows fseek() etc. are meaningful only for binary access. + +diff -ur pmx-2.6.17.orig/libf2c/open.c pmx-2.6.17/libf2c/open.c +--- pmx-2.6.17.orig/libf2c/open.c 2012-03-26 12:09:53.000000000 +0200 ++++ pmx-2.6.17/libf2c/open.c 2012-03-29 17:12:53.000000000 +0200 +@@ -30,6 +30,9 @@ + #ifdef NON_ANSI_RW_MODES + char *f__r_mode[2] = {"r", "r"}; + char *f__w_mode[4] = {"w", "w", "r+w", "r+w"}; ++#elif defined(WIN32) ++char *f__r_mode[2] = {"rb", "rb"}; ++char *f__w_mode[4] = {"wb", "wb", "rb+", "rb+"}; + #else + char *f__r_mode[2] = {"rb", "r"}; + char *f__w_mode[4] = {"wb", "w", "r+b", "r+"}; diff --git a/Build/source/utils/pmx/pmx-2.6.17-PATCHES/patch-02-bugfix b/Build/source/utils/pmx/pmx-2.6.17-PATCHES/patch-02-bugfix new file mode 100644 index 00000000000..58de7f58ef1 --- /dev/null +++ b/Build/source/utils/pmx/pmx-2.6.17-PATCHES/patch-02-bugfix @@ -0,0 +1,19 @@ + This should really be fixed in the Fortran source. + +diff -ur pmx-2.6.17.orig/scor2prt.c pmx-2.6.17/scor2prt.c +--- pmx-2.6.17.orig/scor2prt.c 2012-03-25 00:00:34.000000000 +0100 ++++ pmx-2.6.17/scor2prt.c 2012-03-29 16:59:56.000000000 +0200 +@@ -22,10 +22,10 @@ + integer nvi[24], nsyst, nvnow; + }; + struct all_2_ { +- integer noinow, iorig[24], noinst, insetup; +- real replacing; ++ integer noinow, iorig[24], noinst; ++ logical insetup, replacing; + integer instnum[24]; +- real botv[24]; ++ logical botv[24]; + integer nvi[24], nsyst, nvnow; + }; + diff --git a/Build/source/utils/pmx/pmx-2.6.17/libf2c/open.c b/Build/source/utils/pmx/pmx-2.6.17/libf2c/open.c index 6e3def121df..49f739a3d7d 100644 --- a/Build/source/utils/pmx/pmx-2.6.17/libf2c/open.c +++ b/Build/source/utils/pmx/pmx-2.6.17/libf2c/open.c @@ -30,6 +30,9 @@ extern integer f_clos(cllist*); #ifdef NON_ANSI_RW_MODES char *f__r_mode[2] = {"r", "r"}; char *f__w_mode[4] = {"w", "w", "r+w", "r+w"}; +#elif defined(WIN32) +char *f__r_mode[2] = {"rb", "rb"}; +char *f__w_mode[4] = {"wb", "wb", "rb+", "rb+"}; #else char *f__r_mode[2] = {"rb", "r"}; char *f__w_mode[4] = {"wb", "w", "r+b", "r+"}; diff --git a/Build/source/utils/pmx/pmx-2.6.17/scor2prt.c b/Build/source/utils/pmx/pmx-2.6.17/scor2prt.c index f07deb197a0..13d33fb27ab 100644 --- a/Build/source/utils/pmx/pmx-2.6.17/scor2prt.c +++ b/Build/source/utils/pmx/pmx-2.6.17/scor2prt.c @@ -22,10 +22,10 @@ struct all_1_ { integer nvi[24], nsyst, nvnow; }; struct all_2_ { - integer noinow, iorig[24], noinst, insetup; - real replacing; + integer noinow, iorig[24], noinst; + logical insetup, replacing; integer instnum[24]; - real botv[24]; + logical botv[24]; integer nvi[24], nsyst, nvnow; }; -- cgit v1.2.3