[cogl/msvc-support] cogl-util.h: Update modff wrapper usage
- From: Chun-wei Fan <fanchunwei src gnome org>
 
- To: commits-list gnome org
 
- Cc: 
 
- Subject: [cogl/msvc-support] cogl-util.h: Update modff wrapper usage
 
- Date: Thu, 21 Jul 2011 04:24:09 +0000 (UTC)
 
commit c02274809a9c88f6dd7d113c03a3dfb5a019d300
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Thu Jul 21 12:24:00 2011 +0800
    cogl-util.h: Update modff wrapper usage
    
    The modff function works fine on Visual C++ under x64 (and possibly
    IA64) compilation-so the wrapper call to modf is only required under
    x86 (32-bit) compilation
 cogl/cogl-util.h |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/cogl/cogl-util.h b/cogl/cogl-util.h
index 7345607..df8f092 100644
--- a/cogl/cogl-util.h
+++ b/cogl/cogl-util.h
@@ -103,14 +103,14 @@ int
 _cogl_util_ffs (int num);
 #endif
 
-/* MSVC appears to have a bug in its implementation of modff so we
- * instead use the double version there. There is a comment about this
- * bug here:
+/* MSVC appears to have a bug in its implementation of modff for i386 
+ * architecture so we instead use the double version there. There 
+ * is a comment about this bug here:
  *
  * http://connect.microsoft.com/VisualStudio/feedback/details/ \
  *       432366/modff-corrupts-stack
  */
-#ifdef _MSC_VER
+#if (defined(_MSC_VER) && defined(_M_IX86))
 static inline float
 cogl_modff (float value, float *int_part)
 {
@@ -119,8 +119,8 @@ cogl_modff (float value, float *int_part)
   *int_part = int_part_double;
   return frac_part_double;
 }
-#else /* _MSC_VER */
+#else /* _MSC_VER && _M_IX86 */
 #define cogl_modff modff
-#endif /* _MSC_VER */
+#endif /* _MSC_VER && _M_IX86 */
 
 #endif /* __COGL_UTIL_H */
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]