[cairo-commit] src/cairoint.h src/cairo-misc.c

Jeff Muizelaar jrmuizel at kemper.freedesktop.org
Fri Feb 13 09:31:45 PST 2009


 src/cairo-misc.c |    5 ++++-
 src/cairoint.h   |    2 +-
 2 files changed, 5 insertions(+), 2 deletions(-)

New commits:
commit b43e7aee98a8d69677f7e6d2584fe01f550f896b
Author: Jeff Muizelaar <jmuizelaar at mozilla.com>
Date:   Fri Feb 13 12:15:23 2009 -0500

    [wince] We don't need cairo_win32_tmpfile on Windows CE
    
    _cairo_win32_tmpfile() uses _open_osfhandle() which is not available
    on Windows CE. However, Windows CE doesn't have the permisions problems
    that necessitated _cairo_win32_tmpfile() in the first place so we can just
    use tmpfile() on Windows CE.

diff --git a/src/cairo-misc.c b/src/cairo-misc.c
index 0c9db90..ab30327 100644
--- a/src/cairo-misc.c
+++ b/src/cairo-misc.c
@@ -610,10 +610,12 @@ _cairo_lround (double d)
 #include <windows.h>
 #include <io.h>
 
+#if !WINCE
 /* tmpfile() replacement for Windows.
  *
  * On Windows tmpfile() creates the file in the root directory. This
- * may fail due to unsufficient privileges.
+ * may fail due to unsufficient privileges. However, this isn't a
+ * problem on Windows CE so we don't use it there.
  */
 FILE *
 _cairo_win32_tmpfile (void)
@@ -658,6 +660,7 @@ _cairo_win32_tmpfile (void)
 
     return fp;
 }
+#endif /* !WINCE */
 
 #endif /* _WIN32 */
 
diff --git a/src/cairoint.h b/src/cairoint.h
index 1d6939f..bfcaaa9 100644
--- a/src/cairoint.h
+++ b/src/cairoint.h
@@ -85,7 +85,7 @@
 
 CAIRO_BEGIN_DECLS
 
-#ifdef _WIN32
+#if _WIN32 && !WINCE // we don't have to worry about permissions on WINCE
 cairo_private FILE *
 _cairo_win32_tmpfile (void);
 #define tmpfile() _cairo_win32_tmpfile()


More information about the cairo-commit mailing list