GCC 4.0: small patch

Discussion
Fluido
2005-08-17
2013-04-09
  • Fluido
    Fluido
    2005-08-17

    In order to compile rudl with gcc 4.0 I had to apply this small patch:

    --- flxplay.c.orig      2003-09-22 00:24:07.000000000 +0200
    +++ flxplay.c   2005-08-17 10:26:28.000000000 +0200
    @@ -42,8 +42,8 @@
       int lastFrameTicks;
    } FLC;

    -#define ReadU16(tmp1, tmp2) (Uint16)*(tmp1) = ((Uint8)*(tmp2+1)<<8)+(Uint8)*(tmp2);
    -#define ReadU32(tmp1, tmp2) (Uint32)*(tmp1) = (((((((Uint8)*(tmp2+3)<<8)+((Uint8)*(tmp2+2)))<<8)+((Uint8)*(tmp2+1)))<<8)+(Uint8)*(tmp2));
    +#define ReadU16(tmp1, tmp2) *((Uint16 *)(tmp1)) = ((Uint8)*(tmp2+1)<<8)+(Uint8)*(tmp2);
    +#define ReadU32(tmp1, tmp2) *((Uint32 *)(tmp1)) = (((((((Uint8)*(tmp2+3)<<8)+((Uint8)*(tmp2+2)))<<8)+((Uint8)*(tmp2+1)))<<8)+(Uint8)*(tmp2));

    (possibly damaged by this web interface). It is easy to see where was the change.

    You may want to check & apply the change.

    Carlo