Merge branch 'lp-offset-twoside'
[mesa.git] / src / mesa / main / imports.c
index b1389b25f2a4111b8826d39fa629f01db0c8fecf..bcca4edc1aa77dd3b898a1c5ea355f93672adba0 100644 (file)
@@ -243,41 +243,6 @@ _mesa_memset16( unsigned short *dst, unsigned short val, size_t n )
 /** \name Math */
 /*@{*/
 
-/** Wrapper around sin() */
-double
-_mesa_sin(double a)
-{
-   return sin(a);
-}
-
-/** Single precision wrapper around sin() */
-float
-_mesa_sinf(float a)
-{
-   return (float) sin((double) a);
-}
-
-/** Wrapper around cos() */
-double
-_mesa_cos(double a)
-{
-   return cos(a);
-}
-
-/** Single precision wrapper around asin() */
-float
-_mesa_asinf(float x)
-{
-   return (float) asin((double) x);
-}
-
-/** Single precision wrapper around atan() */
-float
-_mesa_atanf(float x)
-{
-   return (float) atan((double) x);
-}
-
 /** Wrapper around sqrt() */
 double
 _mesa_sqrtd(double x)
@@ -486,15 +451,6 @@ _mesa_inv_sqrtf(float n)
 #endif
 }
 
-
-/** Wrapper around pow() */
-double
-_mesa_pow(double x, double y)
-{
-   return pow(x, y);
-}
-
-
 /**
  * Find the first bit set in a word.
  */
@@ -800,7 +756,7 @@ _mesa_strdup( const char *s )
 float
 _mesa_strtof( const char *s, char **end )
 {
-#ifdef _GNU_SOURCE
+#if defined(_GNU_SOURCE) && !defined(__CYGWIN__) && !defined(__FreeBSD__)
    static locale_t loc = NULL;
    if (!loc) {
       loc = newlocale(LC_CTYPE_MASK, "C", NULL);
@@ -926,7 +882,7 @@ error_string( GLenum error )
  * previous errors which were accumulated.
  */
 static void
-flush_delayed_errors( GLcontext *ctx )
+flush_delayed_errors( struct gl_context *ctx )
 {
    char s[MAXSTRING];
 
@@ -950,7 +906,7 @@ flush_delayed_errors( GLcontext *ctx )
  * \param fmtString printf()-like format string.
  */
 void
-_mesa_warning( GLcontext *ctx, const char *fmtString, ... )
+_mesa_warning( struct gl_context *ctx, const char *fmtString, ... )
 {
    char str[MAXSTRING];
    va_list args;
@@ -973,7 +929,7 @@ _mesa_warning( GLcontext *ctx, const char *fmtString, ... )
  * \param fmtString problem description string.
  */
 void
-_mesa_problem( const GLcontext *ctx, const char *fmtString, ... )
+_mesa_problem( const struct gl_context *ctx, const char *fmtString, ... )
 {
    va_list args;
    char str[MAXSTRING];
@@ -1001,7 +957,7 @@ _mesa_problem( const GLcontext *ctx, const char *fmtString, ... )
  * \param fmtString printf() style format string, followed by optional args
  */
 void
-_mesa_error( GLcontext *ctx, GLenum error, const char *fmtString, ... )
+_mesa_error( struct gl_context *ctx, GLenum error, const char *fmtString, ... )
 {
    static GLint debug = -1;
 
@@ -1058,7 +1014,7 @@ _mesa_error( GLcontext *ctx, GLenum error, const char *fmtString, ... )
  * \param fmtString printf()-style format string, followed by optional args.
  */
 void
-_mesa_debug( const GLcontext *ctx, const char *fmtString, ... )
+_mesa_debug( const struct gl_context *ctx, const char *fmtString, ... )
 {
 #ifdef DEBUG
    char s[MAXSTRING];