True, but the problem the patch is meant to address primarily is the X server crash induced by a wrong macro expansion (rather than changing the macro itself).
For comparison, Pixman uses that definition:
#define MOD(a, b) ((a) < 0 ? ((b) - ((-(a) - 1) % (b))) - 1 : (a) % (b))
in http://cgit.freedesktop.org/pixman/tree/pixman/pixman-private.h
And uses of that macro for example in walk_region_internal() from http://cgit.freedesktop.org/pixman/tree/pixman/pixman.c which is quite similar to the implementation of the "old" fbComposite()
True, but the problem the patch is meant to address primarily is the X server crash induced by a wrong macro expansion (rather than changing the macro itself).
For comparison, Pixman uses that definition:
#define MOD(a, b) ((a) < 0 ? ((b) - ((-(a) - 1) % (b))) - 1 : (a) % (b))
in http:// cgit.freedeskto p.org/pixman/ tree/pixman/ pixman- private. h
And uses of that macro for example in walk_region_ internal( ) from http:// cgit.freedeskto p.org/pixman/ tree/pixman/ pixman. c which is quite similar to the implementation of the "old" fbComposite()