[Mesa-dev] [PATCH 1/2] mesa: add signbit() macro
Brian Paul
brianp at vmware.com
Mon Sep 24 13:47:31 PDT 2012
On 09/24/2012 02:42 PM, Matt Turner wrote:
> On Mon, Sep 24, 2012 at 12:25 PM, Brian Paul<brianp at vmware.com> wrote:
>> Fixes compilation failure with MSVC since 0f3ba405.
>> ---
>> src/mesa/main/imports.h | 7 +++++++
>> 1 files changed, 7 insertions(+), 0 deletions(-)
>>
>> diff --git a/src/mesa/main/imports.h b/src/mesa/main/imports.h
>> index 81da510..4deca6a 100644
>> --- a/src/mesa/main/imports.h
>> +++ b/src/mesa/main/imports.h
>> @@ -145,6 +145,13 @@ static inline int isblank(int ch) { return ch == ' ' || ch == '\t'; }
>> /*@}*/
>>
>>
>> +/*
>> + * signbit() is a macro on Linux. Not available on Windows.
>> + */
>> +#ifndef signbit
>> +#define signbit(x) ((x)< 0.0)
>> +#endif
>> +
>
> Since signbit's argument is a float, you may want to make this 0.0f.
>
> Both patches are
>
> Reviewed-by: Matt Turner<mattst88 at gmail.com>
>
> I would have made these changes in my patch if you'd replied to it. It
> was on the list for a week and a half.
Yeah, sorry, too much email...
-Brian
More information about the mesa-dev
mailing list