diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2024-05-21 18:25:42 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2024-05-26 12:18:56 +0900 |
commit | 3a15c88594f9b30bae37dd656e92d10a3327898e (patch) | |
tree | c9e2a11ff426b780e9682d991365a950a79a885a | |
parent | df746ca961e1a3ba1c1d4b8ad9d84ee4e1a1c013 (diff) | |
download | gwenview-3a15c88594f9b30bae37dd656e92d10a3327898e.tar.gz gwenview-3a15c88594f9b30bae37dd656e92d10a3327898e.zip |
Fix FTBFS on OMV. This resolves issue #38
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit d51c6eed799d182e335d5fcea5571fc678dcef6a)
-rw-r--r-- | src/imageutils/jpegint.h | 19 | ||||
-rw-r--r-- | src/imageutils/transupp.c | 28 |
2 files changed, 15 insertions, 32 deletions
diff --git a/src/imageutils/jpegint.h b/src/imageutils/jpegint.h index bf01aa3..21a0146 100644 --- a/src/imageutils/jpegint.h +++ b/src/imageutils/jpegint.h @@ -14,11 +14,6 @@ */ -/* Ensuring definition INT32 */ -#ifndef INT32 -#define INT32 TQ_INT32 -#endif - /* Declarations for both compression & decompression */ typedef enum { /* Operating modes for buffer controllers */ @@ -280,16 +275,16 @@ struct jpeg_color_quantizer { * shift" instructions that shift in copies of the sign bit. But some * C compilers implement >> with an unsigned shift. For these machines you * must define RIGHT_SHIFT_IS_UNSIGNED. - * RIGHT_SHIFT provides a proper signed right shift of an INT32 quantity. + * RIGHT_SHIFT provides a proper signed right shift of an int32_t quantity. * It is only applied with constant shift counts. SHIFT_TEMPS must be * included in the variables of any routine using RIGHT_SHIFT. */ #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 +397,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. */ @@ -691,16 +686,16 @@ struct jpeg_color_quantizer { * shift" instructions that shift in copies of the sign bit. But some * C compilers implement >> with an unsigned shift. For these machines you * must define RIGHT_SHIFT_IS_UNSIGNED. - * RIGHT_SHIFT provides a proper signed right shift of an INT32 quantity. + * RIGHT_SHIFT provides a proper signed right shift of an int32_t quantity. * It is only applied with constant shift counts. SHIFT_TEMPS must be * included in the variables of any routine using RIGHT_SHIFT. */ #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 diff --git a/src/imageutils/transupp.c b/src/imageutils/transupp.c index 0ede0db..8003c48 100644 --- a/src/imageutils/transupp.c +++ b/src/imageutils/transupp.c @@ -1,8 +1,16 @@ #include <stdlib.h> #include <stdio.h> #include <jpeglib.h> +#include <jpegint.h> #include <jerror.h> +/* Although this file really shouldn't have access to the library internals, + * it's helpful to let it call jround_up() and jcopy_block_row(). */ +#define JPEG_INTERNALS + +#include "jinclude.h" +#include "transupp.h" /* My own external interface */ + #if JPEG_LIB_VERSION >= 80 /* @@ -19,14 +27,6 @@ * interfaces. */ -/* Although this file really shouldn't have access to the library internals, - * it's helpful to let it call jround_up() and jcopy_block_row(). - */ -#define JPEG_INTERNALS - -#include "jinclude.h" -#include "jpeglib.h" -#include "transupp.h" /* My own external interface */ #include <ctype.h> /* to declare isdigit() */ @@ -1591,8 +1591,6 @@ jcopy_markers_execute (j_decompress_ptr srcinfo, j_compress_ptr dstinfo, #else // JPEG_LIB_VERSION >= 80 -#include <jpegint.h> - /* * transupp.c * @@ -1607,16 +1605,6 @@ jcopy_markers_execute (j_decompress_ptr srcinfo, j_compress_ptr dstinfo, * interfaces. */ -/* Although this file really shouldn't have access to the library internals, - * it's helpful to let it call jround_up() and jcopy_block_row(). - */ -#define JPEG_INTERNALS - -#include "jinclude.h" -#include "jpeglib.h" -#include "transupp.h" /* My own external interface */ - - #if TRANSFORMS_SUPPORTED /* |