X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=lib%2Fceil.c;h=fbcca33a4a4dfcbdae30e57ae4d759c0552d278d;hb=571f20db52d2165d6cce4b2aacdedb123330d90f;hp=2ed16540ae802c349b39ec06cc4884a73c67d542;hpb=3be902cd0bdb566284ceb3f6fae538391da1faed;p=gnulib.git diff --git a/lib/ceil.c b/lib/ceil.c index 2ed16540a..fbcca33a4 100644 --- a/lib/ceil.c +++ b/lib/ceil.c @@ -1,5 +1,5 @@ /* Round towards positive infinity. - 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,13 +16,17 @@ /* Written by Bruno Haible , 2007. */ -#include +#if ! defined USE_LONG_DOUBLE +# include +#endif /* Specification. */ #include #include +#undef MIN + #ifdef USE_LONG_DOUBLE # define FUNC ceill # define DOUBLE long double @@ -50,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.