1 # Provide a fallback for missing sincos() 2 # 3 --- src/egl/opengles2/es2gears.c.orig 2012-06-25 15:34:58 UTC 4 +++ src/egl/opengles2/es2gears.c 5 @@ -168,6 +168,12 @@ create_gear(GLfloat inner_radius, GLfloa 6 gear->vertices = calloc(VERTICES_PER_TOOTH * teeth, sizeof(*gear->vertices)); 7 v = gear->vertices; 8 9 +#ifndef sincos 10 +#define sincos(__x, _s, _c) do { \ 11 + float _x = (__x); *(_s) = sin(_x); *(_c) = cos(_x); \ 12 +} while(0) 13 +#endif 14 + 15 for (i = 0; i < teeth; i++) { 16 /* Calculate needed sin/cos for varius angles */ 17 sincos(i * 2.0 * M_PI / teeth, &s[0], &c[0]); 18