early-access version 1988
This commit is contained in:
8
externals/SDL/src/stdlib/SDL_iconv.c
vendored
8
externals/SDL/src/stdlib/SDL_iconv.c
vendored
@@ -55,13 +55,13 @@ SDL_COMPILE_TIME_ASSERT(iconv_t, sizeof (iconv_t) <= sizeof (SDL_iconv_t));
|
||||
SDL_iconv_t
|
||||
SDL_iconv_open(const char *tocode, const char *fromcode)
|
||||
{
|
||||
return (SDL_iconv_t) ((size_t) iconv_open(tocode, fromcode));
|
||||
return (SDL_iconv_t) ((uintptr_t) iconv_open(tocode, fromcode));
|
||||
}
|
||||
|
||||
int
|
||||
SDL_iconv_close(SDL_iconv_t cd)
|
||||
{
|
||||
return iconv_close((iconv_t) ((size_t) cd));
|
||||
return iconv_close((iconv_t) ((uintptr_t) cd));
|
||||
}
|
||||
|
||||
size_t
|
||||
@@ -71,9 +71,9 @@ SDL_iconv(SDL_iconv_t cd,
|
||||
{
|
||||
size_t retCode;
|
||||
#ifdef ICONV_INBUF_NONCONST
|
||||
retCode = iconv((iconv_t) ((size_t) cd), (char **) inbuf, inbytesleft, outbuf, outbytesleft);
|
||||
retCode = iconv((iconv_t) ((uintptr_t) cd), (char **) inbuf, inbytesleft, outbuf, outbytesleft);
|
||||
#else
|
||||
retCode = iconv((iconv_t) ((size_t) cd), inbuf, inbytesleft, outbuf, outbytesleft);
|
||||
retCode = iconv((iconv_t) ((uintptr_t) cd), inbuf, inbytesleft, outbuf, outbytesleft);
|
||||
#endif
|
||||
if (retCode == (size_t) - 1) {
|
||||
switch (errno) {
|
||||
|
4
externals/SDL/src/stdlib/SDL_string.c
vendored
4
externals/SDL/src/stdlib/SDL_string.c
vendored
@@ -281,7 +281,7 @@ SDL_memset(SDL_OUT_BYTECAP(len) void *dst, int c, size_t len)
|
||||
* execute a 32-bit set. Set first bytes manually if needed until it is
|
||||
* aligned. */
|
||||
value1 = (Uint8)c;
|
||||
while ((intptr_t)dstp1 & 0x3) {
|
||||
while ((uintptr_t)dstp1 & 0x3) {
|
||||
if (len--) {
|
||||
*dstp1++ = value1;
|
||||
} else {
|
||||
@@ -329,7 +329,7 @@ SDL_memcpy(SDL_OUT_BYTECAP(len) void *dst, SDL_IN_BYTECAP(len) const void *src,
|
||||
using Uint32* pointers, so we need to make sure the pointers are
|
||||
aligned before we loop using them.
|
||||
*/
|
||||
if (((intptr_t)src & 0x3) || ((intptr_t)dst & 0x3)) {
|
||||
if (((uintptr_t)src & 0x3) || ((uintptr_t)dst & 0x3)) {
|
||||
/* Do an unaligned byte copy */
|
||||
Uint8 *srcp1 = (Uint8 *)src;
|
||||
Uint8 *dstp1 = (Uint8 *)dst;
|
||||
|
Reference in New Issue
Block a user