SDL_image: updated os/2 makefile.

From c1ffd7400208e4e210a6ffb5e6ed0ce67dcb6bbb Mon Sep 17 00:00:00 2001
From: Ozkan Sezer <[EMAIL REDACTED]>
Date: Mon, 9 May 2022 20:11:24 +0300
Subject: [PATCH] updated os/2 makefile.

---
 IMG_jpg.c    | 7 ++++++-
 IMG_stb.c    | 2 ++
 Makefile.os2 | 6 +++++-
 3 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/IMG_jpg.c b/IMG_jpg.c
index c71c358..75b7680 100644
--- a/IMG_jpg.c
+++ b/IMG_jpg.c
@@ -678,9 +678,14 @@ SDL_Surface *IMG_LoadJPG_RW(SDL_RWops *src)
 
 #if !defined(USE_JPEGLIB) && defined(USE_TINYJPEG)
 
-#define assert SDL_assert
+#ifdef __WATCOMC__ /* watcom has issues.. */
+#define ceilf ceil
+#define floorf floor
+#else
 #define ceilf SDL_ceilf
 #define floorf SDL_floorf
+#endif
+#define assert SDL_assert
 #define memcpy SDL_memcpy
 
 #define tje_log SDL_Log
diff --git a/IMG_stb.c b/IMG_stb.c
index f8ba197..e5eaee3 100644
--- a/IMG_stb.c
+++ b/IMG_stb.c
@@ -35,8 +35,10 @@
 #define strcmp SDL_strcmp
 #define strncmp SDL_strncmp
 #define strtol SDL_strtol
+#ifndef __WATCOMC__ /* watcom has issues */
 #define pow SDL_pow
 #define ldexp SDL_scalbn
+#endif
 
 #define STBI_NO_STDIO
 #define STBI_ONLY_PNG
diff --git a/Makefile.os2 b/Makefile.os2
index 2038c11..d0bcb4a 100644
--- a/Makefile.os2
+++ b/Makefile.os2
@@ -22,7 +22,7 @@ DEPS_LIB=C:\SDL2DEV\lib
 
 SRCS = IMG.c IMG_bmp.c IMG_gif.c IMG_jpg.c IMG_lbm.c IMG_pcx.c IMG_png.c &
        IMG_pnm.c IMG_svg.c IMG_tga.c IMG_tif.c IMG_xcf.c IMG_xpm.c IMG_xv.c &
-       IMG_webp.c IMG_qoi.c
+       IMG_webp.c IMG_qoi.c IMG_jxl.c IMG_stb.c
 
 LIBS = libpng.lib libtiff.lib zlib.lib jpeg.lib webpdec.lib SDL2.lib
 
@@ -45,6 +45,10 @@ CFLAGS+= -DLOAD_JPG -DLOAD_PNG -DLOAD_BMP -DLOAD_GIF -DLOAD_LBM &
          -DLOAD_PCX -DLOAD_PNM -DLOAD_TGA -DLOAD_XCF -DLOAD_XPM &
          -DLOAD_XV -DLOAD_SVG -DLOAD_TIF -DLOAD_WEBP -DLOAD_QOI
 
+#CFLAGS+= CFLAGS+= -DUSE_STBIMAGE -DSTBI_NO_SIMD
+# tiny_jpeg.h needs C99 mode
+#CFLAGS+= CFLAGS+= -DUSE_TINYJPEG -za99
+
 CFLAGS+= -DSDL_BUILD_MAJOR_VERSION=$(MAJOR_VERSION)
 CFLAGS+= -DSDL_BUILD_MINOR_VERSION=$(MINOR_VERSION)
 CFLAGS+= -DSDL_BUILD_MICRO_VERSION=$(MICRO_VERSION)