]> git.proxmox.com Git - mirror_edk2.git/blobdiff - StdLib/LibC/Main/Arm/flt_rounds.c
StdLib: Patches and updates for ARM.
[mirror_edk2.git] / StdLib / LibC / Main / Arm / flt_rounds.c
index 3f436502704e9ea22576a3f456bad657d7aec412..a64f447aab58073f054434d9d63f8d532348f7f0 100644 (file)
@@ -1,4 +1,4 @@
-/*     $NetBSD: flt_rounds.c,v 1.3 2006/02/25 00:58:35 wiz Exp $       */\r
+/*  $NetBSD: flt_rounds.c,v 1.3 2006/02/25 00:58:35 wiz Exp $ */\r
 \r
 /*\r
  * Copyright (c) 1996 Mark Brinicombe\r
@@ -15,7 +15,7 @@
  * 3. All advertising materials mentioning features or use of this software\r
  *    must display the following acknowledgement:\r
  *      This product includes software developed by Mark Brinicombe\r
- *     for the NetBSD Project.\r
+ *  for the NetBSD Project.\r
  * 4. The name of the author may not be used to endorse or promote products\r
  *    derived from this software without specific prior written permission\r
  *\r
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
  */\r
 \r
-#include <sys/cdefs.h>\r
+#include <sys/EfiCdefs.h>\r
 #if defined(LIBC_SCCS) && !defined(lint)\r
 __RCSID("$NetBSD: flt_rounds.c,v 1.3 2006/02/25 00:58:35 wiz Exp $");\r
 #endif /* LIBC_SCCS and not lint */\r
 \r
 #include <sys/types.h>\r
-#include <ieeefp.h>\r
+//#include <ieeefp.h>\r
 \r
 static const int map[] = {\r
-       1,      /* round to nearest */\r
-       2,      /* round to positive infinity */\r
-       3,      /* round to negative infinity */\r
-       0       /* round to zero */\r
+  1,  /* round to nearest */\r
+  2,  /* round to positive infinity */\r
+  3,  /* round to negative infinity */\r
+  0 /* round to zero */\r
 };\r
 \r
 /*\r
  * Return the current FP rounding mode\r
  *\r
  * Returns:\r
- *     0 - round to zero\r
- *     1 - round to nearest\r
- *     2 - round to postive infinity\r
- *     3 - round to negative infinity\r
+ *  0 - round to zero\r
+ *  1 - round to nearest\r
+ *  2 - round to postive infinity\r
+ *  3 - round to negative infinity\r
  *\r
  * ok all we need to do is get the current FP rounding mode\r
  * index our map table and return the appropriate value.\r
@@ -77,5 +77,6 @@ int __flt_rounds(void);
 int\r
 __flt_rounds()\r
 {\r
-       return(map[fpgetround()]);\r
+  //return(map[fpgetround()]);\r
+  return 1; //TODO: FixMe\r
 }\r