KhronosGroup / OpenCOLLADA

652 stars 251 forks source link

detecting isnan on Mac #576

Closed stefkeB closed 4 years ago

stefkeB commented 6 years ago

Added ifdef declaration to allow compilation of Sax Parser on macOS

lasalvavida commented 5 years ago

I would suggest a slight adjustment.

#ifdef isnan

doesn't actually do anything as far as I'm aware since the pre-processor isn't function aware.

I believe that proper practice here is to either use math.h and isnan, or cmath.h and std::isnan which should be portable.

Travis recently upgraded their OS X VM to use Apple LLVM version 9.1.0 and our COLLADA2GLTF build is currently broken because of this so it would be nice to see it fixed. I will likely downgrade XCode for our CI builds in the meantime.

stefkeB commented 5 years ago

I'm not experienced enough to know the "best" solution. I'm not a developer, but tinker with code occasionally. I do know that Apple really pushes developers to use the latest and greatest Xcode (which also implies moving with current macOS). Any solution which allows compilation on macOS is fine for me.