[Piglit] [PATCH 5/5] piglit-util: define _USE_MATH_DEFINES for MSVC
Jose Fonseca
jfonseca at vmware.com
Mon Oct 3 07:10:34 PDT 2011
Brian,
It's better to define this on CMakeLists.txt, otherwise it would be susceptible to include order (i.e., if math.h was somehow included before util, it would not work).
I went ahead and commited a fix to do that.
Jose
----- Original Message -----
> This fixes undefined M_PI errors with MSVC.
> ---
> tests/util/piglit-util.h | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/tests/util/piglit-util.h b/tests/util/piglit-util.h
> index 9c3858b..2ac09a6 100644
> --- a/tests/util/piglit-util.h
> +++ b/tests/util/piglit-util.h
> @@ -38,6 +38,7 @@ typedef unsigned __int64 uint64_t;
> #define bool BOOL
> #define true 1
> #define false 0
> +#define _USE_MATH_DEFINES
> #else
> #include <stdint.h>
> #include <stdbool.h>
> --
> 1.7.3.4
>
> _______________________________________________
> Piglit mailing list
> Piglit at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/piglit
>
More information about the Piglit
mailing list