mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
include/ruby/missing.h: defined(__cplusplus) before using __cplusplus
* include/ruby/missing.h (isinf, isnan): For non-C++ programs, defined(__cplusplus) may be needed before using __cplusplus. [Bug #14816] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63572 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
b5d6db65b4
commit
b7595f2c2e
1 changed files with 2 additions and 2 deletions
|
@ -168,7 +168,7 @@ RUBY_EXTERN const union bytesequence4_or_float rb_nan;
|
|||
# include <ieeefp.h>
|
||||
# endif
|
||||
# define isinf(x) (!finite(x) && !isnan(x))
|
||||
# elif __cplusplus >= 201103L
|
||||
# elif defined(__cplusplus) && __cplusplus >= 201103L
|
||||
# include <cmath> // it must include constexpr bool isinf(double);
|
||||
# else
|
||||
RUBY_EXTERN int isinf(double);
|
||||
|
@ -178,7 +178,7 @@ RUBY_EXTERN int isinf(double);
|
|||
|
||||
#ifndef isnan
|
||||
# ifndef HAVE_ISNAN
|
||||
# if __cplusplus >= 201103L
|
||||
# if defined(__cplusplus) && __cplusplus >= 201103L
|
||||
# include <cmath> // it must include constexpr bool isnan(double);
|
||||
# else
|
||||
RUBY_EXTERN int isnan(double);
|
||||
|
|
Loading…
Reference in a new issue