[cairo] Troublesome C99 ?

John Emmas john at creativepost.co.uk
Fri Dec 8 06:52:29 UTC 2017


Hi guys,

Just bumping this in case anyone's got any ideas (or do I need to post 
it somewhere else?)  Thanks,

John

On 05/12/2017 10:51, John Emmas wrote:
> Hi there,
>
> This morning I noticed this change in git master (which produces a 
> syntax error now when compiling with MSVC):-
>
> // In 'scr/cairo-svg.h' :-
>     typedef enum _cairo_svg_unit {
>         CAIRO_SVG_UNIT_USER = 0,
>         CAIRO_SVG_UNIT_EM,
>         CAIRO_SVG_UNIT_EX,
>         CAIRO_SVG_UNIT_PX,
>         CAIRO_SVG_UNIT_IN,
>         CAIRO_SVG_UNIT_CM,
>         CAIRO_SVG_UNIT_MM,
>         CAIRO_SVG_UNIT_PT,
>         CAIRO_SVG_UNIT_PC,
>         CAIRO_SVG_UNIT_PERCENT
>     } cairo_svg_unit_t;
>
>
> // In 'src/cairo-svg-surface.c' :-
>     static const char * _cairo_svg_unit_strings[] =
>     {
>         [CAIRO_SVG_UNIT_USER] = "",  // <--- error occurs here !!
>         [CAIRO_SVG_UNIT_EM] = "em",
>         [CAIRO_SVG_UNIT_EX] = "ex",
>         [CAIRO_SVG_UNIT_PX] = "px",
>         [CAIRO_SVG_UNIT_IN] = "in",
>         [CAIRO_SVG_UNIT_CM] = "cm",
>         [CAIRO_SVG_UNIT_MM] = "mm",
>         [CAIRO_SVG_UNIT_PT] = "pt",
>         [CAIRO_SVG_UNIT_PC] = "pc",
>         [CAIRO_SVG_UNIT_PERCENT] = "%"
>     }
>
> I think it's ( possibly? ) C99, which MSVC never fully supported :-(
>
> John



More information about the cairo mailing list