mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-05-08 17:04:24 +02:00
remove watcom compiler support from private sources
This commit is contained in:
@@ -140,12 +140,6 @@ double SDL_copysign(double x, double y)
|
||||
return copysign(x, y);
|
||||
#elif defined(HAVE__COPYSIGN)
|
||||
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
|
||||
return SDL_uclibc_copysign(x, y);
|
||||
#endif // HAVE_COPYSIGN
|
||||
|
||||
@@ -1830,24 +1830,7 @@ int SDL_swprintf(SDL_OUT_Z_CAP(maxlen) wchar_t *text, size_t maxlen, SDL_PRINTF_
|
||||
return result;
|
||||
}
|
||||
|
||||
#if defined(HAVE_LIBC) && defined(__WATCOMC__)
|
||||
// _vsnprintf() doesn't ensure nul termination
|
||||
int SDL_vsnprintf(SDL_OUT_Z_CAP(maxlen) char *text, size_t maxlen, const char *fmt, va_list ap)
|
||||
{
|
||||
int result;
|
||||
if (!fmt) {
|
||||
fmt = "";
|
||||
}
|
||||
result = _vsnprintf(text, maxlen, fmt, ap);
|
||||
if (maxlen > 0) {
|
||||
text[maxlen - 1] = '\0';
|
||||
}
|
||||
if (result < 0) {
|
||||
result = (int)maxlen;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
#elif defined(HAVE_VSNPRINTF)
|
||||
#if defined(HAVE_VSNPRINTF)
|
||||
int SDL_vsnprintf(SDL_OUT_Z_CAP(maxlen) char *text, size_t maxlen, const char *fmt, va_list ap)
|
||||
{
|
||||
if (!fmt) {
|
||||
|
||||
Reference in New Issue
Block a user