[cairo] Building libcairo 1.6.4 on AIX

Behdad Esfahbod behdad at behdad.org
Wed May 28 09:58:31 PDT 2008


On Wed, 2008-05-28 at 09:39 -0700, Stephen McCants wrote:
> 
> typedef struct {
>   unsigned long index;
>   union {
>     struct {
>       double x;
>       double y;
>     } d;
>     struct {
>       int x;
>       int y;
>     } i;
>   } p;
> } cairo_xlib_glyph_t;
> 
> The cairo_glyph_t struct (defined in cairo.h) is:
> 
> typedef struct {
>   unsigned long        index;
>   double               x;
>   double               y;
> } cairo_glyph_t;
> 
> It seems unlikely that these two structs would be the same size under
> any compiler,

They are.  Note that the first one is using a union.  What can help us
figure out what's going on is for you to tell us what the sizeof() of
those structs is under your compiler.

Also this one that may suggest a solution:

typedef struct {
  union {
    struct {
      unsigned long index;
      double x;
      double y;
    } d;
    struct {
      unsigned long index;
      int x;
      int y;
    } i;
  } p;
} cairo_xlib_glyph_t2;

-- 
behdad
http://behdad.org/

"Those who would give up Essential Liberty to purchase a little
 Temporary Safety, deserve neither Liberty nor Safety."
        -- Benjamin Franklin, 1759



More information about the cairo mailing list