[Mesa-dev] [PATCH] glsl: rename min(), max() functions to fix MSVC build

Brian Paul brianp at vmware.com
Tue Jan 7 06:59:45 PST 2014


On 01/06/2014 05:22 PM, Erik Faye-Lund wrote:
> On Tue, Jan 7, 2014 at 12:12 AM, Brian Paul <brianp at vmware.com> wrote:
>> Evidently, there's some other definition of "min" and "max" that
>> causes MSVC to choke on these function names.  Renaming to min2()
>> and max2() fixes things.
>
> Wouldn't it be easier to just make sure NOMINMAX is defined before
> including any system-headers?

I wasn't aware of that option.  I think I'll just leave things as-is for 
now to avoid churn.

-Brian



More information about the mesa-dev mailing list