View | Details | Raw Unified | Return to bug 203327 | Differences between
and this patch

Collapse All | Expand All

(-)b/graphics/mupdf/files/patch-source__fitz__load-jpx.c (-22 / +11 lines)
Lines 1-25 Link Here
1
--- source/fitz/load-jpx.c.orig	2015-04-16 08:57:45 UTC
1
--- source/fitz/load-jpx.c.orig	2015-04-16 08:57:45 UTC
2
+++ source/fitz/load-jpx.c
2
+++ source/fitz/load-jpx.c
3
@@ -3,12 +3,17 @@
3
@@ -1,14 +1,6 @@
4
 /* Without the definition of OPJ_STATIC, compilation fails on windows
4
 #include "mupdf/fitz.h"
5
  * due to the use of __stdcall. We believe it is required on some
6
  * linux toolchains too. */
7
+
8
+#ifdef __cplusplus
9
+extern "C"
10
+{
11
 #define OPJ_STATIC
12
 #ifndef _MSC_VER
13
 #define OPJ_HAVE_STDINT_H
14
 #endif
15
+#endif
16
 
5
 
6
-/* Without the definition of OPJ_STATIC, compilation fails on windows
7
- * due to the use of __stdcall. We believe it is required on some
8
- * linux toolchains too. */
9
-#define OPJ_STATIC
10
-#ifndef _MSC_VER
11
-#define OPJ_HAVE_STDINT_H
12
-#endif
13
-
17
-#include <openjpeg.h>
14
-#include <openjpeg.h>
18
+#include <openjpeg-2.1/openjpeg.h>
15
+#include <openjpeg-2.1/openjpeg.h>
19
 
16
 
20
 static void fz_opj_error_callback(const char *msg, void *client_data)
17
 static void fz_opj_error_callback(const char *msg, void *client_data)
21
 {
18
 {
22
@@ -117,7 +122,7 @@ fz_load_jpx(fz_context *ctx, unsigned ch
19
@@ -117,7 +109,7 @@ fz_load_jpx(fz_context *ctx, unsigned ch
23
 	opj_stream_set_read_function(stream, fz_opj_stream_read);
20
 	opj_stream_set_read_function(stream, fz_opj_stream_read);
24
 	opj_stream_set_skip_function(stream, fz_opj_stream_skip);
21
 	opj_stream_set_skip_function(stream, fz_opj_stream_skip);
25
 	opj_stream_set_seek_function(stream, fz_opj_stream_seek);
22
 	opj_stream_set_seek_function(stream, fz_opj_stream_seek);
Lines 28-37 Link Here
28
 	/* Set the length to avoid an assert */
25
 	/* Set the length to avoid an assert */
29
 	opj_stream_set_user_data_length(stream, size);
26
 	opj_stream_set_user_data_length(stream, size);
30
 
27
 
31
@@ -247,3 +252,6 @@ fz_load_jpx(fz_context *ctx, unsigned ch
32
 
33
 	return img;
34
 }
35
+#ifdef __cplusplus
36
+}
37
+#endif
38
- 

Return to bug 203327