From b43e7aee98a8d69677f7e6d2584fe01f550f896b Mon Sep 17 00:00:00 2001 From: Jeff Muizelaar Date: Fri, 13 Feb 2009 12:15:23 -0500 Subject: [PATCH] [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. --- src/cairo-misc.c | 5 ++++- src/cairoint.h | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/cairo-misc.c b/src/cairo-misc.c index 0c9db901a..ab30327b4 100644 --- a/src/cairo-misc.c +++ b/src/cairo-misc.c @@ -610,10 +610,12 @@ _cairo_lround (double d) #include #include +#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 1d6939f97..bfcaaa930 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()