Bug 90053
Summary: | glxgears should use sincos(3) | ||
---|---|---|---|
Product: | [Retired] Red Hat Raw Hide | Reporter: | Mike A. Harris <mharris> |
Component: | XFree86 | Assignee: | X/OpenGL Maintenance List <xgl-maint> |
Status: | CLOSED UPSTREAM | QA Contact: | David Lawrence <dkl> |
Severity: | low | Docs Contact: | |
Priority: | low | ||
Version: | 1.0 | Keywords: | Triaged |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2005-02-01 09:21:04 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Mike A. Harris
2003-05-01 18:15:54 UTC
sincos() is not very portable. Here is the configure test and a sincos macro that we've used with success in graphviz: --------------------- configure test ----------------------- AC_MSG_CHECKING(if have working sincos()) AC_TRY_RUN([ #include <stdio.h> #include <assert.h> #define PI 3.14159265358979323846 extern void sincos(double x, double *s, double *c); int main () { double sinx=0.0, cosx=1.0; sincos(PI/2.0,&sinx,&cosx); assert(sinx>0.9999999); assert(sinx<1.0000001); assert(cosx<0.0000001); assert(cosx>(-0.0000001)); return 0; }] , AC_MSG_RESULT(yes) AC_DEFINE_UNQUOTED(HAVE_SINCOS,1,[Define if libm provides a *working* sincos function]) , AC_MSG_RESULT(no) , AC_MSG_RESULT(no - assumed because cross-compiling) ) ------------------ macro --------------------- #ifndef HAVE_SINCOS void sincos(x,s,c) double x,*s,*c; { *s = sin(x); *c = cos(x); } #else extern void sincos(double x, double *s, double *c); #endif Filed bug report upstream to track this low priority enhancement suggestion, in case some enterprising new X developer wants a simple task to dip their toes into Imake et al.: https://bugs.freedesktop.org/show_bug.cgi?id=2442 Setting our bug status to "UPSTREAM" to continue tracking it in centralized location instead. |