gtkcssnumbervalue.c: Include fallback-c89.c to fix build

... on older Visual Studio versions, where isinf() is not available, and
copy the isinf() implementation from gdk/fallback-c89.c to
gtk/fallback-c89.c.
This commit is contained in:
Chun-wei Fan 2015-12-23 18:58:42 +08:00
parent d0d8671c02
commit c0bc0a9ac2
2 changed files with 14 additions and 2 deletions

View File

@ -65,3 +65,15 @@ nearbyint (double x)
return floor (x + 0.5);
}
#endif
#ifndef HAVE_DECL_ISINF
/* Unfortunately MSVC does not have finite()
* but it does have _finite() which is the same
* as finite() except when x is a NaN
*/
static inline gboolean
isinf (double x)
{
return (!_finite (x) && !_isnan (x));
}
#endif

View File

@ -17,14 +17,14 @@
#include "config.h"
#include <math.h>
#include "gtkcssnumbervalueprivate.h"
#include "gtkcssenumvalueprivate.h"
#include "gtkcssinitialvalueprivate.h"
#include "gtkstylepropertyprivate.h"
#include "fallback-c89.c"
struct _GtkCssValue {
GTK_CSS_VALUE_BASE
GtkCssUnit unit;