X-Git-Url: http://git.sourceforge.jp/view?a=blobdiff_plain;f=libdecnumber%2FdecRound.c;h=811bea81d02a62c0ed62a15162b93ea29a587e81;hb=0a0863c6f80e54de15e1878e75309689e4fce657;hp=3a643f34af274bf4e401845f53db492be593340c;hpb=84d7eab915eec8a7edd056bc6f60e087e207e183;p=pf3gnuchains%2Fgcc-fork.git diff --git a/libdecnumber/decRound.c b/libdecnumber/decRound.c index 3a643f34af2..811bea81d02 100644 --- a/libdecnumber/decRound.c +++ b/libdecnumber/decRound.c @@ -1,11 +1,12 @@ -/* 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. + + Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc. This file is part of GCC. 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) + the Free Software Foundation; either version 3, or (at your option) any later version. GCC is distributed in the hope that it will be useful, but WITHOUT @@ -13,13 +14,21 @@ 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. */ +Under Section 7 of GPL version 3, you are granted additional +permissions described in the GCC Runtime Library Exception, version +3.1, as published by the Free Software Foundation. + +You should have received a copy of the GNU General Public License and +a copy of the GCC Runtime Library Exception along with this program; +see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +. */ -#include "config.h" +#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 +37,6 @@ #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. */