Bug 106435 - TODO: Clean up the huge plethora of MIN() macro definitions in XFree86 server.
Summary: TODO: Clean up the huge plethora of MIN() macro definitions in XFree86 server.
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Red Hat Raw Hide
Classification: Retired
Component: XFree86
Version: 1.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Mike A. Harris
QA Contact: David Lawrence
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-10-07 02:36 UTC by Mike A. Harris
Modified: 2007-04-18 16:58 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-04-11 12:01:12 UTC
Embargoed:


Attachments (Terms of Use)

Description Mike A. Harris 2003-10-07 02:36:31 UTC
[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))

Comment 2 Mike A. Harris 2004-10-12 17:09:32 UTC
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.

Comment 3 Mike A. Harris 2004-12-03 22:09:05 UTC
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.

Comment 4 Mike A. Harris 2005-04-11 12:01:12 UTC
Filed upstream as:

https://bugs.freedesktop.org/show_bug.cgi?id=2968

Setting status to "UPSTREAM"


Note You need to log in before you can comment on or make changes to this bug.