3792
|
1 diff -ur ghostscript-9.15.orig/base/gp_unifs.c ghostscript-9.15/base/gp_unifs.c |
|
2 --- ghostscript-9.15.orig/base/gp_unifs.c 2015-02-15 10:31:35.198127593 -0500 |
|
3 +++ ghostscript-9.15/base/gp_unifs.c 2015-02-15 13:11:28.950483663 -0500 |
|
4 @@ -80,6 +80,14 @@ |
|
5 int prefix_length = strlen(prefix); |
|
6 int len = gp_file_name_sizeof - prefix_length - 8; |
|
7 FILE *fp; |
|
8 +#ifdef __MINGW32__ |
|
9 + // add 'b' to ensure in binary mode |
|
10 + char tmpmode[32]; |
|
11 + |
|
12 + strcpy(tmpmode, mode); |
|
13 + strcat(tmpmode,"b"); |
|
14 + mode = tmpmode; |
|
15 +#endif |
|
16 |
|
17 if (gp_file_name_is_absolute(prefix, prefix_length)) |
|
18 *fname = 0; |
|
19 @@ -148,6 +156,15 @@ |
|
20 FILE * |
|
21 gp_fopen(const char *fname, const char *mode) |
|
22 { |
|
23 +#ifdef __MINGW32__ |
|
24 + // add 'b' to ensure in binary mode |
|
25 + char tmpmode[32]; |
|
26 + |
|
27 + strcpy(tmpmode, mode); |
|
28 + strcat(tmpmode,"b"); |
|
29 + mode = tmpmode; |
|
30 +#endif |
|
31 + |
|
32 return fopen(fname, mode); |
|
33 } |
|
34 |