shithub: jbig2

Download patch

ref: ca14bdc950cca9c7e6abf1b617af3ad4d1c9dda7
parent: f2bc4c485865c7e63c38c95fbe6993ecfa85905c
author: Ken Sharp <ken.sharp@artifex.com>
date: Thu Jul 19 08:09:02 EDT 2018

JBIG2DEC - add declarations which are not defined in VS 2005

Like INT32_MAX and INT32_MIN, UINT32_MAX which is defined in stdint.h
is not defined for old versions of Visual Studio. Add simple definitions
in the two source files that use it, if it is not already defined.

--- a/jbig2_generic.c
+++ b/jbig2_generic.c
@@ -42,6 +42,10 @@
 #include "jbig2_page.h"
 #include "jbig2_segment.h"
 
+#if !defined (UINT32_MAX)
+#define UINT32_MAX 0xffffffff
+#endif
+
 /* return the appropriate context size for the given template */
 int
 jbig2_generic_stats_size(Jbig2Ctx *ctx, int template)
--- a/jbig2_segment.c
+++ b/jbig2_segment.c
@@ -39,6 +39,10 @@
 #include "jbig2_symbol_dict.h"
 #include "jbig2_text.h"
 
+#if !defined (UINT32_MAX)
+#define UINT32_MAX 0xffffffff
+#endif
+
 Jbig2Segment *
 jbig2_parse_segment_header(Jbig2Ctx *ctx, uint8_t *buf, size_t buf_size, size_t *p_header_size)
 {