From d026716b63e761f3fc9f64725480cf37a9dac81f Mon Sep 17 00:00:00 2001
From: Ozkan Sezer <[EMAIL REDACTED]>
Date: Fri, 16 Apr 2021 23:11:40 +0300
Subject: [PATCH] IMG_tif.c: prepare for libtiff-4.3.0.
libtiff-4.3.0 deprecates the use of int8, uint8, int16, uint16, int32,
uint32, int64, uint64 typedefs. Our only use of them was 'uint32' with
TIFFReadRGBAImageOriented(): Just replace uint32 with SDL's own Uint32
and it compiles without any warnings.
---
IMG_tif.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/IMG_tif.c b/IMG_tif.c
index 01b94ab..b827c0f 100644
--- a/IMG_tif.c
+++ b/IMG_tif.c
@@ -35,7 +35,7 @@ static struct {
TIFF* (*TIFFClientOpen)(const char*, const char*, thandle_t, TIFFReadWriteProc, TIFFReadWriteProc, TIFFSeekProc, TIFFCloseProc, TIFFSizeProc, TIFFMapFileProc, TIFFUnmapFileProc);
void (*TIFFClose)(TIFF*);
int (*TIFFGetField)(TIFF*, ttag_t, ...);
- int (*TIFFReadRGBAImageOriented)(TIFF*, uint32, uint32, uint32*, int, int);
+ int (*TIFFReadRGBAImageOriented)(TIFF*, Uint32, Uint32, Uint32*, int, int);
TIFFErrorHandler (*TIFFSetErrorHandler)(TIFFErrorHandler);
} lib;
@@ -60,7 +60,7 @@ int IMG_InitTIF()
FUNCTION_LOADER(TIFFClientOpen, TIFF * (*)(const char*, const char*, thandle_t, TIFFReadWriteProc, TIFFReadWriteProc, TIFFSeekProc, TIFFCloseProc, TIFFSizeProc, TIFFMapFileProc, TIFFUnmapFileProc))
FUNCTION_LOADER(TIFFClose, void (*)(TIFF*))
FUNCTION_LOADER(TIFFGetField, int (*)(TIFF*, ttag_t, ...))
- FUNCTION_LOADER(TIFFReadRGBAImageOriented, int (*)(TIFF*, uint32, uint32, uint32*, int, int))
+ FUNCTION_LOADER(TIFFReadRGBAImageOriented, int (*)(TIFF*, Uint32, Uint32, Uint32*, int, int))
FUNCTION_LOADER(TIFFSetErrorHandler, TIFFErrorHandler (*)(TIFFErrorHandler))
}
++lib.loaded;
@@ -194,7 +194,7 @@ SDL_Surface* IMG_LoadTIF_RW(SDL_RWops* src)
if(!surface)
goto error;
- if(!lib.TIFFReadRGBAImageOriented(tiff, img_width, img_height, (uint32 *)surface->pixels, ORIENTATION_TOPLEFT, 0))
+ if(!lib.TIFFReadRGBAImageOriented(tiff, img_width, img_height, (Uint32 *)surface->pixels, ORIENTATION_TOPLEFT, 0))
goto error;
lib.TIFFClose(tiff);