gfx/cairo/tmpfile_wince.patch
author Robert Sayre <sayrer@gmail.com>
Fri, 13 Feb 2009 15:34:39 -0500
changeset 25106 b4ececb1c146198c415f30331febf05e04d6c6da
parent 19791 be1ce0c38423c03a292801ac6c56bb652c1d004f
permissions -rw-r--r--
Bug 459161 - Process first argument to JSON stringify and parse methods as specified by ES3.1. r=shaver

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 */