OSDN Git Service

PR other/37897
[pf3gnuchains/gcc-fork.git] / libdecnumber / decRound.c
index 0a85cb1..26740bf 100644 (file)
@@ -1,25 +1,39 @@
-/* Temporary support for a libc-like fp environment for decimal float.
-   Copyright (C) 2005 Free Software Foundation, Inc.
+/* Internal testing support for rounding for decimal float.
 
-This file is part of GCC.
+   Copyright (C) 2005, 2006 Free Software Foundation, Inc.
 
-GCC is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
+   This file is part of GCC.
 
-GCC is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-for more details.
+   GCC is free software; you can redistribute it and/or modify it
+   under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
 
-You should have received a copy of the GNU General Public License
-along with GCC; see the file COPYING.  If not, write to the Free
-Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
-02110-1301, USA.  */
+   In addition to the permissions in the GNU General Public License,
+   the Free Software Foundation gives you unlimited permission to link
+   the compiled version of this file into combinations with other
+   programs, and to distribute those combinations without any
+   restriction coming from the use of this file.  (The General Public
+   License restrictions do apply in other respects; for example, they
+   cover modification of the file, and distribution when not linked
+   into a combine executable.)
 
-#include "config.h"
+   GCC is distributed in the hope that it will be useful, but WITHOUT
+   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+   or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
+   License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with GCC; see the file COPYING.  If not, write to the Free
+   Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
+   02110-1301, USA.  */
+
+#include "dconfig.h"
 #include "decContext.h"
+#include "decRound.h"
+
+/* Internal, non-documented functions for testing libgcc functions.
+   This support is not sufficient for application use.  */
 
 #define FE_DEC_DOWNWARD 0
 #define FE_DEC_TONEAREST 1
@@ -28,11 +42,6 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
 #define FE_DEC_UPWARD 4
 #define FE_DEC_MAX 5
 
-extern void __dfp_set_round (int);
-extern int __dfp_get_round (void);
-extern enum rounding __decGetRound (void);
-
-/* FIXME: these should be in thread-local storage for runtime support.  */
 static enum rounding __dfp_rounding_mode = DEC_ROUND_HALF_EVEN;
 
 /* Set the decNumber rounding mode from the FE_DEC_* value in MODE.  */