From bd52d0d322a27afcd6e579d5858b46cf45737178 Mon Sep 17 00:00:00 2001
From: Sebastião Guerra <sebastiao.luiz.guerra@gmail.com>
Date: Mon, 10 Aug 2026 19:27:51 -0300
Subject: Replace TQ_INT32 compatibility hack with int32_t
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Sebastião Guerra <sebastiao.luiz.guerra@gmail.com>
---
 kipi-plugins/jpeglossless/jpegint.h | 15 ++++++---------
 1 file changed, 6 insertions(+), 9 deletions(-)

diff --git a/kipi-plugins/jpeglossless/jpegint.h b/kipi-plugins/jpeglossless/jpegint.h
index dbf2e3df..cc37499d 100644
--- a/kipi-plugins/jpeglossless/jpegint.h
+++ b/kipi-plugins/jpeglossless/jpegint.h
@@ -14,10 +14,7 @@
  */
 
 
-/* Ensuring definition INT32 */
-#ifndef INT32
-#define INT32	TQ_INT32
-#endif
+#include <stdint.h>
 
 /* Declarations for both compression & decompression */
 
@@ -286,10 +283,10 @@ struct jpeg_color_quantizer {
  */
 
 #ifdef RIGHT_SHIFT_IS_UNSIGNED
-#define SHIFT_TEMPS	INT32 shift_temp;
+#define SHIFT_TEMPS	int32_t shift_temp;
 #define RIGHT_SHIFT(x,shft)  \
 	((shift_temp = (x)) < 0 ? \
-	 (shift_temp >> (shft)) | ((~((INT32) 0)) << (32-(shft))) : \
+	 (shift_temp >> (shft)) | ((~((int32_t) 0)) << (32-(shft))) : \
 	 (shift_temp >> (shft)))
 #else
 #define SHIFT_TEMPS
@@ -402,7 +399,7 @@ extern const int jpeg_natural_order3[]; /* zz to natural order for 3x3 block */
 extern const int jpeg_natural_order2[]; /* zz to natural order for 2x2 block */
 
 /* Arithmetic coding probability estimation tables in jaricom.c */
-extern const INT32 jpeg_aritab[];
+extern const int32_t jpeg_aritab[];
 
 /* Suppress undefined-structure complaints if necessary. */
 
@@ -698,10 +695,10 @@ struct jpeg_color_quantizer {
  */
 
 #ifdef RIGHT_SHIFT_IS_UNSIGNED
-#define SHIFT_TEMPS	INT32 shift_temp;
+#define SHIFT_TEMPS	int32_t shift_temp;
 #define RIGHT_SHIFT(x,shft)  \
 	((shift_temp = (x)) < 0 ? \
-	 (shift_temp >> (shft)) | ((~((INT32) 0)) << (32-(shft))) : \
+	 (shift_temp >> (shft)) | ((~((int32_t) 0)) << (32-(shft))) : \
 	 (shift_temp >> (shft)))
 #else
 #define SHIFT_TEMPS
-- 
cgit v1.2.3

