diff options
author | Peter Breitenlohner <peb@mppmu.mpg.de> | 2012-07-24 08:39:33 +0000 |
---|---|---|
committer | Peter Breitenlohner <peb@mppmu.mpg.de> | 2012-07-24 08:39:33 +0000 |
commit | fb958e59a21aa2c05fbbedab0bc40c8ff163a8da (patch) | |
tree | 6537863f5dd0fad630293c339caf3537030a2540 | |
parent | 5877cb7870570d95e67c9c1462babc673cf61c8c (diff) |
pdfTeX: Binary mode for popen() on Windows now done in kpathsea
git-svn-id: svn://tug.org/texlive/trunk@27135 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r-- | Build/source/texk/web2c/lib/ChangeLog | 5 | ||||
-rw-r--r-- | Build/source/texk/web2c/lib/texmfmp.c | 16 |
2 files changed, 8 insertions, 13 deletions
diff --git a/Build/source/texk/web2c/lib/ChangeLog b/Build/source/texk/web2c/lib/ChangeLog index 4d31e76d2c6..7065998bf90 100644 --- a/Build/source/texk/web2c/lib/ChangeLog +++ b/Build/source/texk/web2c/lib/ChangeLog @@ -1,3 +1,8 @@ +2012-07-23 Peter Breitenlohner <peb@mppmu.mpg.de> + + * texmfmp.c (runpopen): Binary mode for popen() on Windows now + done in kpathsea. + 2012-06-30 Peter Breitenlohner <peb@mppmu.mpg.de> * texmfmp.c [WIN32]: Ignore DLLPROC for __MINGW32__. diff --git a/Build/source/texk/web2c/lib/texmfmp.c b/Build/source/texk/web2c/lib/texmfmp.c index b586444d4c0..8460479d292 100644 --- a/Build/source/texk/web2c/lib/texmfmp.c +++ b/Build/source/texk/web2c/lib/texmfmp.c @@ -527,24 +527,17 @@ runsystem (const char *cmd) /* Like runsystem(), the runpopen() function is called only when shellenabledp == 1. Unlike runsystem(), here we write errors to stderr, since we have nowhere better to use; and of course we return - a file handle (or NULL) instead of a status indicator. - - Also, we append "b" to IO_MODE on Windows. */ + a file handle (or NULL) instead of a status indicator. */ static FILE * -runpopen (char *cmd, const char *io_mode) +runpopen (char *cmd, const char *mode) { FILE *f = NULL; char *safecmd = NULL; char *cmdname = NULL; int allow; -#ifndef WIN32 - /* Use mode "r" or "w" for Posix. */ - char mode[] = "X"; -#else - /* Use mode "rb" or "wb" for Windows. */ - char mode[] = "Xb"; +#ifdef WIN32 char *pp; for (pp = cmd; *pp; pp++) { @@ -552,9 +545,6 @@ runpopen (char *cmd, const char *io_mode) } #endif - /* Replace 'X' by 'r' or 'w'. */ - mode[0] = *io_mode; - /* If restrictedshell == 0, any command is allowed. */ if (restrictedshell == 0) allow = 1; |