changeset 3923:3fd9b781a9d2

workaround for the guilty code that caused sig11 when compiled with gcc-3.0.x (using the old C version - before the Big Indent patch :)
author pl
date Mon, 31 Dec 2001 17:22:41 +0000
parents 2bdf3b35e25a
children 9f18722fafe9
files loader/win32.c
diffstat 1 files changed, 13 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/loader/win32.c	Mon Dec 31 16:44:03 2001 +0000
+++ b/loader/win32.c	Mon Dec 31 17:22:41 2001 +0000
@@ -3410,6 +3410,18 @@
 // of debuging fixing & testing - it's almost unimaginable - kabi
 
 // _ftol - operated on the float value which is already on the FPU stack
+
+#ifdef MPLAYER
+// Note: the asm version is buggy and causes mysterious sig11 with gcc-3.0
+// flavors so we'd better stick to the old one for the moment (C version
+// is found in release 1.39 of this file in MPlayer CVS) - pl
+int
+exp_ftol (float f)
+{
+  return (int) (f + .5);
+}
+#else
+#warning "exp_ftol may cause sig11"
 static void exp_ftol(void)
 {
     __asm__ __volatile__
@@ -3426,6 +3438,7 @@
 	 "mov	 -12(%ebp), %eax \n\t"
 	);
 }
+#endif
 
 static double exppow(double x, double y)
 {