diff options
author | Stanisław Halik <sthalik@misaki.pl> | 2017-08-05 17:13:06 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-05 17:13:06 +0200 |
commit | 70fa0b3f7e1ec4581e30127785fb6d59b89ec704 (patch) | |
tree | 9bb436304297b093a7a0e9c239cee01c175458a6 /compat/nan.cpp | |
parent | f7701592fcf7cc3b268a331b969374cd0c796ff2 (diff) | |
parent | 2616ec46f5b69e3452788394ba6d0e21232463cc (diff) |
Merge pull request #668 from MrCapone/macos_build_fix
fixed macos build
Diffstat (limited to 'compat/nan.cpp')
-rw-r--r-- | compat/nan.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/compat/nan.cpp b/compat/nan.cpp index 9c7bf147..2659ad07 100644 --- a/compat/nan.cpp +++ b/compat/nan.cpp @@ -19,6 +19,11 @@ int __cdecl my_fpclassify(double)__asm__("___fpclassify"); #define my_isinf(x) (my_fpclassify(x) == FP_INFINITE) extern "C" OTR_COMPAT_EXPORT bool __attribute__ ((noinline)) nanp(double x) +#elif defined __APPLE__ +# include <math.h> +# define my_isnan(x) isnan(x) +# define my_isinf(x) isinf(x) +extern "C" OTR_COMPAT_EXPORT bool __attribute__ ((noinline)) nanp(double x) #else int my_isnan(double)__asm__("isnan"); int my_isinf(double)__asm__("isinf"); |