.
OBS-URL: https://build.opensuse.org/package/show/Publishing:TeXLive/texlive?expand=0&rev=107
This commit is contained in:
parent
2c8a8448c6
commit
5134cff562
58
source-binary-open.dif
Normal file
58
source-binary-open.dif
Normal file
@ -0,0 +1,58 @@
|
||||
Index: texk/web2c/lib/texmfmp.c
|
||||
===================================================================
|
||||
--- texk/web2c/lib/texmfmp.c (revision 26897)
|
||||
+++ texk/web2c/lib/texmfmp.c (working copy)
|
||||
@@ -533,7 +533,11 @@
|
||||
char *cmdname = NULL;
|
||||
int allow;
|
||||
|
||||
+ string realmode = xmalloc(strlen(mode)+2);
|
||||
+ strcpy(realmode, mode);
|
||||
#ifdef WIN32
|
||||
+ strcat(realmode, "b");
|
||||
+
|
||||
char *pp;
|
||||
|
||||
for (pp = cmd; *pp; pp++) {
|
||||
@@ -548,9 +552,9 @@
|
||||
allow = shell_cmd_is_allowed (cmd, &safecmd, &cmdname);
|
||||
|
||||
if (allow == 1)
|
||||
- f = popen (cmd, mode);
|
||||
+ f = popen (cmd, realmode);
|
||||
else if (allow == 2)
|
||||
- f = popen (safecmd, mode);
|
||||
+ f = popen (safecmd, realmode);
|
||||
else if (allow == -1)
|
||||
fprintf (stderr, "\nrunpopen quotation error in command line: %s\n",
|
||||
cmd);
|
||||
@@ -561,6 +565,7 @@
|
||||
free (safecmd);
|
||||
if (cmdname)
|
||||
free (cmdname);
|
||||
+ free (realmode);
|
||||
return f;
|
||||
}
|
||||
#endif /* ENABLE_PIPES */
|
||||
@@ -1853,7 +1858,7 @@
|
||||
fname = xmalloc(strlen((const_string)(nameoffile+1))+1);
|
||||
strcpy(fname,(const_string)(nameoffile+1));
|
||||
recorder_record_input (fname + 1);
|
||||
- *f_ptr = runpopen(fname+1,"rb");
|
||||
+ *f_ptr = runpopen(fname+1,"r");
|
||||
free(fname);
|
||||
for (i=0; i<NUM_PIPES; i++) {
|
||||
if (pipes[i]==NULL) {
|
||||
@@ -1895,10 +1900,10 @@
|
||||
is better to be prepared */
|
||||
if (STREQ((fname+strlen(fname)-4),".tex"))
|
||||
*(fname+strlen(fname)-4) = 0;
|
||||
- *f_ptr = runpopen(fname+1,"wb");
|
||||
+ *f_ptr = runpopen(fname+1,"w");
|
||||
*(fname+strlen(fname)) = '.';
|
||||
} else {
|
||||
- *f_ptr = runpopen(fname+1,"wb");
|
||||
+ *f_ptr = runpopen(fname+1,"w");
|
||||
}
|
||||
recorder_record_output (fname + 1);
|
||||
free(fname);
|
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Jun 26 11:25:50 UTC 2012 - werner@suse.de
|
||||
|
||||
- Do not open pipes in binary mode on POSIX systems
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jun 26 10:16:05 UTC 2012 - werner@suse.de
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user