[vlc-devel] commit: fpclassify() is C99, not necessarily available in C++ ( Rémi Denis-Courmont )

git version control git at videolan.org
Fri Aug 7 16:33:53 CEST 2009


vlc | branch: 1.0-bugfix | Rémi Denis-Courmont <remi at remlab.net> | Fri Aug  7 17:32:49 2009 +0300| [5751bc26292b7091bd70de0d71610ad7fec11fc2] | committer: Rémi Denis-Courmont 

fpclassify() is C99, not necessarily available in C++

(cherry picked from commit d23fec0d6442da585389a843659e9a06d21e6817)

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5751bc26292b7091bd70de0d71610ad7fec11fc2
---

 modules/audio_filter/spatializer/Modules.am  |    2 +-
 modules/audio_filter/spatializer/denormals.h |   13 ++++---------
 2 files changed, 5 insertions(+), 10 deletions(-)

diff --git a/modules/audio_filter/spatializer/Modules.am b/modules/audio_filter/spatializer/Modules.am
index 0406a5f..fcc7b44 100644
--- a/modules/audio_filter/spatializer/Modules.am
+++ b/modules/audio_filter/spatializer/Modules.am
@@ -1,4 +1,4 @@
 SOURCES_spatializer = spatializer.cpp \
     allpass.cpp allpass.hpp comb.cpp comb.hpp \
-    denormals.h tuning.h revmodel.cpp revmodel.hpp
+    denormals.h denormals.c tuning.h revmodel.cpp revmodel.hpp
 
diff --git a/modules/audio_filter/spatializer/denormals.h b/modules/audio_filter/spatializer/denormals.h
index 749c7cb..b7570da 100644
--- a/modules/audio_filter/spatializer/denormals.h
+++ b/modules/audio_filter/spatializer/denormals.h
@@ -8,16 +8,11 @@
 #ifndef _denormals_
 #define _denormals_
 
-#include <stdint.h>
 
-#include <math.h>
-
-static inline float undenormalise( float f )
-{
-    if( fpclassify( f ) == FP_SUBNORMAL  )
-        return 0.0;
-    return f;
-}
+#ifdef __cplusplus
+extern "C"
+#endif
+float undenormalise( float );
 
 #endif//_denormals_
 




More information about the vlc-devel mailing list