visualc, cope with `bool' and `isnan()' in visual studio 2015

now they have isnan(),
  (presumably in math.h)

now they have a C99 `bool',
  (maybe even though not asked for with <stdbool.h>)
This commit is contained in:
h_vogt 2015-10-18 22:01:32 +02:00 committed by rlar
parent d74da6aa95
commit df846346a1
1 changed files with 8 additions and 0 deletions

View File

@ -177,7 +177,9 @@ extern double x_atanh(double);
#define fileno _fileno
#define getcwd _getcwd
#define chdir _chdir
#if (_MSC_VER < 1800)
#define isnan _isnan
#endif
#define finite _finite
#define scalb _scalb
#define logb _logb
@ -196,6 +198,12 @@ extern double x_atanh(double);
static const __int64 global_nan = 0x7ff8000000000000i64;
#define NAN (*(const double *) &global_nan)
#endif
// undo a #define bool _Bool in MS Visual Studio 2015
#if defined(bool)
#undef bool
#endif
// warning C4127: Bedingter Ausdruck ist konstant
#pragma warning(disable: 4127)
#endif