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

Erik Faye-Lund kusmabite at gmail.com
Tue Jan 7 07:03:19 PST 2014


On Tue, Jan 7, 2014 at 3:59 PM, Brian Paul <brianp at vmware.com> wrote:
> 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.
>

Why was this pushed out prematurely, then? Reviewing within two hours
seems to be reasonable, no?


More information about the mesa-dev mailing list