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

Brian Paul brianp at vmware.com
Tue Jan 7 07:11:43 PST 2014


On 01/07/2014 08:03 AM, Erik Faye-Lund wrote:
> 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?

I got Kenneth's R-b so I pushed it.  I saw no reason to wait.  Also, I 
don't like build breaks to linger any longer than necessary.

-Brian



More information about the mesa-dev mailing list