ruby-changes:37651
From: nobu <ko1@a...>
Date: Wed, 25 Feb 2015 11:25:30 +0900 (JST)
Subject: [ruby-changes:37651] nobu:r49732 (trunk): complex.c: M_PI in VC
nobu 2015-02-25 11:25:22 +0900 (Wed, 25 Feb 2015) New Revision: 49732 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=49732 Log: complex.c: M_PI in VC * complex.c (_USE_MATH_DEFINES): needed for M_PI in Microsoft Visual C. Modified files: trunk/complex.c Index: complex.c =================================================================== --- complex.c (revision 49731) +++ complex.c (revision 49732) @@ -6,6 +6,10 @@ https://github.com/ruby/ruby/blob/trunk/complex.c#L6 */ #include "internal.h" +#if defined _MSC_VER +/* Microsoft Visual C does not define M_PI and others by default */ +# define _USE_MATH_DEFINES 1 +#endif #include <math.h> #define NDEBUG -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/