mirror of https://github.com/encounter/SDL.git
Fixed bug 3768 - provide a quick copysign() solution for watcom
Ozkan Sezer The following patch provides a quick copysign solution for Watcom/x86
This commit is contained in:
parent
9b3ec6a570
commit
fcf83e7908
|
@ -109,6 +109,12 @@ SDL_copysign(double x, double y)
|
||||||
return copysign(x, y);
|
return copysign(x, y);
|
||||||
#elif defined(HAVE__COPYSIGN)
|
#elif defined(HAVE__COPYSIGN)
|
||||||
return _copysign(x, y);
|
return _copysign(x, y);
|
||||||
|
#elif defined(__WATCOMC__) && defined(__386__)
|
||||||
|
/* this is nasty as hell, but it works.. */
|
||||||
|
unsigned int *xi = (unsigned int *) &x,
|
||||||
|
*yi = (unsigned int *) &y;
|
||||||
|
xi[1] = (yi[1] & 0x80000000) | (xi[1] & 0x7fffffff);
|
||||||
|
return x;
|
||||||
#else
|
#else
|
||||||
return SDL_uclibc_copysign(x, y);
|
return SDL_uclibc_copysign(x, y);
|
||||||
#endif /* HAVE_COPYSIGN */
|
#endif /* HAVE_COPYSIGN */
|
||||||
|
|
Loading…
Reference in New Issue