X-Git-Url: https://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Ftrunc.c;h=d28398b16190243ddce617ffa3a4e6e81199b373;hb=84d1749c4b5ad026522be96537320556ec6f7a57;hp=347d9ac21011dd2efcec565c51e61a29cdf77274;hpb=995bd0764ebf4b386fca98ef660f651b25cbd8a7;p=gnulib.git diff --git a/lib/trunc.c b/lib/trunc.c index 347d9ac21..d28398b16 100644 --- a/lib/trunc.c +++ b/lib/trunc.c @@ -1,5 +1,5 @@ /* Round towards zero. - Copyright (C) 2007, 2010 Free Software Foundation, Inc. + Copyright (C) 2007, 2010-2013 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -16,7 +16,9 @@ /* Written by Bruno Haible , 2007. */ -#include +#if ! defined USE_LONG_DOUBLE +# include +#endif /* Specification. */ #include @@ -52,6 +54,12 @@ # define MINUS_ZERO L_(-0.0) #endif +/* MSVC with option -fp:strict refuses to compile constant initializers that + contain floating-point operations. Pacify this compiler. */ +#ifdef _MSC_VER +# pragma fenv_access (off) +#endif + /* 2^(MANT_DIG-1). */ static const DOUBLE TWO_MANT_DIG = /* Assume MANT_DIG <= 5 * 31.