Welcome!

Final Burn Neo => FBN Development => Topic started by: barbudreadmon on March 12, 2015, 02:51:41 PM

Title: [portability patch proposal] Not every compiler can do math
Post by: barbudreadmon on March 12, 2015, 02:51:41 PM
For portability, as mentioned on https://github.com/libretro/libretro-fba/commit/5b2521720a884fb5e1dd2fcfefaf0d7d1a9b000a , you could add :
Code: [Select]
#ifndef M_PI
 #define M_PI 3.1415926536
#endif
after including <cmath> in d_mystwarr.cpp and d_raiden2.cpp
Title: Re: [portability patch proposal] Not every compiler can do math
Post by: Barry Harris on March 12, 2015, 04:54:12 PM
Would it not work to add that to your burn_endian.h header?
Title: Re: [portability patch proposal] Not every compiler can do math
Post by: barbudreadmon on March 13, 2015, 08:20:21 AM
Commited your suggestion to git, but i have no MSYS2/MinGW-w64 toolchain to test. I asked for feedback and hope things go well.
Title: Re: [portability patch proposal] Not every compiler can do math
Post by: barbudreadmon on March 13, 2015, 02:06:19 PM
Disabling "-std=c++11" for now did the trick (moving M_PI def to burn_endian didn't). But we'll have this issue again when mips3 won't be a WIP anymore (seems like it needs -std=c++11 to compile).
Title: Re: [portability patch proposal] Not every compiler can do math
Post by: Romhack on March 13, 2015, 08:34:11 PM
Disabling "-std=c++11" for now did the trick (moving M_PI def to burn_endian didn't). But we'll have this issue again when mips3 won't be a WIP anymore (seems like it needs -std=c++11 to compile).
Only for nullptr and auto on some places, and IIRC <cstdint> and others :) . Easy.
You can also use "-std=gnu++0x" (C++11 with GNU extensions)