mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-19 06:09:01 +00:00
Reintroduce M_PI compatibility
M_PI is not part of C99 or C++ and thus aren't provided in all configurations. This used to be handled in reference_math.c directly but was recently removed. Just tweak the M_PI handling in the compatibility headers to restore builds.
This commit is contained in:
committed by
Kévin Petit
parent
ef832c330c
commit
85d474f06a
@@ -117,16 +117,16 @@ typedef long long int64_t;
|
||||
#include <math.h>
|
||||
#endif
|
||||
|
||||
#ifndef M_PI
|
||||
#define M_PI 3.14159265358979323846264338327950288
|
||||
#endif
|
||||
|
||||
#if defined( _MSC_VER )
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef M_PI
|
||||
#define M_PI 3.14159265358979323846264338327950288
|
||||
#endif
|
||||
|
||||
#ifndef NAN
|
||||
#define NAN (INFINITY - INFINITY)
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user