mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-24 12:41:16 +00:00
build: Check for sincosf()
sincosf() is really a GCC-specific function that may more may not be supported on non-GCC compilers, so we want to check for it, otherwise we use a fallback implementation, not unlike the one in demos/gtk-demo/gtkgears.c.
This commit is contained in:
parent
ea810f176b
commit
a9b1d4a389
@ -712,7 +712,15 @@ _sincos (float deg,
|
||||
}
|
||||
else
|
||||
{
|
||||
sincosf (deg * M_PI / 180.0, out_s, out_c);
|
||||
float angle = deg * M_PI / 180.0;
|
||||
|
||||
#ifdef HAVE_SINCOSF
|
||||
sincosf (angle, out_s, out_c);
|
||||
#else
|
||||
*out_s = sinf (angle);
|
||||
*out_c = cosf (angle);
|
||||
#endif
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -198,6 +198,7 @@ check_functions = [
|
||||
'log2',
|
||||
'exp2',
|
||||
'sincos',
|
||||
'sincosf',
|
||||
]
|
||||
|
||||
foreach func : check_functions
|
||||
|
Loading…
Reference in New Issue
Block a user