shithub: jbig2

Download patch

ref: 98742e58fcbeef4562db413e1d3533cffaa0fbee
parent: 6ceadfae4d6d6f36d7912b5d4a88f8be93996950
author: Ken Sharp <[email protected]>
date: Sat Jul 14 06:31:08 EDT 2018

Jbig2dec - Fix compile error on old version of Visual Studio

A recent change uses INT32_MAX and INT32_MIN, but these are not defined
in old versions of Visual Studio (not C99 probably).

This commit works around the problem by including two simple #defines
if the values are undefined.

Sebastian may want to alter this.

--- a/jbig2_arith_int.c
+++ b/jbig2_arith_int.c
@@ -32,6 +32,13 @@
 #include "jbig2_arith.h"
 #include "jbig2_arith_int.h"
 
+#ifndef INT32_MAX
+#define INT32_MAX        2147483647i32
+#endif
+#ifndef INT32_MIN
+#define INT32_MIN        (-2147483647i32 - 1)
+#endif
+
 struct _Jbig2ArithIntCtx {
     Jbig2ArithCx IAx[512];
 };