[Numpy-svn] r5809 - trunk/numpy/core/include/numpy/fenv

numpy-svn at scipy.org numpy-svn at scipy.org
Sat Sep 13 02:03:34 EDT 2008


Author: cdavid
Date: 2008-09-13 01:03:30 -0500 (Sat, 13 Sep 2008)
New Revision: 5809

Modified:
   trunk/numpy/core/include/numpy/fenv/fenv.h
Log:
Fix cygwin compilation

Recent version of binutils (2.18.50) do not accept 4 bytes operand for some
opcodes like fnstsw (which always expected a 2 bytes operand). Replace the type
of the argument from unsigned 2 bytes to unsigned 4 bytes unsigned integer.


Modified: trunk/numpy/core/include/numpy/fenv/fenv.h
===================================================================
--- trunk/numpy/core/include/numpy/fenv/fenv.h	2008-09-13 03:40:57 UTC (rev 5808)
+++ trunk/numpy/core/include/numpy/fenv/fenv.h	2008-09-13 06:03:30 UTC (rev 5809)
@@ -91,7 +91,7 @@
 static __inline int
 fegetexceptflag(fexcept_t *__flagp, int __excepts)
 {
-	int __status;
+	__uint16_t __status;
 
 	__fnstsw(&__status);
 	*__flagp = __status & __excepts;
@@ -123,7 +123,7 @@
 static __inline int
 fetestexcept(int __excepts)
 {
-	int __status;
+	__uint16_t __status;
 
 	__fnstsw(&__status);
 	return (__status & __excepts);
@@ -187,7 +187,7 @@
 static __inline int
 feupdateenv(const fenv_t *__envp)
 {
-	int __status;
+	__uint16_t __status;
 
 	__fnstsw(&__status);
 	__fldenv(*__envp);




More information about the Numpy-svn mailing list