summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkira Kakuto <kakuto@fuk.kindai.ac.jp>2012-07-23 12:54:22 +0000
committerAkira Kakuto <kakuto@fuk.kindai.ac.jp>2012-07-23 12:54:22 +0000
commit85374fe92189daeead769e66cac404573ae35352 (patch)
treeff64361424134c45654be7e2a585d070c883cf3b
parentba264e60778691cc6895f4cd1a5ecdc605c99fd3 (diff)
change kpathsea_win32_popen to use always binary mode
git-svn-id: svn://tug.org/texlive/trunk@27105 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Build/source/texk/kpathsea/win32lib.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/Build/source/texk/kpathsea/win32lib.c b/Build/source/texk/kpathsea/win32lib.c
index 4baa2e7ea6d..4722782cfd7 100644
--- a/Build/source/texk/kpathsea/win32lib.c
+++ b/Build/source/texk/kpathsea/win32lib.c
@@ -22,7 +22,7 @@
FILE * __cdecl kpathsea_win32_popen (kpathsea kpse, const char *cmd, const char *fmode)
{
- char *mode = "Xb";
+ char mode[3];
STARTUPINFO si;
PROCESS_INFORMATION pi;
SECURITY_ATTRIBUTES sa = { sizeof(SECURITY_ATTRIBUTES), NULL, TRUE };
@@ -45,7 +45,9 @@ FILE * __cdecl kpathsea_win32_popen (kpathsea kpse, const char *cmd, const char
/* We always use binary mode */
- *mode = *fmode;
+ mode[0] = fmode[0];
+ mode[1] = 'b';
+ mode[2] = '\0';
/* We should look for the application name along the PATH,
and decide to prepend "%COMSPEC% /c " or not to the command line.