FreeBSD Bugzilla – Attachment 169382 Details for
Bug 208845
graphics/inventor: Fix build with libc++ 3.8.0
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Rename abs functions to avoid conflicts in graphics/inventor
graphics__inventor-fix-abs-1.diff (text/plain), 6.12 KB, created by
Dimitry Andric
on 2016-04-16 21:28:24 UTC
(
hide
)
Description:
Rename abs functions to avoid conflicts in graphics/inventor
Filename:
MIME Type:
Creator:
Dimitry Andric
Created:
2016-04-16 21:28:24 UTC
Size:
6.12 KB
patch
obsolete
>Index: graphics/inventor/files/patch-arc.c++ >=================================================================== >--- graphics/inventor/files/patch-arc.c++ (nonexistent) >+++ graphics/inventor/files/patch-arc.c++ (working copy) >@@ -0,0 +1,11 @@ >+--- lib/database/src/so/nodes/nurbs/libnurbs/arc.c++.orig 2000-08-15 12:56:22 UTC >++++ lib/database/src/so/nodes/nurbs/libnurbs/arc.c++ >+@@ -332,7 +332,7 @@ Arc::check( void ) >+ >+ inline long tooclose( REAL x, REAL y ) >+ { >+- return (abs(x-y) < TOL) ? 1 : 0; >++ return (absr(x-y) < TOL) ? 1 : 0; >+ } >+ >+ > >Property changes on: graphics/inventor/files/patch-arc.c++ >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: graphics/inventor/files/patch-arctess.c++ >=================================================================== >--- graphics/inventor/files/patch-arctess.c++ (nonexistent) >+++ graphics/inventor/files/patch-arctess.c++ (working copy) >@@ -0,0 +1,35 @@ >+--- lib/database/src/so/nodes/nurbs/libnurbs/arctess.c++.orig 2000-08-15 12:56:22 UTC >++++ lib/database/src/so/nodes/nurbs/libnurbs/arctess.c++ >+@@ -247,8 +247,8 @@ ArcTessellator::pwl( Arc *arc, REAL s1, >+ >+ /* if(rate <= 0.06) rate = 0.06;*/ >+ >+- int snsteps = 1 + (int) (abs(s2 - s1) / rate ); >+- int tnsteps = 1 + (int) (abs(t2 - t1) / rate ); >++ int snsteps = 1 + (int) (absr(s2 - s1) / rate ); >++ int tnsteps = 1 + (int) (absr(t2 - t1) / rate ); >+ int nsteps = max(1,max( snsteps, tnsteps )); >+ >+ REAL sstepsize = (s2 - s1) / (REAL) nsteps; >+@@ -395,8 +395,8 @@ ArcTessellator::tessellateNonlinear( Arc >+ vert->param[0] = u/w; >+ vert->param[1] = v/w; >+ #ifndef NOELIMINATION >+- REAL ds = abs(vert[0].param[0] - vert[-1].param[0]); >+- REAL dt = abs(vert[0].param[1] - vert[-1].param[1]); >++ REAL ds = absr(vert[0].param[0] - vert[-1].param[0]); >++ REAL dt = absr(vert[0].param[1] - vert[-1].param[1]); >+ int canremove = (ds<geo_stepsize && dt<geo_stepsize) ? 1 : 0; >+ REAL ods=0.0, odt=0.0; >+ >+@@ -454,8 +454,8 @@ ArcTessellator::tessellateNonlinear( Arc >+ vert->param[0] = u; >+ vert->param[1] = v; >+ #ifndef NOELIMINATION >+- REAL ds = abs(vert[0].param[0] - vert[-1].param[0]); >+- REAL dt = abs(vert[0].param[1] - vert[-1].param[1]); >++ REAL ds = absr(vert[0].param[0] - vert[-1].param[0]); >++ REAL dt = absr(vert[0].param[1] - vert[-1].param[1]); >+ int canremove = (ds<geo_stepsize && dt<geo_stepsize) ? 1 : 0; >+ REAL ods=0.0, odt=0.0; >+ > >Property changes on: graphics/inventor/files/patch-arctess.c++ >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: graphics/inventor/files/patch-ccw.c++ >=================================================================== >--- graphics/inventor/files/patch-ccw.c++ (nonexistent) >+++ graphics/inventor/files/patch-ccw.c++ (working copy) >@@ -0,0 +1,10 @@ >+--- lib/database/src/so/nodes/nurbs/libnurbs/ccw.c++.orig 2000-08-15 12:56:22 UTC >++++ lib/database/src/so/nodes/nurbs/libnurbs/ccw.c++ >+@@ -508,6 +508,6 @@ int >+ Subdivider::ccw( TrimVertex *a, TrimVertex *b, TrimVertex *c ) >+ { >+ REAL d = det3( a, b, c ); >+- if( abs(d) < 0.0001 ) return -1; >++ if( absr(d) < 0.0001 ) return -1; >+ return (d < 0.0) ? 0 : 1; >+ } > >Property changes on: graphics/inventor/files/patch-ccw.c++ >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: graphics/inventor/files/patch-simplemath.h >=================================================================== >--- graphics/inventor/files/patch-simplemath.h (nonexistent) >+++ graphics/inventor/files/patch-simplemath.h (working copy) >@@ -0,0 +1,10 @@ >+--- lib/database/src/so/nodes/nurbs/head/simplemath.h.orig 2000-08-15 12:56:22 UTC >++++ lib/database/src/so/nodes/nurbs/head/simplemath.h >+@@ -54,6 +54,6 @@ inline int >+ absi( int x ) { return ( x < 0 ) ? -x : x; } >+ >+ inline REAL >+-abs( REAL x ) { return ( x < 0.0 ) ? -x : x; } >++absr( REAL x ) { return ( x < 0.0 ) ? -x : x; } >+ >+ #endif /* __glusimplemath_h_ */ > >Property changes on: graphics/inventor/files/patch-simplemath.h >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: graphics/inventor/files/patch-softsurfeval.c++ >=================================================================== >--- graphics/inventor/files/patch-softsurfeval.c++ (nonexistent) >+++ graphics/inventor/files/patch-softsurfeval.c++ (working copy) >@@ -0,0 +1,13 @@ >+--- lib/database/src/so/nodes/nurbs/clients/softsurfeval.c++.orig 2000-08-15 12:56:22 UTC >++++ lib/database/src/so/nodes/nurbs/clients/softsurfeval.c++ >+@@ -50,8 +50,8 @@ >+ #include "softsurfeval.h" >+ #include "nurbsconsts.h" >+ >+-inline REAL abs( REAL x ) { return (x < 0.0) ? -x : x; } >+-inline int equal( REAL x, REAL y ) { return (abs(x-y) < 1.0E-6) ? 1 : 0; } >++inline REAL absr( REAL x ) { return (x < 0.0) ? -x : x; } >++inline int equal( REAL x, REAL y ) { return (absr(x-y) < 1.0E-6) ? 1 : 0; } >+ >+ _SoNurbsSurfaceEvaluator::~_SoNurbsSurfaceEvaluator() >+ { > >Property changes on: graphics/inventor/files/patch-softsurfeval.c++ >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 208845
: 169382