src/stdlib/SDL_stdlib.c
changeset 11341 8b3231952c22
parent 10737 3406a0f8b041
child 11404 bd5b569b2a1b
equal deleted inserted replaced
11340:97cd834a843e 11341:8b3231952c22
   107 {
   107 {
   108 #if defined(HAVE_COPYSIGN)
   108 #if defined(HAVE_COPYSIGN)
   109     return copysign(x, y);
   109     return copysign(x, y);
   110 #elif defined(HAVE__COPYSIGN)
   110 #elif defined(HAVE__COPYSIGN)
   111     return _copysign(x, y);
   111     return _copysign(x, y);
       
   112 #elif defined(__WATCOMC__) && defined(__386__)
       
   113     /* this is nasty as hell, but it works.. */
       
   114     unsigned int *xi = (unsigned int *) &x,
       
   115                  *yi = (unsigned int *) &y;
       
   116     xi[1] = (yi[1] & 0x80000000) | (xi[1] & 0x7fffffff);
       
   117     return x;
   112 #else
   118 #else
   113     return SDL_uclibc_copysign(x, y);
   119     return SDL_uclibc_copysign(x, y);
   114 #endif /* HAVE_COPYSIGN */
   120 #endif /* HAVE_COPYSIGN */
   115 }
   121 }
   116 
   122