On Tue, Feb 24, 2015 at 8:57 AM, Brian Paul <bri...@vmware.com> wrote: > Start getting rid of some imports.h macros. Use the c99 functions instead. > --- > include/c99_math.h | 11 +++++++++++ > src/mesa/main/imports.h | 6 ------ > src/mesa/math/m_debug_util.h | 9 ++++++--- > src/mesa/program/prog_execute.c | 5 +++-- > 4 files changed, 20 insertions(+), 11 deletions(-) > > diff --git a/include/c99_math.h b/include/c99_math.h > index 6680f54..e60e7d3 100644 > --- a/include/c99_math.h > +++ b/include/c99_math.h > @@ -82,6 +82,17 @@ static inline float logf( float f ) > return (float) log( (double) f ); > } > > +static inline float frexpf(float x, float y) > +{ > + return (float) frexp(x, y);
frexp takes a pointer as the second argument. I'd have to think more about frexp and ldexp to make myself sure that passing floats to the double function actually give the results you'd get from frexpf... but I guess that'd work? Similar concerns about ldexp, but I guess we've been doing it for years. _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev