[cairo] CAIRO_HAS_FILEIO_FUNCTIONS

Joe Hecht joechecht at gmail.com
Mon Jun 8 06:05:04 UTC 2020


Not all operating system platforms allow standard file IO functions and 
types.

To solve: Add the following define for cairo-features.h:

#define CAIRO_HAS_FILEIO_FUNCTIONS

Affecting the following public interfaces:

cairo_surface_write_to_png
cairo_image_surface_create_from_png
cairo_pdf_surface_create
cairo_ps_surface_create
cairo_script_create
cairo_svg_surface_create
cairo_xml_create

It would be very nice to place the appropriate #ifdefs in the Cairo 
code, allowing the code to compile under these [silly] platform API's.

I believe there is only one or two areas in Cairo's internal code that 
would require the #ifdef.

No functionality would be reduced by this addition, since equivalent 
stream functionally exists.

While the requirement disallowing standard File IO currently affects 
only a small number of operating system API's, it is expected to be a 
growing concern, so a little forethought in this area should pay off in 
the long run.

Thanking you in advance for your consideration.

Joe C. Hecht




More information about the cairo mailing list