зеркало из https://github.com/mozilla/pjs.git
37 строки
900 B
Diff
37 строки
900 B
Diff
|
diff --git a/gfx/cairo/cairo/src/cairo-misc.c b/gfx/cairo/cairo/src/cairo-misc.c
|
||
|
--- a/gfx/cairo/cairo/src/cairo-misc.c
|
||
|
+++ b/gfx/cairo/cairo/src/cairo-misc.c
|
||
|
@@ -620,16 +620,19 @@ _cairo_lround (double d)
|
||
|
/* tmpfile() replacment for Windows.
|
||
|
*
|
||
|
* On Windows tmpfile() creates the file in the root directory. This
|
||
|
* may fail due to unsufficient privileges.
|
||
|
*/
|
||
|
FILE *
|
||
|
_cairo_win32_tmpfile (void)
|
||
|
{
|
||
|
+#ifdef WINCE // we don't have to worry here about permissions
|
||
|
+ return tmpfile();
|
||
|
+#else
|
||
|
DWORD path_len;
|
||
|
WCHAR path_name[MAX_PATH + 1];
|
||
|
WCHAR file_name[MAX_PATH + 1];
|
||
|
HANDLE handle;
|
||
|
int fd;
|
||
|
FILE *fp;
|
||
|
|
||
|
path_len = GetTempPathW (MAX_PATH, path_name);
|
||
|
@@ -659,11 +662,12 @@ _cairo_win32_tmpfile (void)
|
||
|
|
||
|
fp = fdopen(fd, "w+b");
|
||
|
if (fp == NULL) {
|
||
|
_close(fd);
|
||
|
return NULL;
|
||
|
}
|
||
|
|
||
|
return fp;
|
||
|
+#endif /* WINCE */
|
||
|
}
|
||
|
|
||
|
#endif /* _WIN32 */
|