mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-22 10:12:10 +01:00
The test programs for those in the Meson build files will not work for Visual Studio prior to 2013 (whereas the rest of the code does). Improve the tests for these by: -Adding a test to see whether we can re-define a prototype for these functions, using cc.compiles(). If so, set HAVE_DECL_xxxx to be 0, otherwise set HAVE_DECL_xxxx to be 1. Also, for glib/gnulib/frexpl.c, don't undefine frexpl on Visual Studio, otherwise we will not be able to compile/link it on Visual Studio compilers.
22 lines
349 B
C
22 lines
349 B
C
#include <config.h>
|
|
#include <gnulib_math.h>
|
|
#include <float.h>
|
|
#include <math.h>
|
|
|
|
long double rpl_frexpl (long double x, int *expptr)
|
|
{
|
|
if (x == 0.0L || x == -0.0L)
|
|
{
|
|
*expptr = x;
|
|
return x;
|
|
}
|
|
else if (isnanl (x))
|
|
return x;
|
|
else if (isinf (x))
|
|
return x;
|
|
#ifndef _MSC_VER
|
|
#undef frexpl
|
|
#endif
|
|
return frexpl (x, expptr);
|
|
}
|