Obsolete golang-120
[oi-userland.git] / components / library / openjpeg / patches / openjpeg-01-index_t.patch
blobc0c0e98ae96a39283cdf9fa39cfd0c4a50fbdd08
2 openjpip.h and openjpip.c can't use index_t as a convenience typedef,
3 because OI inherited index_t in sys/types.h from Solaris. Adjust to
4 use the underlying index_param_t instead.
6 --- openjpeg-2.5.3/src/lib/openjpip/openjpip.h.orig
7 +++ openjpeg-2.5.3/src/lib/openjpip/openjpip.h
8 @@ -281,23 +281,20 @@
9 * test the format of index (cidx) box in JP2 file
12 -/** Redefinition of index parameters*/
13 -typedef index_param_t index_t;
15 /**
16 * Parse JP2 file and get index information from cidx box inside
18 * @param[in] fd file descriptor of the JP2 file
19 * @return pointer to the generated structure of index parameters
21 -OPJ_API index_t * OPJ_CALLCONV get_index_from_JP2file(int fd);
22 +OPJ_API index_param_t * OPJ_CALLCONV get_index_from_JP2file(int fd);
24 /**
25 * Destroy index parameters
27 * @param[in,out] idx addressof the index pointer
29 -OPJ_API void OPJ_CALLCONV destroy_index(index_t **idx);
30 +OPJ_API void OPJ_CALLCONV destroy_index(index_param_t **idx);
33 /**
34 @@ -305,7 +302,7 @@
36 * @param[in] index index parameters
38 -OPJ_API void OPJ_CALLCONV output_index(index_t *index);
39 +OPJ_API void OPJ_CALLCONV output_index(index_param_t *index);
41 #endif /*SERVER*/
43 --- openjpeg-2.5.3/src/lib/openjpip/openjpip.c.orig
44 +++ openjpeg-2.5.3/src/lib/openjpip/openjpip.c
45 @@ -445,7 +445,7 @@
46 opj_free(*dec);
49 -index_t * OPJ_CALLCONV get_index_from_JP2file(int fd)
50 +index_param_t * OPJ_CALLCONV get_index_from_JP2file(int fd)
52 char *data;
54 @@ -473,12 +473,12 @@
55 return parse_jp2file(fd);
58 -void OPJ_CALLCONV destroy_index(index_t **idx)
59 +void OPJ_CALLCONV destroy_index(index_param_t **idx)
61 delete_index(idx);
64 -void OPJ_CALLCONV output_index(index_t *index)
65 +void OPJ_CALLCONV output_index(index_param_t *index)
67 print_index(*index);
69 --- openjpeg-2.5.3/src/bin/jpip/opj_jpip_test.c.orig
70 +++ openjpeg-2.5.3/src/bin/jpip/opj_jpip_test.c
71 @@ -52,7 +52,7 @@
72 main(int argc, char *argv[])
74 int fd;
75 - index_t *jp2idx;
76 + index_param_t *jp2idx;
77 if (argc < 2) {
78 return 1;