view src/build-msvctools/math/isinf.c @ 3061:f8299bb6c872

Initial support for native MSVC compilation. * add MSVC support files: compiler wrappers and support libraries * adapt libiconv to work with MSVC * adapt gettext to work with MSVC
author Michael Goffioul <michael.goffioul@gmail.com>
date Mon, 17 Jun 2013 22:43:11 -0400
parents
children
line wrap: on
line source

#define __STDC__ 1

#include <math.h>
#include <float.h>

int isinf (double x)
{
  int c = (_fpclass (x) & (_FPCLASS_PINF | _FPCLASS_NINF));

  return (c == _FPCLASS_PINF ? 1
          : c == _FPCLASS_NINF ? -1 : 0);
}