mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-01-06 15:30:18 +01:00
Boilerplate: Open pipe in binary mode on Windows
Avoids a translation from LF to CRLF, which messes up the expected byte counts. Note that popen() on GLibc does not support the 'b' mode, so this change is for Windows only. From the POSIX.2024 spec: > The behavior of popen() is specified for values of mode of "r", > "w", "re", and "we". Other modes such as "rb" and "wb" might be > supported by specific implementations, but these would not be > portable features.
This commit is contained in:
parent
0ca7d6e6a2
commit
1ee2d140b6
1 changed files with 4 additions and 0 deletions
|
|
@ -945,7 +945,11 @@ POPEN:
|
|||
|
||||
*close_cb = pclose;
|
||||
sprintf (command, "%s %s %d", any2ppm, filename, page);
|
||||
#ifndef _WIN32
|
||||
return popen (command, "r");
|
||||
#else
|
||||
return popen (command, "rb");
|
||||
#endif
|
||||
}
|
||||
|
||||
static cairo_bool_t
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue