Bug 4060 - frexpf() not found on older Unix'es
Summary: frexpf() not found on older Unix'es
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Mesa core (show other bugs)
Version: git
Hardware: SPARC Solaris
: high normal
Assignee: mesa-dev
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 1690
  Show dependency treegraph
 
Reported: 2005-08-13 04:07 UTC by Alan Coopersmith
Modified: 2009-08-24 12:23 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Alan Coopersmith 2005-08-13 04:07:01 UTC
Mesa/src/mesa/tnl/t_vb_arbprogram.c contains this bit of code in do_LOG():

#ifdef _WIN32
   GLfloat mantissa = (GLfloat) frexp((double)tmp, &exponent);
#else
   GLfloat mantissa = frexpf(tmp, &exponent);
#endif

Unfortunately, it's not just Win32 but older Unixes that don't have frexpf().
(It was added in C99 and Unix 2003 standards, but not included in older 
standards.)

For instance, this causes Xorg CVS head builds to fail on Solaris 9 (which only
had C89/Unix 98 compliance), but not Solaris 10 and later (which added C99 &
Unix 2003 compliance).

It would be nice if this #ifdef could be changed instead to 
#ifdef HAVE_FREXPF or something similar that could be set by the build system
(including Imake/autoconf in the Xorg builds which include Mesa).
Comment 1 Brian Paul 2005-08-13 04:56:09 UTC
I've added a FREXPF macro in imports.h to take care of this.
Comment 2 Adam Jackson 2009-08-24 12:23:20 UTC
Mass version move, cvs -> git


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.