[Mesa-dev] [PATCH] c99: in c99_math.h check that _USE_MATH_DEFINES is defined with MSVC

Jose Fonseca jfonseca at vmware.com
Thu Feb 26 11:10:06 PST 2015


On 26/02/15 17:48, Brian Paul wrote:
> ---
>   include/c99_math.h | 6 ++++++
>   1 file changed, 6 insertions(+)
>
> diff --git a/include/c99_math.h b/include/c99_math.h
> index 5d4f535..bec80e1 100644
> --- a/include/c99_math.h
> +++ b/include/c99_math.h
> @@ -38,6 +38,12 @@
>   #include "c99_compat.h"
>
>
> +/* This is to ensure that we get M_PI, etc. definitions */
> +#if defined(_MSC_VER) && !defined(_USE_MATH_DEFINES)
> +#error _USE_MATH_DEFINES define required when building with MSVC
> +#endif

Thanks.  It could be moved inside the `#if defined(_MSC_VER)` too.

Either way

Reviewed-by: Jose Fonseca <jfonseca at vmware.com>

> +
> +
>   #if defined(_MSC_VER)
>
>   #if _MSC_VER < 1800
>



More information about the mesa-dev mailing list