[mharris@devel Xserver]$ grep -ri 'define\WMIN(' * Xprint/pcl/Pcl.h:#define MIN(a,b) (((a)<(b))?(a):(b)) Xprint/ps/Ps.h:#define MIN(a,b) (((a)<(b))?(a):(b)) dix/main.c:#define MIN(a,b) (((a) < (b)) ? (a) : (b)) fb/fbtrap.c:#define MIN(a, b) ((a) < (b) ? (a) : (b)) hw/xfree86/drivers/apm/apm_regs.h:#define MIN(a,b) ((a) < (b) ? (a) : (b)) hw/xfree86/drivers/glide/glide_driver.c:#define MIN(a,b) ((a) < (b) ? (a) : (b)) hw/xfree86/drivers/glint/pm2_video.c:#define MIN(a, b) (((a) < (b)) ? (a) : (b)) hw/xfree86/drivers/siliconmotion/smi_video.c:#define MIN(a, b) (((a) < (b)) ? (a) : (b)) hw/xfree86/drivers/vmware/vmware.h:#define MIN(a,b) ((a)<(b)?(a):(b)) hw/xfree86/common/xf86Bus.c:#define MIN(x,y) ((x<y)?x:y) hw/xfree86/common/xf86pciBus.c:#define MIN(x,y) (((x)<(y))?(x):(y)) hw/xfree86/common/xf86pciBus.c.Xserver-common-fix-broken-MIN-macro-definition:#define MIN(x,y) ((x<y)?x:y) hw/xfree86/etc/MTRR-Lynx.shar:X#define min(a,b) MIN(a,b) hw/xfree86/loader/aoutloader.c:#define MIN(a,b) ((a)<(b)?(a):(b)) hw/xfree86/shadowfb/shadow.c:#define MIN(a,b) (((a)<(b))?(a):(b)) hw/xfree86/xf4bpp/OScompiler.h:#define MIN(a,b) (((a)<(b))?(a):(b)) hw/xfree86/xf86cfg/text-mode.c:#define MIN(a, b) ((a) < (b) ? (a) : (b)) include/misc.h:#define min(a, b) (((a) < (b)) ? (a) : (b)) miext/rootless/rootlessCommon.h:#define MIN(x,y) ((x) < (y) ? (x) : (y))
I guess we should file this low priority issue upstream, as it might be more likely to get investigated by someone in the community, and doesn't require any great skill. I like the idea of using the kernel style 3 arg min/max macros, but I imagine there might be some opposition to doing so due to historical usage of 2 arg min/max in C code.
Reassigning to self. This should be filed upstream, and tracked there. I still believe the best approach is that of the kernel, but upstream might possibly need some convincing. We'll see. Low priority in any case.
Filed upstream as: https://bugs.freedesktop.org/show_bug.cgi?id=2968 Setting status to "UPSTREAM"