festvox / speech_tools

Edinburgh Speech Tools
Other
56 stars 25 forks source link

../include/EST_math.h:87:29: error: '__isnanf' was not declared in this scope #3

Closed ghost closed 6 years ago

ghost commented 6 years ago
/* Linux (and presumably Hurd too as Linux is GNU libc based) */           
/* Sorry I haven't confirmed this cpp symbol yet              */           
#if defined(linux)                                                         
#define isnanf(X) __isnanf(X)                                              
#endif 

In the case of musl based distributions, such as alpine linux, this assumption is incorrect.

I recommend the following fix,

#if defined(linux) && defined(__GLIBC__)
#define isnanf(X) __isnanf(X)
#endif

#ifndef isnanf  
#define isnanf isnan    
#endif
festvox commented 6 years ago

fixed and checked in, thanks.

I'm not a 100% sure that defining isnanf is it isn't defined is right (it might be a function not yet declared) but nothing really depends on if being isnanf vs isnan so it should be fine

saikrishnarallabandi commented 6 years ago

closing