[Piglit] [PATCH 1/3] util: far/near macros must be undefined on all Windows builds.

Jose Fonseca jfonseca at vmware.com
Wed Dec 3 14:25:45 PST 2014


No prob.  I keep getting surprised how tricky it is to get code to be 
portable across Windows/MSVC.

I went ahead and commit them ealier after Brian's review.

Jose

On 03/12/14 22:20, Emil Velikov wrote:
> Thanks for the quick fixes José.
>
> Apart from a nitpick in patch 2 the series looks good.
>
> -Emil
>
> On 03/12/14 15:37, Jose Fonseca wrote:
>> From: José Fonseca <jfonseca at vmware.com>
>>
>> And not just MSVC.
>>
>> Fixes build with MinGW.
>> ---
>>   tests/util/piglit-util.h | 10 ++++++----
>>   1 file changed, 6 insertions(+), 4 deletions(-)
>>
>> diff --git a/tests/util/piglit-util.h b/tests/util/piglit-util.h
>> index af5d9fd..90d57d3 100755
>> --- a/tests/util/piglit-util.h
>> +++ b/tests/util/piglit-util.h
>> @@ -32,7 +32,13 @@ extern "C" {
>>   #include "config.h"
>>
>>   #if defined(_WIN32)
>> +
>>   #include <windows.h>
>> +
>> +/* Another two macros provided by windows.h which conflict with piglit */
>> +#undef near
>> +#undef far
>> +
>>   #endif
>>
>>   #include <assert.h>
>> @@ -54,10 +60,6 @@ extern "C" {
>>   #undef max
>>   #undef min
>>
>> -/* Another two macros provided by windows.h which conflict with piglit */
>> -#undef near
>> -#undef far
>> -
>>   #if !defined(__cplusplus) && !defined(inline)
>>   #define inline __inline
>>   #endif
>>
>



More information about the Piglit mailing list