comparison src/build-msvctools/math/math.h.in @ 3127:e0257da7fcdc

[MSVC] only use special math.h with clgcc and similar. - cc-msvc.cc: define __CLGCC__ macro - math/math.h.in: defaults to stock math.h if __CLGCC__ is not defined - math/Makefile: add -D__CLGCC__ for files compiled with MSVC
author Michael Goffioul <michael.goffioul@gmail.com>
date Thu, 11 Jul 2013 23:47:31 -0400
parents f8299bb6c872
children
comparison
equal deleted inserted replaced
3126:7421017ece8e 3127:e0257da7fcdc
6 #define __MSVCMATHLIB_H__ 6 #define __MSVCMATHLIB_H__
7 7
8 #ifndef _MSC_VER 8 #ifndef _MSC_VER
9 # error "this header can only be used with Visual C++ compiler" 9 # error "this header can only be used with Visual C++ compiler"
10 #endif 10 #endif
11
12 #ifndef __CLGCC__
13 /* Only use this header with clgcc/clg++, otherwise fall back
14 * to the default VC++ header.
15 */
16 #include <@MSVCMATH@>
17 #else
11 18
12 /* Make sure math constants are defined */ 19 /* Make sure math constants are defined */
13 #ifndef _USE_MATH_DEFINES 20 #ifndef _USE_MATH_DEFINES
14 # define _USE_MATH_DEFINES 21 # define _USE_MATH_DEFINES
15 #endif 22 #endif
318 325
319 #ifdef __cplusplus 326 #ifdef __cplusplus
320 } 327 }
321 #endif 328 #endif
322 329
323 #endif 330 #endif /* __CLGCC__ */
331
332 #endif