Download raw body.
agar/agar vs big endian
On Tue, Jan 06, 2026 at 03:29:04PM +0100, Claudio Jeker wrote:
> There is one too many '(' in the big endian case.
ok
> Why are people constantly reinventing the wheel?
Because these endianness macros are a complete and utter portability mess.
>
> --
> :wq Claudio
>
> Index: patches/patch-include_agar_gui_inline_surface_h
> ===================================================================
> RCS file: patches/patch-include_agar_gui_inline_surface_h
> diff -N patches/patch-include_agar_gui_inline_surface_h
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ patches/patch-include_agar_gui_inline_surface_h 6 Jan 2026 14:17:46 -0000
> @@ -0,0 +1,15 @@
> +inline_surface.h: In function 'ag_surface_get32_at':
> +inline_surface.h:424: error: expected ')' before ';' token
> +
> +Index: include/agar/gui/inline_surface.h
> +--- include/agar/gui/inline_surface.h.orig
> ++++ include/agar/gui/inline_surface.h
> +@@ -415,7 +415,7 @@ ag_surface_get32_at(const AG_Surface *S, const Uint8 *
> + AG_Color c;
> +
> + # if AG_BYTEORDER == AG_BIG_ENDIAN
> +- px = (((Uint64)p[0] << 32) |
> ++ px = ((Uint64)p[0] << 32) |
> + ((Uint64)p[1] << 24) |
> + ((Uint64)p[2] << 16) |
> + ((Uint64)p[3] << 8) |
>
agar/agar vs big endian