Bug 448909 - Need more controls WHATWG Video tag (followup patch). r=mconnor
[wine-gecko.git] / gfx / cairo / tmpfile_wince.patch
blob12d1dfadc84e7d8ade16b5a0d079fe86f0796113
1 diff --git a/gfx/cairo/cairo/src/cairo-misc.c b/gfx/cairo/cairo/src/cairo-misc.c
2 --- a/gfx/cairo/cairo/src/cairo-misc.c
3 +++ b/gfx/cairo/cairo/src/cairo-misc.c
4 @@ -620,16 +620,19 @@ _cairo_lround (double d)
5 /* tmpfile() replacment for Windows.
7 * On Windows tmpfile() creates the file in the root directory. This
8 * may fail due to unsufficient privileges.
9 */
10 FILE *
11 _cairo_win32_tmpfile (void)
13 +#ifdef WINCE // we don't have to worry here about permissions
14 + return tmpfile();
15 +#else
16 DWORD path_len;
17 WCHAR path_name[MAX_PATH + 1];
18 WCHAR file_name[MAX_PATH + 1];
19 HANDLE handle;
20 int fd;
21 FILE *fp;
23 path_len = GetTempPathW (MAX_PATH, path_name);
24 @@ -659,11 +662,12 @@ _cairo_win32_tmpfile (void)
26 fp = fdopen(fd, "w+b");
27 if (fp == NULL) {
28 _close(fd);
29 return NULL;
32 return fp;
33 +#endif /* WINCE */
36 #endif /* _WIN32 */