sdl12-compat: fixed gcc warning: 'this decimal constant is unsigned only in ISO C90'

From be1d38d2b6f2b6923103443c9043934824605c0c Mon Sep 17 00:00:00 2001
From: Ozkan Sezer <[EMAIL REDACTED]>
Date: Mon, 1 Mar 2021 14:50:02 +0300
Subject: [PATCH] fixed gcc warning: 'this decimal constant is unsigned only in
 ISO C90'

---
 src/SDL12_compat.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/SDL12_compat.c b/src/SDL12_compat.c
index 26ef802..e45032d 100644
--- a/src/SDL12_compat.c
+++ b/src/SDL12_compat.c
@@ -38,6 +38,7 @@
 #define SDL12_COMPAT_VERSION 50
 
 #include <stdarg.h>
+#include <limits.h>
 #ifndef _WIN32
 #include <stdio.h> /* fprintf(), etc. */
 #include <stdlib.h>    /* for abort() */
@@ -4360,7 +4361,7 @@ static Sint64 SDLCALL
 RWops12to20_seek(struct SDL_RWops *rwops20, Sint64 offset, int whence)
 {
     SDL12_RWops *rwops12 = (SDL12_RWops *) rwops20->hidden.unknown.data1;
-    if (offset < -2147483648 || offset > 2147483647) {
+    if (offset < INT_MIN || offset > INT_MAX) {
         return SDL20_InvalidParamError("offset");
     }
     return (Sint64) rwops12->seek(rwops12, (int) offset, whence);
@@ -4370,7 +4371,7 @@ static size_t SDLCALL
 RWops12to20_read(struct SDL_RWops *rwops20, void *ptr, size_t size, size_t maxnum)
 {
     SDL12_RWops *rwops12 = (SDL12_RWops *) rwops20->hidden.unknown.data1;
-    if (size > 2147483647 || maxnum > 2147483647) {
+    if (size > INT_MAX || maxnum > INT_MAX) {
         SDL20_InvalidParamError("size' or 'num");
         return 0;
     }
@@ -4381,7 +4382,7 @@ static size_t SDLCALL
 RWops12to20_write(struct SDL_RWops *rwops20, const void *ptr, size_t size, size_t num)
 {
     SDL12_RWops *rwops12 = (SDL12_RWops *) rwops20->hidden.unknown.data1;
-    if (size > 2147483647 || num > 2147483647) {
+    if (size > INT_MAX || num > INT_MAX) {
         SDL20_InvalidParamError("size' or 'num");
         return 0;
     }