http://bugs.freedesktop.org/show_bug.cgi?id=24318





--- Comment #11 from Jon TURNEY <jon.tur...@dronecode.org.uk>  2009-10-24 
10:24:29 PST ---
Attached a couple of patches with an effort to do this better.

As written, this falls back to explicitly defining M_PI using -D o the compiler
command line if it can't make math.h define it.  This probably isn't a good
idea.  Probably it should do nothing, but this probably breaks stuff on some
targets which should include compiler.h but doesn't? 

Visual C projects will need updating to use _USE_MATH_DEFINES.

I have assumed that the precision of the value of M_PI is not significant, as
it varies from place to place, which should be the case anyhow, as these values
are only a fall-back

(In reply to comment #8)
> IIRC when compiling with gcc -ansi, M_PI isn't defined.
> 
> In my math.h, its definition is wrapped in '#if defined __USE_BSD || defined
> __USE_XOPEN'

I have the same.  I believe that -U__STRICT_ANSI__ is the way to access these
definitions if you want to use -ansi, but this may be incorrect.


-- 
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Mesa3d-dev mailing list
Mesa3d-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev

Reply via email to