ruby-changes:51366
From: ngoto <ko1@a...>
Date: Tue, 5 Jun 2018 23:16:56 +0900 (JST)
Subject: [ruby-changes:51366] ngoto:r63572 (trunk): include/ruby/missing.h: defined(__cplusplus) before using __cplusplus
ngoto 2018-06-05 23:16:50 +0900 (Tue, 05 Jun 2018) New Revision: 63572 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=63572 Log: 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] Modified files: trunk/include/ruby/missing.h Index: include/ruby/missing.h =================================================================== --- include/ruby/missing.h (revision 63571) +++ include/ruby/missing.h (revision 63572) @@ -168,7 +168,7 @@ RUBY_EXTERN const union bytesequence4_or https://github.com/ruby/ruby/blob/trunk/include/ruby/missing.h#L168 # 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); https://github.com/ruby/ruby/blob/trunk/include/ruby/missing.h#L178 #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); -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/