[cairo] tmpfile fails in cairo-ps-surface on win32 systems (proposed patch)

Adib Taraben taraben.a at st-innovation.com
Fri Dec 21 15:22:44 PST 2007


Hello Cairo team,

I found that when I use inkscape on my WinXP to create PS files via 
cairo that on accounts without administrative rights it results in 
0(zero)byte length PS-files.
The reason is the tmpfile() call in 
_cairo_ps_surface_create_for_stream_internal. tmpfile() on MinGW creates 
a temporary file on the root ("\\") which fails because of the missing 
rights.
There is also a discussion on the wine-list 
http://www.nabble.com/temporary-files-in-wine-to8919379.html

Cairo uses tmpfile only in the PS backend. so only one function is affected.
I present you a workaround using the native win32 calls. The calls are 
ANSI calls in order to allow fopen() to work correctly. The patch is 
against current snapshot 1.5.4.

Best regards,

Adib.
---
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: cairo-ps-surface.win32.patch
Url: http://lists.cairographics.org/archives/cairo/attachments/20071222/1391d9f8/attachment.ksh 


More information about the cairo mailing list