summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/ruby/missing.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/ruby/missing.h b/include/ruby/missing.h
index 2d3852c131..03657042ce 100644
--- a/include/ruby/missing.h
+++ b/include/ruby/missing.h
@@ -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);